summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--payloads/libpayload/include/pci/pci.h1
-rw-r--r--payloads/libpayload/libpci/libpci.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/payloads/libpayload/include/pci/pci.h b/payloads/libpayload/include/pci/pci.h
index 8c11d6b33f..7ec9491d95 100644
--- a/payloads/libpayload/include/pci/pci.h
+++ b/payloads/libpayload/include/pci/pci.h
@@ -74,6 +74,7 @@ struct pci_dev {
u16 domain;
u8 bus, dev, func;
u16 vendor_id, device_id;
+ u16 device_class;
struct pci_dev *next;
};
diff --git a/payloads/libpayload/libpci/libpci.c b/payloads/libpayload/libpci/libpci.c
index 3e3513ccb0..200ae18435 100644
--- a/payloads/libpayload/libpci/libpci.c
+++ b/payloads/libpayload/libpci/libpci.c
@@ -178,6 +178,7 @@ static struct pci_dev *pci_scan_single_bus(struct pci_dev *dev, uint8_t bus)
dev->func = func;
dev->vendor_id = val & 0xffff;
dev->device_id = (uint16_t)(val >> 16);
+ dev->device_class = pci_read_config16(PCI_DEV(bus, slot, func), PCI_CLASS_DEVICE);
dev->next = 0;
hdr = pci_read_config8(PCI_DEV(bus, slot, func),