aboutsummaryrefslogtreecommitdiffstats
path: root/gpxe/src/include/gpxe/efi
diff options
context:
space:
mode:
Diffstat (limited to 'gpxe/src/include/gpxe/efi')
-rw-r--r--gpxe/src/include/gpxe/efi/efi.h21
-rw-r--r--gpxe/src/include/gpxe/efi/efi_io.h2
-rw-r--r--gpxe/src/include/gpxe/efi/efi_pci.h2
-rw-r--r--gpxe/src/include/gpxe/efi/efi_smbios.h2
-rw-r--r--gpxe/src/include/gpxe/efi/efi_timer.h2
-rw-r--r--gpxe/src/include/gpxe/efi/efi_uaccess.h2
-rw-r--r--gpxe/src/include/gpxe/efi/efi_umalloc.h2
7 files changed, 28 insertions, 5 deletions
diff --git a/gpxe/src/include/gpxe/efi/efi.h b/gpxe/src/include/gpxe/efi/efi.h
index c7f63b6c..f4459b74 100644
--- a/gpxe/src/include/gpxe/efi/efi.h
+++ b/gpxe/src/include/gpxe/efi/efi.h
@@ -31,11 +31,17 @@
/* EFI headers rudely redefine NULL */
#undef NULL
+/* EFI headers expect ICC to define __GNUC__ */
+#if defined ( __ICC ) && ! defined ( __GNUC__ )
+#define __GNUC__ 1
+#endif
+
/* Include the top-level EFI header files */
#include <gpxe/efi/Uefi.h>
#include <gpxe/efi/PiDxe.h>
/* Reset any trailing #pragma pack directives */
+#pragma pack(1)
#pragma pack()
#include <gpxe/tables.h>
@@ -54,9 +60,11 @@ struct efi_protocol {
void **protocol;
};
+/** EFI protocol table */
+#define EFI_PROTOCOLS __table ( struct efi_protocol, "efi_protocols" )
+
/** Declare an EFI protocol used by gPXE */
-#define __efi_protocol \
- __table ( struct efi_protocol, efi_protocols, 01 )
+#define __efi_protocol __table_entry ( EFI_PROTOCOLS, 01 )
/** Declare an EFI protocol to be required by gPXE
*
@@ -67,7 +75,7 @@ struct efi_protocol {
struct efi_protocol __ ## _protocol __efi_protocol = { \
.u.guid = _protocol ## _GUID, \
.protocol = ( ( void ** ) ( void * ) \
- ( ( (_ptr) == ( ( _protocol ** ) NULL ) ) ? \
+ ( ( (_ptr) == ( ( _protocol ** ) (_ptr) ) ) ? \
(_ptr) : (_ptr) ) ), \
}
@@ -86,9 +94,12 @@ struct efi_config_table {
int required;
};
+/** EFI configuration table table */
+#define EFI_CONFIG_TABLES \
+ __table ( struct efi_config_table, "efi_config_tables" )
+
/** Declare an EFI configuration table used by gPXE */
-#define __efi_config_table \
- __table ( struct efi_config_table, efi_config_tables, 01 )
+#define __efi_config_table __table_entry ( EFI_CONFIG_TABLES, 01 )
/** Declare an EFI configuration table to be used by gPXE
*
diff --git a/gpxe/src/include/gpxe/efi/efi_io.h b/gpxe/src/include/gpxe/efi/efi_io.h
index 93f559db..7ad5ffe7 100644
--- a/gpxe/src/include/gpxe/efi/efi_io.h
+++ b/gpxe/src/include/gpxe/efi/efi_io.h
@@ -10,6 +10,8 @@
* no-ops. I/O is handled using the EFI_CPU_IO_PROTOCOL.
*/
+FILE_LICENCE ( GPL2_OR_LATER );
+
#ifdef IOAPI_EFI
#define IOAPI_PREFIX_efi
#else
diff --git a/gpxe/src/include/gpxe/efi/efi_pci.h b/gpxe/src/include/gpxe/efi/efi_pci.h
index 8be331ab..59c0eb1d 100644
--- a/gpxe/src/include/gpxe/efi/efi_pci.h
+++ b/gpxe/src/include/gpxe/efi/efi_pci.h
@@ -7,6 +7,8 @@
*
*/
+FILE_LICENCE ( GPL2_OR_LATER );
+
#ifdef PCIAPI_EFI
#define PCIAPI_PREFIX_efi
#else
diff --git a/gpxe/src/include/gpxe/efi/efi_smbios.h b/gpxe/src/include/gpxe/efi/efi_smbios.h
index df947de5..01631e52 100644
--- a/gpxe/src/include/gpxe/efi/efi_smbios.h
+++ b/gpxe/src/include/gpxe/efi/efi_smbios.h
@@ -7,6 +7,8 @@
*
*/
+FILE_LICENCE ( GPL2_OR_LATER );
+
#ifdef SMBIOS_EFI
#define SMBIOS_PREFIX_efi
#else
diff --git a/gpxe/src/include/gpxe/efi/efi_timer.h b/gpxe/src/include/gpxe/efi/efi_timer.h
index c332c9d6..e0531d5a 100644
--- a/gpxe/src/include/gpxe/efi/efi_timer.h
+++ b/gpxe/src/include/gpxe/efi/efi_timer.h
@@ -7,6 +7,8 @@
*
*/
+FILE_LICENCE ( GPL2_OR_LATER );
+
#ifdef TIMER_EFI
#define TIMER_PREFIX_efi
#else
diff --git a/gpxe/src/include/gpxe/efi/efi_uaccess.h b/gpxe/src/include/gpxe/efi/efi_uaccess.h
index bae5fb41..a6b61c58 100644
--- a/gpxe/src/include/gpxe/efi/efi_uaccess.h
+++ b/gpxe/src/include/gpxe/efi/efi_uaccess.h
@@ -10,6 +10,8 @@
* no-ops.
*/
+FILE_LICENCE ( GPL2_OR_LATER );
+
#ifdef UACCESS_EFI
#define UACCESS_PREFIX_efi
#else
diff --git a/gpxe/src/include/gpxe/efi/efi_umalloc.h b/gpxe/src/include/gpxe/efi/efi_umalloc.h
index def17b2d..0388dd10 100644
--- a/gpxe/src/include/gpxe/efi/efi_umalloc.h
+++ b/gpxe/src/include/gpxe/efi/efi_umalloc.h
@@ -7,6 +7,8 @@
*
*/
+FILE_LICENCE ( GPL2_OR_LATER );
+
#ifdef UMALLOC_EFI
#define UMALLOC_PREFIX_efi
#else