From dbfa13ff2cd7eb313d002f185f0274f2ac883231 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 9 Jul 2013 16:03:35 +0100 Subject: [settings] Expose PCI configuration space via settings mechanism Allow values to be read from PCI configuration space using the syntax ${pci/..} where is the bus:dev.fn address of the PCI device (expressed as a single integer, as returned by ${net0/busloc}), is the offset within PCI configuration space, and is the length within PCI configuration space. Values are returned in reverse byte order, since PCI configuration space is little-endian by definition. Signed-off-by: Michael Brown --- src/config/config.c | 3 +++ src/config/settings.h | 1 + 2 files changed, 4 insertions(+) (limited to 'src/config') diff --git a/src/config/config.c b/src/config/config.c index 15d57d1e7..1de3db43f 100644 --- a/src/config/config.c +++ b/src/config/config.c @@ -298,6 +298,9 @@ REQUIRE_OBJECT ( efi_bofm ); /* * Drag in relevant settings sources */ +#ifdef PCI_SETTINGS +REQUIRE_OBJECT ( pci_settings ); +#endif #ifdef VMWARE_SETTINGS REQUIRE_OBJECT ( guestinfo ); #endif diff --git a/src/config/settings.h b/src/config/settings.h index 331c7e3ab..9c5c2d20b 100644 --- a/src/config/settings.h +++ b/src/config/settings.h @@ -9,6 +9,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); +#define PCI_SETTINGS /* PCI device settings */ //#define VMWARE_SETTINGS /* VMware GuestInfo settings */ #include -- cgit v1.2.3-55-g7522