diff options
author | Michael Brown | 2008-12-04 05:04:54 +0100 |
---|---|---|
committer | Michael Brown | 2008-12-05 00:18:32 +0100 |
commit | 045a22764afd75a0b887c7da6828d683c303ebb4 (patch) | |
tree | efc4200715d98d0b2bbfd167c1293ba7eb95669e /src/include | |
parent | [hermon] Add PCI ID for ConnectX QDR card (diff) | |
download | ipxe-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.h | 33 |
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 |