[SeaBIOS] [PATCH 05/20] simplify chipset detection
Kevin O'Connor
kevin at koconnor.net
Wed Nov 28 01:35:22 CET 2012
On Tue, Nov 27, 2012 at 10:20:56AM +0100, Gerd Hoffmann wrote:
> Just set a global variable in the first chipset detection
> function (pci_bios_init_platform) and use them later on.
[...]
> static void *
> -build_fadt(struct pci_device *pci)
> +build_fadt(void)
> {
> struct fadt_descriptor_rev1 *fadt = malloc_high(sizeof(*fadt));
> struct facs_descriptor_rev1 *facs = memalign_high(64, sizeof(*facs));
> @@ -327,7 +314,10 @@ build_fadt(struct pci_device *pci)
> fadt->firmware_ctrl = cpu_to_le32((u32)facs);
> fadt->dsdt = 0; /* dsdt will be filled later in acpi_bios_init()
> by fill_dsdt() */
> - pci_init_device(fadt_init_tbl, pci, fadt);
> + if (have_piix4)
> + piix4_fadt_init(fadt);
> + if (have_ich9)
> + ich9_lpc_fadt_init(fadt);
I liked the original way better. The pci_init_device() function is
pretty cheap (it just walks a linked list). The code is slightly more
verbose, but I think it's more clear what's occurring.
Besides the few minor comments, I'm okay with this patch series.
-Kevin
More information about the SeaBIOS
mailing list