From 9099feaa94670af2dd558de35b74452570452028 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Fri, 5 Aug 2022 13:02:52 +0200 Subject: pciexp_device: Introduce pciexp_find_ext_vendor_cap() Vendors can choose to add non-standard capabilities inside a Vendor-Specific Extended Capability. These are identified by the Extended Capability ID 0x0b. Change-Id: Idd6dd0e98bd53b19077afdd4c402114578bec966 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/c/coreboot/+/66454 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/include/device/pci_def.h | 1 + src/include/device/pciexp.h | 2 ++ 2 files changed, 3 insertions(+) (limited to 'src/include/device') diff --git a/src/include/device/pci_def.h b/src/include/device/pci_def.h index fa520674a861..0eedd513b2fa 100644 --- a/src/include/device/pci_def.h +++ b/src/include/device/pci_def.h @@ -460,6 +460,7 @@ #define PCI_EXT_CAP_ID_VC 2 #define PCI_EXT_CAP_ID_DSN 3 #define PCI_EXT_CAP_ID_PWR 4 +#define PCI_EXT_CAP_ID_VNDR 0x0b /* Extended Capability lists*/ #define PCIE_EXT_CAP_OFFSET 0x100 diff --git a/src/include/device/pciexp.h b/src/include/device/pciexp.h index 5a996834d215..d8162405ad91 100644 --- a/src/include/device/pciexp.h +++ b/src/include/device/pciexp.h @@ -34,6 +34,8 @@ extern struct device_operations default_pciexp_hotplug_ops_bus; unsigned int pciexp_find_extended_cap(const struct device *dev, unsigned int cap, unsigned int offset); +unsigned int pciexp_find_ext_vendor_cap(const struct device *dev, unsigned int cap, + unsigned int offset); static inline bool pciexp_is_downstream_port(int type) { -- cgit v1.2.3