From 9cf29aa31bb103de52d7bfaf244a06562f29ffa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fr=C3=B6schle?= Date: Sat, 2 Nov 2013 05:04:15 +0000 Subject: [PATCH] added vendor & device id to bus scan --- BaS_gcc/sources/pci.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/BaS_gcc/sources/pci.c b/BaS_gcc/sources/pci.c index ea70560..99d9cef 100644 --- a/BaS_gcc/sources/pci.c +++ b/BaS_gcc/sources/pci.c @@ -175,8 +175,8 @@ void pci_scan(void) uint16_t i; xprintf("\r\nPCI bus scan...\r\n\r\n"); - xprintf(" Bus|Slot|Func|\r\n"); - xprintf("----+----+----|\r\n"); + xprintf(" Bus|Slot|Func|Vndr|Dev |\r\n"); + xprintf("----+----+----|----+++++|\r\n"); for (bus = 0; bus < 1; bus++) { for (slot = 0; slot < 32; slot++) @@ -188,8 +188,9 @@ void pci_scan(void) value = pci_read_config_longword(bus, slot, function, 0); if (value != 0xffffffff) { - xprintf("[%02x]|[%02x]|[%02x]| %s\r\n", bus, slot, function, - device_class(pci_read_config_longword(bus, slot, function, 0x08) >> 24 & 0xff)); + xprintf("[%02x]|[%02x]|[%02x]|%04x|%04x| %s\r\n", bus, slot, function, + PCI_VENDOR_ID(value), PCI_DEVICE_ID(value), + device_class(pci_read_config_longword(bus, slot, function, 0x08) >> 24 & 0xff)); for (i = 0; i < 0x40; i += 4) { value = pci_read_config_longword(bus, slot, function, i);