From 50b78b66d3e8c08ff86b0b82bbfa35537d3de053 Mon Sep 17 00:00:00 2001 From: Juhana Helovuo Date: Mon, 13 Sep 2010 14:43:02 +0000 Subject: [PATCH] Print an error and correct pci scan limits. Skip sb700 ISA DMA init if needed. Signed-off-by: Juhana Helovuo Acked-by: Myles Watson git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5805 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/devices/pci_device.c | 8 ++++++++ src/southbridge/amd/sb700/Kconfig | 6 ++++++ src/southbridge/amd/sb700/sb700_lpc.c | 4 ++++ 3 files changed, 18 insertions(+) diff --git a/src/devices/pci_device.c b/src/devices/pci_device.c index 4a9fa1466..16e8d3f20 100644 --- a/src/devices/pci_device.c +++ b/src/devices/pci_device.c @@ -1019,6 +1019,14 @@ unsigned int pci_scan_bus(struct bus *bus, printk(BIOS_DEBUG, "PCI: pci_scan_bus for bus %02x\n", bus->secondary); #endif + // Maximum sane devfn is 0xFF + if (max_devfn > 0xff) { + printk(BIOS_ERR, "PCI: pci_scan_bus limits devfn %x - devfn %x\n", + min_devfn, max_devfn ); + printk(BIOS_ERR, "PCI: pci_scan_bus upper limit too big. Using 0xff.\n"); + max_devfn=0xff; + } + old_devices = bus->children; bus->children = NULL; diff --git a/src/southbridge/amd/sb700/Kconfig b/src/southbridge/amd/sb700/Kconfig index db43e5e51..e7592897e 100644 --- a/src/southbridge/amd/sb700/Kconfig +++ b/src/southbridge/amd/sb700/Kconfig @@ -20,3 +20,9 @@ config SOUTHBRIDGE_AMD_SB700 bool select IOAPIC + +config SOUTHBRIDGE_AMD_SB700_SKIP_ISA_DMA_INIT + bool + default n + depends on SOUTHBRIDGE_AMD_SB700 + diff --git a/src/southbridge/amd/sb700/sb700_lpc.c b/src/southbridge/amd/sb700/sb700_lpc.c index 3a7551226..14ed1b541 100644 --- a/src/southbridge/amd/sb700/sb700_lpc.c +++ b/src/southbridge/amd/sb700/sb700_lpc.c @@ -42,7 +42,11 @@ static void lpc_init(device_t dev) pci_write_config32(sm_dev, 0x64, dword); /* Initialize isa dma */ +#if CONFIG_SOUTHBRIDGE_AMD_SB700_SKIP_ISA_DMA_INIT + printk(BIOS_DEBUG, "Skipping isa_dma_init() to avoid getting stuck.\n"); +#else isa_dma_init(); +#endif /* Enable DMA transaction on the LPC bus */ byte = pci_read_config8(dev, 0x40); -- 2.25.1