[settings] Expose PCI configuration space via settings mechanism

Allow values to be read from PCI configuration space using the syntax

  ${pci/<busdevfn>.<offset>.<length>}

where <busdevfn> is the bus:dev.fn address of the PCI device
(expressed as a single integer, as returned by ${net0/busloc}),
<offset> is the offset within PCI configuration space, and <length> 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 <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2013-07-09 16:03:35 +01:00
parent 258195242b
commit dbfa13ff2c
4 changed files with 129 additions and 0 deletions

View File

@@ -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

View File

@@ -9,6 +9,7 @@
FILE_LICENCE ( GPL2_OR_LATER );
#define PCI_SETTINGS /* PCI device settings */
//#define VMWARE_SETTINGS /* VMware GuestInfo settings */
#include <config/local/settings.h>