tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Early console attach vs PCI_NETBSD_CONFIGURE

Hi folks,

I'm trying to find a good way to do early console attach on NetBSD/iyonix with a genfb-based console.

The graphics card is a NVidia GeForce2 MX which is supplied with the machine, and there are drivers in flash for RISC OS, which boots natively on the machine.

NetBSD reconfigures the PCI bus early on during boot, so the base addresses of the devices can and do move around from the way RISC OS chose to lay out the bus.

The NetBSD bootloader passes enough information through about how RISC OS has configured the card that we can attach genfb to it.

I'd like to attach the console early so that we can get early boot messages appearing on the screen, but the problem is that if I do that then the base address of the graphics card will move during autoconfiguration and genfb will be left writing kernel messages to memory which may not be backed by an actual framebuffer.

I can't see an obvious hook where I can reattach genfb with the new address, and setup_memwins (in pci/pciconf.c) is peppered with calls to printf guarded by pci_conf_debug. Given that after changing the base address of the framebuffer and before reattaching the console a printf could be fatal, I don't think simply reattaching after pciconf has done its thing is enough.

I'm reluctant to add a hook that will be called immediately after changing every single base address register, but that's the only way I can think of right now.

Is there a better way to do this?

Gilette - the best a man can forget

Home | Main Index | Thread Index | Old Index