[coreboot-gerrit] Patch set updated for coreboot: 79f1bf4 Add Kconfig options to override Subsystem Vendor and Device ID
Patrick Georgi (patrick@georgi-clan.de)
gerrit at coreboot.org
Sat Dec 21 10:54:35 CET 2013
Patrick Georgi (patrick at georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4455
-gerrit
commit 79f1bf4420197ef258653bc74c8d03878c7df7f5
Author: Duncan Laurie <dlaurie at chromium.org>
Date: Fri Aug 9 07:55:10 2013 -0700
Add Kconfig options to override Subsystem Vendor and Device ID
These can typically be set in the devicetree but we need a way to
override those values with a Kconfig setting so as not to expose
the Vendor ID before the product has launched.
Change-Id: Ib382e6d9359d24b128c693a657ffde52604efad3
Signed-off-by: Duncan Laurie <dlaurie at chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/65310
Reviewed-by: Aaron Durbin <adurbin at chromium.org>
---
src/device/Kconfig | 16 ++++++++++++++++
src/device/pci_device.c | 4 ++++
2 files changed, 20 insertions(+)
diff --git a/src/device/Kconfig b/src/device/Kconfig
index 4087f6f..adbe40f 100644
--- a/src/device/Kconfig
+++ b/src/device/Kconfig
@@ -503,3 +503,19 @@ config PXE_ROM_ID
Under GNU/Linux you can run `lspci -nn` to list the IDs of your PCI devices.
endmenu
+
+config SUBSYSTEM_VENDOR_ID
+ hex "Override PCI Subsystem Vendor ID"
+ depends on PCI
+ default "0x0000"
+ help
+ This config option will override the devicetree settings for
+ PCI Subsystem Vendor ID.
+
+config SUBSYSTEM_DEVICE_ID
+ hex "Override PCI Subsystem Device ID"
+ depends on PCI
+ default "0x0000"
+ help
+ This config option will override the devicetree settings for
+ PCI Subsystem Device ID.
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index 1d998ca..c810483 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -599,6 +599,10 @@ void pci_dev_enable_resources(struct device *dev)
/* Set the subsystem vendor and device ID for mainboard devices. */
ops = ops_pci(dev);
if (dev->on_mainboard && ops && ops->set_subsystem) {
+ if (CONFIG_SUBSYSTEM_VENDOR_ID)
+ dev->subsystem_vendor = CONFIG_SUBSYSTEM_VENDOR_ID;
+ if (CONFIG_SUBSYSTEM_DEVICE_ID)
+ dev->subsystem_device = CONFIG_SUBSYSTEM_DEVICE_ID;
printk(BIOS_DEBUG, "%s subsystem <- %04x/%04x\n",
dev_path(dev), dev->subsystem_vendor,
dev->subsystem_device);
More information about the coreboot-gerrit
mailing list