Bridge more gaps between EDK and gnu-efi

This patch adds a few more items to facilitate porting
from EDK to gnu-efi.
It also adds updated PE machine types and fixes a discrepancy
for EVT_EFI_SIGNAL_MAX.

Signed-off-by: Pete Batard <pete@akeo.ie>
Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
This commit is contained in:
Nigel Croxon 2016-09-15 11:41:45 -04:00
parent 751cbce3f6
commit 9cdd67da85
3 changed files with 43 additions and 10 deletions

View File

@ -107,8 +107,6 @@ EFI_STATUS
// EFI Events
//
#define EVT_TIMER 0x80000000
#define EVT_RUNTIME 0x40000000
#define EVT_RUNTIME_CONTEXT 0x20000000
@ -120,7 +118,18 @@ EFI_STATUS
#define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202
#define EVT_EFI_SIGNAL_MASK 0x000000FF
#define EVT_EFI_SIGNAL_MAX 2
#define EVT_EFI_SIGNAL_MAX 4
#define EFI_EVENT_TIMER EVT_TIMER
#define EFI_EVENT_RUNTIME EVT_RUNTIME
#define EFI_EVENT_RUNTIME_CONTEXT EVT_RUNTIME_CONTEXT
#define EFI_EVENT_NOTIFY_WAIT EVT_NOTIFY_WAIT
#define EFI_EVENT_NOTIFY_SIGNAL EVT_NOTIFY_SIGNAL
#define EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES EVT_SIGNAL_EXIT_BOOT_SERVICES
#define EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE
#define EFI_EVENT_EFI_SIGNAL_MASK EVT_EFI_SIGNAL_MASK
#define EFI_EVENT_EFI_SIGNAL_MAX EVT_EFI_SIGNAL_MAX
typedef
VOID
@ -184,11 +193,14 @@ EFI_STATUS
// Task priority level
//
#define TPL_APPLICATION 4
#define TPL_CALLBACK 8
#define TPL_NOTIFY 16
#define TPL_HIGH_LEVEL 31
#define TPL_APPLICATION 4
#define TPL_CALLBACK 8
#define TPL_NOTIFY 16
#define TPL_HIGH_LEVEL 31
#define EFI_TPL_APPLICATION TPL_APPLICATION
#define EFI_TPL_CALLBACK TPL_CALLBACK
#define EFI_TPL_NOTIFY TPL_NOTIFY
#define EFI_TPL_HIGH_LEVEL TPL_HIGH_LEVEL
typedef
EFI_TPL
(EFIAPI *EFI_RAISE_TPL) (
@ -314,6 +326,22 @@ EFI_STATUS
#define EFI_IMAGE_MACHINE_IA64 0x0200
#endif
#if !defined(EFI_IMAGE_MACHINE_EBC)
#define EFI_IMAGE_MACHINE_EBC 0x0EBC
#endif
#if !defined(EFI_IMAGE_MACHINE_X64)
#define EFI_IMAGE_MACHINE_X64 0x8664
#endif
#if !defined(EFI_IMAGE_MACHINE_ARMTHUMB_MIXED)
#define EFI_IMAGE_MACHINE_ARMTHUMB_MIXED 0x01C2
#endif
#if !defined(EFI_IMAGE_MACHINE_AARCH64)
#define EFI_IMAGE_MACHINE_AARCH64 0xAA64
#endif
// Image Entry prototype
typedef

View File

@ -150,7 +150,7 @@ typedef struct _SIMPLE_TEXT_OUTPUT_INTERFACE {
// Current mode
SIMPLE_TEXT_OUTPUT_MODE *Mode;
} SIMPLE_TEXT_OUTPUT_INTERFACE;
} SIMPLE_TEXT_OUTPUT_INTERFACE, EFI_SIMPLE_TEXT_OUT_PROTOCOL;
//
// Define's for required EFI Unicode Box Draw character
@ -278,6 +278,8 @@ typedef struct {
#define SCAN_F8 0x0012
#define SCAN_F9 0x0013
#define SCAN_F10 0x0014
#define SCAN_F11 0x0015
#define SCAN_F12 0x0016
#define SCAN_ESC 0x0017
typedef
@ -298,7 +300,7 @@ typedef struct _SIMPLE_INPUT_INTERFACE {
EFI_INPUT_RESET Reset;
EFI_INPUT_READ_KEY ReadKeyStroke;
EFI_EVENT WaitForKey;
} SIMPLE_INPUT_INTERFACE;
} SIMPLE_INPUT_INTERFACE, EFI_SIMPLE_TEXT_IN_PROTOCOL;
#endif

View File

@ -33,8 +33,11 @@ Revision History
//
extern EFI_SYSTEM_TABLE *ST;
#define gST ST
extern EFI_BOOT_SERVICES *BS;
#define gBS BS
extern EFI_RUNTIME_SERVICES *RT;
#define gRT RT
extern EFI_GUID gEfiDevicePathProtocolGuid;
#define DevicePathProtocol gEfiDevicePathProtocolGuid