From 140a3a11ad24d2f15430fc1dc5719c2d5c45eebf Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Tue, 14 Dec 2004 01:56:55 +0000 Subject: add dump_pci_devices_in_bus git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1819 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/northbridge/amd/amdk8/debug.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/northbridge/amd/amdk8') diff --git a/src/northbridge/amd/amdk8/debug.c b/src/northbridge/amd/amdk8/debug.c index 9982add6a7..623214fefd 100644 --- a/src/northbridge/amd/amdk8/debug.c +++ b/src/northbridge/amd/amdk8/debug.c @@ -69,6 +69,23 @@ static void dump_pci_devices(void) } } +static void dump_pci_devices_on_bus(unsigned busn) +{ + device_t dev; + for(dev = PCI_DEV(busn, 0, 0); + dev <= PCI_DEV(busn, 0x1f, 0x7); + dev += PCI_DEV(0,0,1)) { + uint32_t id; + id = pci_read_config32(dev, PCI_VENDOR_ID); + if (((id & 0xffff) == 0x0000) || ((id & 0xffff) == 0xffff) || + (((id >> 16) & 0xffff) == 0xffff) || + (((id >> 16) & 0xffff) == 0x0000)) { + continue; + } + dump_pci_device(dev); + } +} + static void dump_spd_registers(const struct mem_controller *ctrl) { int i; -- cgit v1.2.3