[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected] Message-Id: <e9be57cd1e9aba8c97fc1518055a05e28533904c.1347565443.git.jba...@redhat.com> In-Reply-To: <[email protected]> References: <[email protected]> Subject: [PATCH 2/9] seabios: pciinit: initialize pcimem_start and pcimem_end depending on chipset.
From: Isaku Yamahata <[email protected]> initialize pcimem_start and pcimem_end based on chipset. [[email protected]: re-structured to current seabios] Signed-off-by: Isaku Yamahata <[email protected]> Signed-off-by: Jason Baron <[email protected]> --- src/pci.h | 6 ++++++ src/pciinit.c | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+), 0 deletions(-) diff --git a/src/pci.h b/src/pci.h index fe663b8..ef0c158 100644 --- a/src/pci.h +++ b/src/pci.h @@ -156,5 +156,11 @@ extern struct pir_header *PirAddr; #define PIR_SIGNATURE 0x52495024 // $PIR +struct pci_mem_addr { + u64 *pcimem_start; + u64 *pcimem_end; +}; + + #endif diff --git a/src/pciinit.c b/src/pciinit.c index 68f302a..e604fd9 100644 --- a/src/pciinit.c +++ b/src/pciinit.c @@ -636,6 +636,22 @@ static void pci_bios_map_devices(struct pci_bus *busses) * Main setup code ****************************************************************/ + +void i440fx_mem_addr_init(struct pci_device *dev, void *arg) +{ + struct pci_mem_addr *addr = arg; + + *(addr->pcimem_start) = BUILD_PCIMEM_START; + *(addr->pcimem_end) = BUILD_PCIMEM_END; +} + + +static const struct pci_device_id pci_mem_addr_tbl[] = { + PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82441, + i440fx_mem_addr_init), + PCI_DEVICE_END, +}; + void pci_setup(void) { @@ -653,6 +669,13 @@ pci_setup(void) } pci_bios_init_bus(); + struct pci_mem_addr addr = { + .pcimem_start = &pcimem_start, + .pcimem_end = &pcimem_end, + }; + pci_find_init_device(pci_mem_addr_tbl, &addr); + + dprintf(1, "=== PCI device probing ===\n"); pci_probe_devices(); -- 1.7.1 _______________________________________________ SeaBIOS mailing list [email protected] http://www.seabios.org/mailman/listinfo/seabios
