summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2008-12-04 05:04:54 +0100
committerMichael Brown2008-12-05 00:18:32 +0100
commit045a22764afd75a0b887c7da6828d683c303ebb4 (patch)
treeefc4200715d98d0b2bbfd167c1293ba7eb95669e /src/include
parent[hermon] Add PCI ID for ConnectX QDR card (diff)
downloadipxe-045a22764afd75a0b887c7da6828d683c303ebb4.tar.gz
ipxe-045a22764afd75a0b887c7da6828d683c303ebb4.tar.xz
ipxe-045a22764afd75a0b887c7da6828d683c303ebb4.zip
[efi] Allow use of EFI configuration tables
EFI passes in copies of SMBIOS and other system configuration tables via the EFI system table. Allow configuration tables to be requested using a mechanism similar to the current method for requesting EFI protocols.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gpxe/efi/efi.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/include/gpxe/efi/efi.h b/src/include/gpxe/efi/efi.h
index 8c9f789a..b46d5ca5 100644
--- a/src/include/gpxe/efi/efi.h
+++ b/src/include/gpxe/efi/efi.h
@@ -43,6 +43,7 @@
/** An EFI protocol used by gPXE */
struct efi_protocol {
+ /** GUID */
union {
/** EFI protocol GUID */
EFI_GUID guid;
@@ -70,6 +71,38 @@ struct efi_protocol {
(_ptr) : (_ptr) ) ), \
}
+/** An EFI configuration table used by gPXE */
+struct efi_config_table {
+ /** GUID */
+ union {
+ /** EFI configuration table GUID */
+ EFI_GUID guid;
+ /** UUID structure understood by gPXE */
+ union uuid uuid;
+ } u;
+ /** Variable containing pointer to configuration table */
+ void **table;
+ /** Table is required for operation */
+ int required;
+};
+
+/** Declare an EFI configuration table used by gPXE */
+#define __efi_config_table \
+ __table ( struct efi_config_table, efi_config_tables, 01 )
+
+/** Declare an EFI configuration table to be used by gPXE
+ *
+ * @v _table EFI configuration table name
+ * @v _ptr Pointer to configuration table
+ * @v _required Table is required for operation
+ */
+#define EFI_USE_TABLE( _table, _ptr, _required ) \
+ struct efi_config_table __ ## _table __efi_config_table = { \
+ .u.guid = _table ## _GUID, \
+ .table = ( ( void ** ) ( void * ) (_ptr) ), \
+ .required = (_required), \
+ }
+
/** Convert a gPXE status code to an EFI status code
*
* FIXME: actually perform some kind of conversion. gPXE error codes