diff options
author | Yinghai Lu <yinghailu@gmail.com> | 2004-12-14 01:56:55 +0000 |
---|---|---|
committer | Yinghai Lu <yinghailu@gmail.com> | 2004-12-14 01:56:55 +0000 |
commit | 140a3a11ad24d2f15430fc1dc5719c2d5c45eebf (patch) | |
tree | 7bdc1258d25640c24fce3bbd3abeb63bee656a44 /src/northbridge/amd/amdk8 | |
parent | ec01aa98d0a12f857137c469b15226e30a625331 (diff) |
add dump_pci_devices_in_bus
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1819 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge/amd/amdk8')
-rw-r--r-- | src/northbridge/amd/amdk8/debug.c | 17 |
1 files changed, 17 insertions, 0 deletions
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; |