[SeaBIOS] Split dev-i440fx.c?
kevin at koconnor.net
Sun Nov 28 17:42:44 CET 2010
On Sun, Nov 28, 2010 at 03:27:01PM +0100, Sebastian Herbszt wrote:
> Isaku Yamahata wrote:
> >On Sun, Nov 21, 2010 at 06:10:50PM +0100, Sebastian Herbszt wrote:
> >>dev-i440fx.c contains functions related to the 440FX and
> >>PIIX. Those for the PIIX should also apply to the ICH
> >>(e.g. piix_ide_init). Should they be moved to dev-piix_ich.c?
> >In theory, yes. I just chosen not to split it out.
> >Are you planning to add ich support?
> I think the following two functions are already good enough to support ICH:
> piix_isa_bridge_init() - LPC
> piix_ide_init() - IDE/SATA
> Of those 7 functions inside dev-i440fx.c only 2-3 are really 440FX
> dependant. My idea was to split the rest to dev-piix_ich.c and
> rename those two from above to piix_ich_isa_bridge_init() and
> piix_ich_ide_init(). I played with QEMUs PIIX3/4 IDE emulation and
> "upgraded" it to ICH6 by just changing the PCI device id. Linux
> detected it correctly but requested that IDE decode is enabled by
> BIOS. Adding an entry to pci_class_tbl and calling piix_ide_init()
> fixed that problem.
I think I'd prefer to see the functions in dev-i440fx.c moved into
shadow.c, pciinit.c, acpi.c, and smm.c. That is, move the functions
closer to their callers.
More information about the SeaBIOS