Felix Singer has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46347 )
Change subject: libpayload/libpci: Store device class in pci_dev ......................................................................
libpayload/libpci: Store device class in pci_dev
Change-Id: I5d56be96f3f0da471246f031ea619e3df8e54cfb Signed-off-by: Felix Singer felix.singer@secunet.com --- M payloads/libpayload/include/pci/pci.h M payloads/libpayload/libpci/libpci.c 2 files changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/47/46347/1
diff --git a/payloads/libpayload/include/pci/pci.h b/payloads/libpayload/include/pci/pci.h index 37aeafa..ea11a05 100644 --- a/payloads/libpayload/include/pci/pci.h +++ b/payloads/libpayload/include/pci/pci.h @@ -74,6 +74,7 @@ u16 domain; u8 bus, dev, func; u16 vendor_id, device_id; + u16 device_class; struct pci_dev *parent; struct pci_dev *next; }; diff --git a/payloads/libpayload/libpci/libpci.c b/payloads/libpayload/libpci/libpci.c index 50cd228..b8188a1 100644 --- a/payloads/libpayload/libpci/libpci.c +++ b/payloads/libpayload/libpci/libpci.c @@ -182,6 +182,7 @@ 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), 0xa); dev->next = 0;
hdr = pci_read_config8(PCI_DEV(bus, slot, func),