1530d68baSNigel Croxon #ifndef _EFI_API_H 2530d68baSNigel Croxon #define _EFI_API_H 3530d68baSNigel Croxon 4530d68baSNigel Croxon /*++ 5530d68baSNigel Croxon 6530d68baSNigel Croxon Copyright (c) 1998 Intel Corporation 7530d68baSNigel Croxon 8530d68baSNigel Croxon Module Name: 9530d68baSNigel Croxon 10530d68baSNigel Croxon efiapi.h 11530d68baSNigel Croxon 12530d68baSNigel Croxon Abstract: 13530d68baSNigel Croxon 14530d68baSNigel Croxon Global EFI runtime & boot service interfaces 15530d68baSNigel Croxon 16530d68baSNigel Croxon 17530d68baSNigel Croxon 18530d68baSNigel Croxon 19530d68baSNigel Croxon Revision History 20530d68baSNigel Croxon 21530d68baSNigel Croxon --*/ 22530d68baSNigel Croxon 23530d68baSNigel Croxon // 24530d68baSNigel Croxon // EFI Specification Revision 25530d68baSNigel Croxon // 26530d68baSNigel Croxon 27530d68baSNigel Croxon #define EFI_SPECIFICATION_MAJOR_REVISION 1 28530d68baSNigel Croxon #define EFI_SPECIFICATION_MINOR_REVISION 02 29530d68baSNigel Croxon 30530d68baSNigel Croxon // 31530d68baSNigel Croxon // Declare forward referenced data structures 32530d68baSNigel Croxon // 33530d68baSNigel Croxon 34530d68baSNigel Croxon INTERFACE_DECL(_EFI_SYSTEM_TABLE); 35530d68baSNigel Croxon 36530d68baSNigel Croxon // 37530d68baSNigel Croxon // EFI Memory 38530d68baSNigel Croxon // 39530d68baSNigel Croxon 40530d68baSNigel Croxon typedef 41530d68baSNigel Croxon EFI_STATUS 42530d68baSNigel Croxon (EFIAPI *EFI_ALLOCATE_PAGES) ( 43530d68baSNigel Croxon IN EFI_ALLOCATE_TYPE Type, 44530d68baSNigel Croxon IN EFI_MEMORY_TYPE MemoryType, 45530d68baSNigel Croxon IN UINTN NoPages, 46530d68baSNigel Croxon OUT EFI_PHYSICAL_ADDRESS *Memory 47530d68baSNigel Croxon ); 48530d68baSNigel Croxon 49530d68baSNigel Croxon typedef 50530d68baSNigel Croxon EFI_STATUS 51530d68baSNigel Croxon (EFIAPI *EFI_FREE_PAGES) ( 52530d68baSNigel Croxon IN EFI_PHYSICAL_ADDRESS Memory, 53530d68baSNigel Croxon IN UINTN NoPages 54530d68baSNigel Croxon ); 55530d68baSNigel Croxon 56530d68baSNigel Croxon typedef 57530d68baSNigel Croxon EFI_STATUS 58530d68baSNigel Croxon (EFIAPI *EFI_GET_MEMORY_MAP) ( 59530d68baSNigel Croxon IN OUT UINTN *MemoryMapSize, 60530d68baSNigel Croxon IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap, 61530d68baSNigel Croxon OUT UINTN *MapKey, 62530d68baSNigel Croxon OUT UINTN *DescriptorSize, 63530d68baSNigel Croxon OUT UINT32 *DescriptorVersion 64530d68baSNigel Croxon ); 65530d68baSNigel Croxon 66530d68baSNigel Croxon #define NextMemoryDescriptor(Ptr,Size) ((EFI_MEMORY_DESCRIPTOR *) (((UINT8 *) Ptr) + Size)) 67530d68baSNigel Croxon 68530d68baSNigel Croxon 69530d68baSNigel Croxon typedef 70530d68baSNigel Croxon EFI_STATUS 71530d68baSNigel Croxon (EFIAPI *EFI_ALLOCATE_POOL) ( 72530d68baSNigel Croxon IN EFI_MEMORY_TYPE PoolType, 73530d68baSNigel Croxon IN UINTN Size, 74530d68baSNigel Croxon OUT VOID **Buffer 75530d68baSNigel Croxon ); 76530d68baSNigel Croxon 77530d68baSNigel Croxon typedef 78530d68baSNigel Croxon EFI_STATUS 79530d68baSNigel Croxon (EFIAPI *EFI_FREE_POOL) ( 80530d68baSNigel Croxon IN VOID *Buffer 81530d68baSNigel Croxon ); 82530d68baSNigel Croxon 83530d68baSNigel Croxon typedef 84530d68baSNigel Croxon EFI_STATUS 85530d68baSNigel Croxon (EFIAPI *EFI_SET_VIRTUAL_ADDRESS_MAP) ( 86530d68baSNigel Croxon IN UINTN MemoryMapSize, 87530d68baSNigel Croxon IN UINTN DescriptorSize, 88530d68baSNigel Croxon IN UINT32 DescriptorVersion, 89530d68baSNigel Croxon IN EFI_MEMORY_DESCRIPTOR *VirtualMap 90530d68baSNigel Croxon ); 91530d68baSNigel Croxon 92530d68baSNigel Croxon 93530d68baSNigel Croxon #define EFI_OPTIONAL_PTR 0x00000001 94530d68baSNigel Croxon #define EFI_INTERNAL_FNC 0x00000002 // Pointer to internal runtime fnc 95530d68baSNigel Croxon #define EFI_INTERNAL_PTR 0x00000004 // Pointer to internal runtime data 96530d68baSNigel Croxon 97530d68baSNigel Croxon 98530d68baSNigel Croxon typedef 99530d68baSNigel Croxon EFI_STATUS 100530d68baSNigel Croxon (EFIAPI *EFI_CONVERT_POINTER) ( 101530d68baSNigel Croxon IN UINTN DebugDisposition, 102530d68baSNigel Croxon IN OUT VOID **Address 103530d68baSNigel Croxon ); 104530d68baSNigel Croxon 105530d68baSNigel Croxon 106530d68baSNigel Croxon // 107530d68baSNigel Croxon // EFI Events 108530d68baSNigel Croxon // 109530d68baSNigel Croxon 110530d68baSNigel Croxon #define EVT_TIMER 0x80000000 111530d68baSNigel Croxon #define EVT_RUNTIME 0x40000000 112530d68baSNigel Croxon #define EVT_RUNTIME_CONTEXT 0x20000000 113530d68baSNigel Croxon 114530d68baSNigel Croxon #define EVT_NOTIFY_WAIT 0x00000100 115530d68baSNigel Croxon #define EVT_NOTIFY_SIGNAL 0x00000200 116530d68baSNigel Croxon 117530d68baSNigel Croxon #define EVT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201 118530d68baSNigel Croxon #define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202 119530d68baSNigel Croxon 120530d68baSNigel Croxon #define EVT_EFI_SIGNAL_MASK 0x000000FF 1219cdd67daSNigel Croxon #define EVT_EFI_SIGNAL_MAX 4 1229cdd67daSNigel Croxon 1239cdd67daSNigel Croxon #define EFI_EVENT_TIMER EVT_TIMER 1249cdd67daSNigel Croxon #define EFI_EVENT_RUNTIME EVT_RUNTIME 1259cdd67daSNigel Croxon #define EFI_EVENT_RUNTIME_CONTEXT EVT_RUNTIME_CONTEXT 1269cdd67daSNigel Croxon #define EFI_EVENT_NOTIFY_WAIT EVT_NOTIFY_WAIT 1279cdd67daSNigel Croxon #define EFI_EVENT_NOTIFY_SIGNAL EVT_NOTIFY_SIGNAL 1289cdd67daSNigel Croxon #define EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES EVT_SIGNAL_EXIT_BOOT_SERVICES 1299cdd67daSNigel Croxon #define EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 1309cdd67daSNigel Croxon #define EFI_EVENT_EFI_SIGNAL_MASK EVT_EFI_SIGNAL_MASK 1319cdd67daSNigel Croxon #define EFI_EVENT_EFI_SIGNAL_MAX EVT_EFI_SIGNAL_MAX 1329cdd67daSNigel Croxon 133530d68baSNigel Croxon 134530d68baSNigel Croxon typedef 135530d68baSNigel Croxon VOID 136530d68baSNigel Croxon (EFIAPI *EFI_EVENT_NOTIFY) ( 137530d68baSNigel Croxon IN EFI_EVENT Event, 138530d68baSNigel Croxon IN VOID *Context 139530d68baSNigel Croxon ); 140530d68baSNigel Croxon 141530d68baSNigel Croxon typedef 142530d68baSNigel Croxon EFI_STATUS 143530d68baSNigel Croxon (EFIAPI *EFI_CREATE_EVENT) ( 144530d68baSNigel Croxon IN UINT32 Type, 145530d68baSNigel Croxon IN EFI_TPL NotifyTpl, 146530d68baSNigel Croxon IN EFI_EVENT_NOTIFY NotifyFunction, 147530d68baSNigel Croxon IN VOID *NotifyContext, 148530d68baSNigel Croxon OUT EFI_EVENT *Event 149530d68baSNigel Croxon ); 150530d68baSNigel Croxon 151530d68baSNigel Croxon typedef enum { 152530d68baSNigel Croxon TimerCancel, 153530d68baSNigel Croxon TimerPeriodic, 154530d68baSNigel Croxon TimerRelative, 155530d68baSNigel Croxon TimerTypeMax 156530d68baSNigel Croxon } EFI_TIMER_DELAY; 157530d68baSNigel Croxon 158530d68baSNigel Croxon typedef 159530d68baSNigel Croxon EFI_STATUS 160530d68baSNigel Croxon (EFIAPI *EFI_SET_TIMER) ( 161530d68baSNigel Croxon IN EFI_EVENT Event, 162530d68baSNigel Croxon IN EFI_TIMER_DELAY Type, 163530d68baSNigel Croxon IN UINT64 TriggerTime 164530d68baSNigel Croxon ); 165530d68baSNigel Croxon 166530d68baSNigel Croxon typedef 167530d68baSNigel Croxon EFI_STATUS 168530d68baSNigel Croxon (EFIAPI *EFI_SIGNAL_EVENT) ( 169530d68baSNigel Croxon IN EFI_EVENT Event 170530d68baSNigel Croxon ); 171530d68baSNigel Croxon 172530d68baSNigel Croxon typedef 173530d68baSNigel Croxon EFI_STATUS 174530d68baSNigel Croxon (EFIAPI *EFI_WAIT_FOR_EVENT) ( 175530d68baSNigel Croxon IN UINTN NumberOfEvents, 176530d68baSNigel Croxon IN EFI_EVENT *Event, 177530d68baSNigel Croxon OUT UINTN *Index 178530d68baSNigel Croxon ); 179530d68baSNigel Croxon 180530d68baSNigel Croxon typedef 181530d68baSNigel Croxon EFI_STATUS 182530d68baSNigel Croxon (EFIAPI *EFI_CLOSE_EVENT) ( 183530d68baSNigel Croxon IN EFI_EVENT Event 184530d68baSNigel Croxon ); 185530d68baSNigel Croxon 186530d68baSNigel Croxon typedef 187530d68baSNigel Croxon EFI_STATUS 188530d68baSNigel Croxon (EFIAPI *EFI_CHECK_EVENT) ( 189530d68baSNigel Croxon IN EFI_EVENT Event 190530d68baSNigel Croxon ); 191530d68baSNigel Croxon 192530d68baSNigel Croxon // 193530d68baSNigel Croxon // Task priority level 194530d68baSNigel Croxon // 195530d68baSNigel Croxon 196530d68baSNigel Croxon #define TPL_APPLICATION 4 197530d68baSNigel Croxon #define TPL_CALLBACK 8 198530d68baSNigel Croxon #define TPL_NOTIFY 16 199530d68baSNigel Croxon #define TPL_HIGH_LEVEL 31 2009cdd67daSNigel Croxon #define EFI_TPL_APPLICATION TPL_APPLICATION 2019cdd67daSNigel Croxon #define EFI_TPL_CALLBACK TPL_CALLBACK 2029cdd67daSNigel Croxon #define EFI_TPL_NOTIFY TPL_NOTIFY 2039cdd67daSNigel Croxon #define EFI_TPL_HIGH_LEVEL TPL_HIGH_LEVEL 204530d68baSNigel Croxon typedef 205530d68baSNigel Croxon EFI_TPL 206530d68baSNigel Croxon (EFIAPI *EFI_RAISE_TPL) ( 207530d68baSNigel Croxon IN EFI_TPL NewTpl 208530d68baSNigel Croxon ); 209530d68baSNigel Croxon 210530d68baSNigel Croxon typedef 211530d68baSNigel Croxon VOID 212530d68baSNigel Croxon (EFIAPI *EFI_RESTORE_TPL) ( 213530d68baSNigel Croxon IN EFI_TPL OldTpl 214530d68baSNigel Croxon ); 215530d68baSNigel Croxon 216530d68baSNigel Croxon 217530d68baSNigel Croxon // 218530d68baSNigel Croxon // EFI platform varibles 219530d68baSNigel Croxon // 220530d68baSNigel Croxon 221530d68baSNigel Croxon #define EFI_GLOBAL_VARIABLE \ 222530d68baSNigel Croxon { 0x8BE4DF61, 0x93CA, 0x11d2, {0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C} } 223530d68baSNigel Croxon 224530d68baSNigel Croxon // Variable attributes 225530d68baSNigel Croxon #define EFI_VARIABLE_NON_VOLATILE 0x00000001 226530d68baSNigel Croxon #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002 227530d68baSNigel Croxon #define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004 228530d68baSNigel Croxon #define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008 229530d68baSNigel Croxon #define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010 230530d68baSNigel Croxon #define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020 231530d68baSNigel Croxon #define EFI_VARIABLE_APPEND_WRITE 0x00000040 232530d68baSNigel Croxon 233530d68baSNigel Croxon // Variable size limitation 234530d68baSNigel Croxon #define EFI_MAXIMUM_VARIABLE_SIZE 1024 235530d68baSNigel Croxon 236530d68baSNigel Croxon typedef 237530d68baSNigel Croxon EFI_STATUS 238530d68baSNigel Croxon (EFIAPI *EFI_GET_VARIABLE) ( 239530d68baSNigel Croxon IN CHAR16 *VariableName, 240530d68baSNigel Croxon IN EFI_GUID *VendorGuid, 241530d68baSNigel Croxon OUT UINT32 *Attributes OPTIONAL, 242530d68baSNigel Croxon IN OUT UINTN *DataSize, 243530d68baSNigel Croxon OUT VOID *Data 244530d68baSNigel Croxon ); 245530d68baSNigel Croxon 246530d68baSNigel Croxon typedef 247530d68baSNigel Croxon EFI_STATUS 248530d68baSNigel Croxon (EFIAPI *EFI_GET_NEXT_VARIABLE_NAME) ( 249530d68baSNigel Croxon IN OUT UINTN *VariableNameSize, 250530d68baSNigel Croxon IN OUT CHAR16 *VariableName, 251530d68baSNigel Croxon IN OUT EFI_GUID *VendorGuid 252530d68baSNigel Croxon ); 253530d68baSNigel Croxon 254530d68baSNigel Croxon 255530d68baSNigel Croxon typedef 256530d68baSNigel Croxon EFI_STATUS 257530d68baSNigel Croxon (EFIAPI *EFI_SET_VARIABLE) ( 258530d68baSNigel Croxon IN CHAR16 *VariableName, 259530d68baSNigel Croxon IN EFI_GUID *VendorGuid, 260530d68baSNigel Croxon IN UINT32 Attributes, 261530d68baSNigel Croxon IN UINTN DataSize, 262530d68baSNigel Croxon IN VOID *Data 263530d68baSNigel Croxon ); 264530d68baSNigel Croxon 265530d68baSNigel Croxon 266530d68baSNigel Croxon // 267530d68baSNigel Croxon // EFI Time 268530d68baSNigel Croxon // 269530d68baSNigel Croxon 270530d68baSNigel Croxon typedef struct { 271530d68baSNigel Croxon UINT32 Resolution; // 1e-6 parts per million 272530d68baSNigel Croxon UINT32 Accuracy; // hertz 273530d68baSNigel Croxon BOOLEAN SetsToZero; // Set clears sub-second time 274530d68baSNigel Croxon } EFI_TIME_CAPABILITIES; 275530d68baSNigel Croxon 276530d68baSNigel Croxon 277530d68baSNigel Croxon typedef 278530d68baSNigel Croxon EFI_STATUS 279530d68baSNigel Croxon (EFIAPI *EFI_GET_TIME) ( 280530d68baSNigel Croxon OUT EFI_TIME *Time, 281530d68baSNigel Croxon OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL 282530d68baSNigel Croxon ); 283530d68baSNigel Croxon 284530d68baSNigel Croxon typedef 285530d68baSNigel Croxon EFI_STATUS 286530d68baSNigel Croxon (EFIAPI *EFI_SET_TIME) ( 287530d68baSNigel Croxon IN EFI_TIME *Time 288530d68baSNigel Croxon ); 289530d68baSNigel Croxon 290530d68baSNigel Croxon typedef 291530d68baSNigel Croxon EFI_STATUS 292530d68baSNigel Croxon (EFIAPI *EFI_GET_WAKEUP_TIME) ( 293530d68baSNigel Croxon OUT BOOLEAN *Enabled, 294530d68baSNigel Croxon OUT BOOLEAN *Pending, 295530d68baSNigel Croxon OUT EFI_TIME *Time 296530d68baSNigel Croxon ); 297530d68baSNigel Croxon 298530d68baSNigel Croxon typedef 299530d68baSNigel Croxon EFI_STATUS 300530d68baSNigel Croxon (EFIAPI *EFI_SET_WAKEUP_TIME) ( 301530d68baSNigel Croxon IN BOOLEAN Enable, 302530d68baSNigel Croxon IN EFI_TIME *Time OPTIONAL 303530d68baSNigel Croxon ); 304530d68baSNigel Croxon 305530d68baSNigel Croxon 306530d68baSNigel Croxon // 307530d68baSNigel Croxon // Image functions 308530d68baSNigel Croxon // 309530d68baSNigel Croxon 310530d68baSNigel Croxon 311530d68baSNigel Croxon // PE32+ Subsystem type for EFI images 312530d68baSNigel Croxon 313530d68baSNigel Croxon #if !defined(IMAGE_SUBSYSTEM_EFI_APPLICATION) 314530d68baSNigel Croxon #define IMAGE_SUBSYSTEM_EFI_APPLICATION 10 315530d68baSNigel Croxon #define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11 316530d68baSNigel Croxon #define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12 317530d68baSNigel Croxon #endif 318530d68baSNigel Croxon 319530d68baSNigel Croxon // PE32+ Machine type for EFI images 320530d68baSNigel Croxon 321530d68baSNigel Croxon #if !defined(EFI_IMAGE_MACHINE_IA32) 322530d68baSNigel Croxon #define EFI_IMAGE_MACHINE_IA32 0x014c 323530d68baSNigel Croxon #endif 324530d68baSNigel Croxon 325530d68baSNigel Croxon #if !defined(EFI_IMAGE_MACHINE_IA64) 326530d68baSNigel Croxon #define EFI_IMAGE_MACHINE_IA64 0x0200 327530d68baSNigel Croxon #endif 328530d68baSNigel Croxon 3299cdd67daSNigel Croxon #if !defined(EFI_IMAGE_MACHINE_EBC) 3309cdd67daSNigel Croxon #define EFI_IMAGE_MACHINE_EBC 0x0EBC 3319cdd67daSNigel Croxon #endif 3329cdd67daSNigel Croxon 3339cdd67daSNigel Croxon #if !defined(EFI_IMAGE_MACHINE_X64) 3349cdd67daSNigel Croxon #define EFI_IMAGE_MACHINE_X64 0x8664 3359cdd67daSNigel Croxon #endif 3369cdd67daSNigel Croxon 3379cdd67daSNigel Croxon #if !defined(EFI_IMAGE_MACHINE_ARMTHUMB_MIXED) 3389cdd67daSNigel Croxon #define EFI_IMAGE_MACHINE_ARMTHUMB_MIXED 0x01C2 3399cdd67daSNigel Croxon #endif 3409cdd67daSNigel Croxon 3419cdd67daSNigel Croxon #if !defined(EFI_IMAGE_MACHINE_AARCH64) 3429cdd67daSNigel Croxon #define EFI_IMAGE_MACHINE_AARCH64 0xAA64 3439cdd67daSNigel Croxon #endif 3449cdd67daSNigel Croxon 345530d68baSNigel Croxon // Image Entry prototype 346530d68baSNigel Croxon 347530d68baSNigel Croxon typedef 348530d68baSNigel Croxon EFI_STATUS 349530d68baSNigel Croxon (EFIAPI *EFI_IMAGE_ENTRY_POINT) ( 350530d68baSNigel Croxon IN EFI_HANDLE ImageHandle, 351530d68baSNigel Croxon IN struct _EFI_SYSTEM_TABLE *SystemTable 352530d68baSNigel Croxon ); 353530d68baSNigel Croxon 354530d68baSNigel Croxon typedef 355530d68baSNigel Croxon EFI_STATUS 356530d68baSNigel Croxon (EFIAPI *EFI_IMAGE_LOAD) ( 357530d68baSNigel Croxon IN BOOLEAN BootPolicy, 358530d68baSNigel Croxon IN EFI_HANDLE ParentImageHandle, 359530d68baSNigel Croxon IN EFI_DEVICE_PATH *FilePath, 360530d68baSNigel Croxon IN VOID *SourceBuffer OPTIONAL, 361530d68baSNigel Croxon IN UINTN SourceSize, 362530d68baSNigel Croxon OUT EFI_HANDLE *ImageHandle 363530d68baSNigel Croxon ); 364530d68baSNigel Croxon 365530d68baSNigel Croxon typedef 366530d68baSNigel Croxon EFI_STATUS 367530d68baSNigel Croxon (EFIAPI *EFI_IMAGE_START) ( 368530d68baSNigel Croxon IN EFI_HANDLE ImageHandle, 369530d68baSNigel Croxon OUT UINTN *ExitDataSize, 370530d68baSNigel Croxon OUT CHAR16 **ExitData OPTIONAL 371530d68baSNigel Croxon ); 372530d68baSNigel Croxon 373530d68baSNigel Croxon typedef 374530d68baSNigel Croxon EFI_STATUS 375530d68baSNigel Croxon (EFIAPI *EFI_EXIT) ( 376530d68baSNigel Croxon IN EFI_HANDLE ImageHandle, 377530d68baSNigel Croxon IN EFI_STATUS ExitStatus, 378530d68baSNigel Croxon IN UINTN ExitDataSize, 379530d68baSNigel Croxon IN CHAR16 *ExitData OPTIONAL 380530d68baSNigel Croxon ); 381530d68baSNigel Croxon 382530d68baSNigel Croxon 383530d68baSNigel Croxon // Image handle 3843b31a5e3SNigel Croxon /*#define LOADED_IMAGE_PROTOCOL \ 385530d68baSNigel Croxon { 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} } 386530d68baSNigel Croxon 387530d68baSNigel Croxon #define EFI_IMAGE_INFORMATION_REVISION 0x1000 388530d68baSNigel Croxon typedef struct { 389530d68baSNigel Croxon UINT32 Revision; 390530d68baSNigel Croxon EFI_HANDLE ParentHandle; 391530d68baSNigel Croxon struct _EFI_SYSTEM_TABLE *SystemTable; 392530d68baSNigel Croxon 393530d68baSNigel Croxon // Source location of image 394530d68baSNigel Croxon EFI_HANDLE DeviceHandle; 395530d68baSNigel Croxon EFI_DEVICE_PATH *FilePath; 396530d68baSNigel Croxon VOID *Reserved; 397530d68baSNigel Croxon 398530d68baSNigel Croxon // Images load options 399530d68baSNigel Croxon UINT32 LoadOptionsSize; 400530d68baSNigel Croxon VOID *LoadOptions; 401530d68baSNigel Croxon 402530d68baSNigel Croxon // Location of where image was loaded 403530d68baSNigel Croxon VOID *ImageBase; 404530d68baSNigel Croxon UINT64 ImageSize; 405530d68baSNigel Croxon EFI_MEMORY_TYPE ImageCodeType; 406530d68baSNigel Croxon EFI_MEMORY_TYPE ImageDataType; 407530d68baSNigel Croxon 408530d68baSNigel Croxon // If the driver image supports a dynamic unload request 409530d68baSNigel Croxon EFI_IMAGE_UNLOAD Unload; 410530d68baSNigel Croxon 4113b31a5e3SNigel Croxon } EFI_LOADED_IMAGE;*/ 412530d68baSNigel Croxon 413530d68baSNigel Croxon 414530d68baSNigel Croxon typedef 415530d68baSNigel Croxon EFI_STATUS 416530d68baSNigel Croxon (EFIAPI *EFI_EXIT_BOOT_SERVICES) ( 417530d68baSNigel Croxon IN EFI_HANDLE ImageHandle, 418530d68baSNigel Croxon IN UINTN MapKey 419530d68baSNigel Croxon ); 420530d68baSNigel Croxon 421530d68baSNigel Croxon // 422530d68baSNigel Croxon // Misc 423530d68baSNigel Croxon // 424530d68baSNigel Croxon 425530d68baSNigel Croxon 426530d68baSNigel Croxon typedef 427530d68baSNigel Croxon EFI_STATUS 428530d68baSNigel Croxon (EFIAPI *EFI_STALL) ( 429530d68baSNigel Croxon IN UINTN Microseconds 430530d68baSNigel Croxon ); 431530d68baSNigel Croxon 432530d68baSNigel Croxon typedef 433530d68baSNigel Croxon EFI_STATUS 434530d68baSNigel Croxon (EFIAPI *EFI_SET_WATCHDOG_TIMER) ( 435530d68baSNigel Croxon IN UINTN Timeout, 436530d68baSNigel Croxon IN UINT64 WatchdogCode, 437530d68baSNigel Croxon IN UINTN DataSize, 438530d68baSNigel Croxon IN CHAR16 *WatchdogData OPTIONAL 439530d68baSNigel Croxon ); 440530d68baSNigel Croxon 441530d68baSNigel Croxon typedef 442530d68baSNigel Croxon EFI_STATUS 443530d68baSNigel Croxon (EFIAPI *EFI_CONNECT_CONTROLLER) ( 444530d68baSNigel Croxon IN EFI_HANDLE ControllerHandle, 445530d68baSNigel Croxon IN EFI_HANDLE *DriverImageHandle OPTIONAL, 446530d68baSNigel Croxon IN EFI_DEVICE_PATH *RemainingDevicePath OPTIONAL, 447530d68baSNigel Croxon IN BOOLEAN Recursive 448530d68baSNigel Croxon ); 449530d68baSNigel Croxon 450530d68baSNigel Croxon typedef 451530d68baSNigel Croxon EFI_STATUS 452530d68baSNigel Croxon (EFIAPI *EFI_DISCONNECT_CONTROLLER) ( 453530d68baSNigel Croxon IN EFI_HANDLE ControllerHandle, 454530d68baSNigel Croxon IN EFI_HANDLE DriverImageHandle OPTIONAL, 455530d68baSNigel Croxon IN EFI_HANDLE ChildHandle OPTIONAL 456530d68baSNigel Croxon ); 457530d68baSNigel Croxon 458530d68baSNigel Croxon #define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001 459530d68baSNigel Croxon #define EFI_OPEN_PROTOCOL_GET_PROTOCOL 0x00000002 460530d68baSNigel Croxon #define EFI_OPEN_PROTOCOL_TEST_PROTOCOL 0x00000004 461530d68baSNigel Croxon #define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008 462530d68baSNigel Croxon #define EFI_OPEN_PROTOCOL_BY_DRIVER 0x00000010 463530d68baSNigel Croxon #define EFI_OPEN_PROTOCOL_EXCLUSIVE 0x00000020 464530d68baSNigel Croxon 465530d68baSNigel Croxon typedef 466530d68baSNigel Croxon EFI_STATUS 467530d68baSNigel Croxon (EFIAPI *EFI_OPEN_PROTOCOL) ( 468530d68baSNigel Croxon IN EFI_HANDLE Handle, 469530d68baSNigel Croxon IN EFI_GUID *Protocol, 470530d68baSNigel Croxon OUT VOID **Interface OPTIONAL, 471530d68baSNigel Croxon IN EFI_HANDLE AgentHandle, 472530d68baSNigel Croxon IN EFI_HANDLE ControllerHandle, 473530d68baSNigel Croxon IN UINT32 Attributes 474530d68baSNigel Croxon ); 475530d68baSNigel Croxon 476530d68baSNigel Croxon typedef 477530d68baSNigel Croxon EFI_STATUS 478530d68baSNigel Croxon (EFIAPI *EFI_CLOSE_PROTOCOL) ( 479530d68baSNigel Croxon IN EFI_HANDLE Handle, 480530d68baSNigel Croxon IN EFI_GUID *Protocol, 481530d68baSNigel Croxon IN EFI_HANDLE AgentHandle, 482530d68baSNigel Croxon IN EFI_HANDLE ControllerHandle 483530d68baSNigel Croxon ); 484530d68baSNigel Croxon 485530d68baSNigel Croxon typedef struct { 486530d68baSNigel Croxon EFI_HANDLE AgentHandle; 487530d68baSNigel Croxon EFI_HANDLE ControllerHandle; 488530d68baSNigel Croxon UINT32 Attributes; 489530d68baSNigel Croxon UINT32 OpenCount; 490530d68baSNigel Croxon } EFI_OPEN_PROTOCOL_INFORMATION_ENTRY; 491530d68baSNigel Croxon 492530d68baSNigel Croxon typedef 493530d68baSNigel Croxon EFI_STATUS 494530d68baSNigel Croxon (EFIAPI *EFI_OPEN_PROTOCOL_INFORMATION) ( 495530d68baSNigel Croxon IN EFI_HANDLE Handle, 496530d68baSNigel Croxon IN EFI_GUID *Protocol, 497530d68baSNigel Croxon OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer, 498530d68baSNigel Croxon OUT UINTN *EntryCount 499530d68baSNigel Croxon ); 500530d68baSNigel Croxon 501530d68baSNigel Croxon typedef 502530d68baSNigel Croxon EFI_STATUS 503530d68baSNigel Croxon (EFIAPI *EFI_PROTOCOLS_PER_HANDLE) ( 504530d68baSNigel Croxon IN EFI_HANDLE Handle, 505530d68baSNigel Croxon OUT EFI_GUID ***ProtocolBuffer, 506530d68baSNigel Croxon OUT UINTN *ProtocolBufferCount 507530d68baSNigel Croxon ); 508530d68baSNigel Croxon 509530d68baSNigel Croxon typedef enum { 510530d68baSNigel Croxon AllHandles, 511530d68baSNigel Croxon ByRegisterNotify, 512530d68baSNigel Croxon ByProtocol 513530d68baSNigel Croxon } EFI_LOCATE_SEARCH_TYPE; 514530d68baSNigel Croxon 515530d68baSNigel Croxon typedef 516530d68baSNigel Croxon EFI_STATUS 517530d68baSNigel Croxon (EFIAPI *EFI_LOCATE_HANDLE_BUFFER) ( 518530d68baSNigel Croxon IN EFI_LOCATE_SEARCH_TYPE SearchType, 519530d68baSNigel Croxon IN EFI_GUID *Protocol OPTIONAL, 520530d68baSNigel Croxon IN VOID *SearchKey OPTIONAL, 521530d68baSNigel Croxon IN OUT UINTN *NoHandles, 522530d68baSNigel Croxon OUT EFI_HANDLE **Buffer 523530d68baSNigel Croxon ); 524530d68baSNigel Croxon 525530d68baSNigel Croxon typedef 526530d68baSNigel Croxon EFI_STATUS 527530d68baSNigel Croxon (EFIAPI *EFI_LOCATE_PROTOCOL) ( 528530d68baSNigel Croxon IN EFI_GUID *Protocol, 529530d68baSNigel Croxon IN VOID *Registration OPTIONAL, 530530d68baSNigel Croxon OUT VOID **Interface 531530d68baSNigel Croxon ); 532530d68baSNigel Croxon 533530d68baSNigel Croxon typedef 534530d68baSNigel Croxon EFI_STATUS 535530d68baSNigel Croxon (EFIAPI *EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES) ( 536530d68baSNigel Croxon IN OUT EFI_HANDLE *Handle, 537530d68baSNigel Croxon ... 538530d68baSNigel Croxon ); 539530d68baSNigel Croxon 540530d68baSNigel Croxon typedef 541530d68baSNigel Croxon EFI_STATUS 542530d68baSNigel Croxon (EFIAPI *EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES) ( 543530d68baSNigel Croxon IN OUT EFI_HANDLE Handle, 544530d68baSNigel Croxon ... 545530d68baSNigel Croxon ); 546530d68baSNigel Croxon 547530d68baSNigel Croxon typedef 548530d68baSNigel Croxon EFI_STATUS 549530d68baSNigel Croxon (EFIAPI *EFI_CALCULATE_CRC32) ( 550530d68baSNigel Croxon IN VOID *Data, 551530d68baSNigel Croxon IN UINTN DataSize, 552530d68baSNigel Croxon OUT UINT32 *Crc32 553530d68baSNigel Croxon ); 554530d68baSNigel Croxon 555530d68baSNigel Croxon typedef 556530d68baSNigel Croxon VOID 557530d68baSNigel Croxon (EFIAPI *EFI_COPY_MEM) ( 558530d68baSNigel Croxon IN VOID *Destination, 559530d68baSNigel Croxon IN VOID *Source, 560530d68baSNigel Croxon IN UINTN Length 561530d68baSNigel Croxon ); 562530d68baSNigel Croxon 563530d68baSNigel Croxon typedef 564530d68baSNigel Croxon VOID 565530d68baSNigel Croxon (EFIAPI *EFI_SET_MEM) ( 566530d68baSNigel Croxon IN VOID *Buffer, 567530d68baSNigel Croxon IN UINTN Size, 568530d68baSNigel Croxon IN UINT8 Value 569530d68baSNigel Croxon ); 570530d68baSNigel Croxon 571530d68baSNigel Croxon 572530d68baSNigel Croxon typedef 573530d68baSNigel Croxon EFI_STATUS 574530d68baSNigel Croxon (EFIAPI *EFI_CREATE_EVENT_EX) ( 575530d68baSNigel Croxon IN UINT32 Type, 576530d68baSNigel Croxon IN EFI_TPL NotifyTpl, 577530d68baSNigel Croxon IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL, 578530d68baSNigel Croxon IN const VOID *NotifyContext OPTIONAL, 579*238358c6Sleo IN const EFI_GUID *EventGroup OPTIONAL, 580530d68baSNigel Croxon OUT EFI_EVENT *Event 581530d68baSNigel Croxon ); 582530d68baSNigel Croxon 583530d68baSNigel Croxon typedef enum { 584530d68baSNigel Croxon EfiResetCold, 585530d68baSNigel Croxon EfiResetWarm, 586530d68baSNigel Croxon EfiResetShutdown 587530d68baSNigel Croxon } EFI_RESET_TYPE; 588530d68baSNigel Croxon 589530d68baSNigel Croxon typedef 590530d68baSNigel Croxon EFI_STATUS 591530d68baSNigel Croxon (EFIAPI *EFI_RESET_SYSTEM) ( 592530d68baSNigel Croxon IN EFI_RESET_TYPE ResetType, 593530d68baSNigel Croxon IN EFI_STATUS ResetStatus, 594530d68baSNigel Croxon IN UINTN DataSize, 595530d68baSNigel Croxon IN CHAR16 *ResetData OPTIONAL 596530d68baSNigel Croxon ); 597530d68baSNigel Croxon 598530d68baSNigel Croxon typedef 599530d68baSNigel Croxon EFI_STATUS 600530d68baSNigel Croxon (EFIAPI *EFI_GET_NEXT_MONOTONIC_COUNT) ( 601530d68baSNigel Croxon OUT UINT64 *Count 602530d68baSNigel Croxon ); 603530d68baSNigel Croxon 604530d68baSNigel Croxon typedef 605530d68baSNigel Croxon EFI_STATUS 606530d68baSNigel Croxon (EFIAPI *EFI_GET_NEXT_HIGH_MONO_COUNT) ( 607530d68baSNigel Croxon OUT UINT32 *HighCount 608530d68baSNigel Croxon ); 609530d68baSNigel Croxon 610530d68baSNigel Croxon typedef struct { 611530d68baSNigel Croxon UINT64 Length; 612530d68baSNigel Croxon union { 613530d68baSNigel Croxon EFI_PHYSICAL_ADDRESS DataBlock; 614530d68baSNigel Croxon EFI_PHYSICAL_ADDRESS ContinuationPointer; 615530d68baSNigel Croxon } Union; 616530d68baSNigel Croxon } EFI_CAPSULE_BLOCK_DESCRIPTOR; 617530d68baSNigel Croxon 618530d68baSNigel Croxon typedef struct { 619530d68baSNigel Croxon EFI_GUID CapsuleGuid; 620530d68baSNigel Croxon UINT32 HeaderSize; 621530d68baSNigel Croxon UINT32 Flags; 622530d68baSNigel Croxon UINT32 CapsuleImageSize; 623530d68baSNigel Croxon } EFI_CAPSULE_HEADER; 624530d68baSNigel Croxon 625530d68baSNigel Croxon #define CAPSULE_FLAGS_PERSIST_ACROSS_RESET 0x00010000 626530d68baSNigel Croxon #define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE 0x00020000 627530d68baSNigel Croxon #define CAPSULE_FLAGS_INITIATE_RESET 0x00040000 628530d68baSNigel Croxon 629530d68baSNigel Croxon typedef 630530d68baSNigel Croxon EFI_STATUS 631530d68baSNigel Croxon (EFIAPI *EFI_UPDATE_CAPSULE) ( 632530d68baSNigel Croxon IN EFI_CAPSULE_HEADER **CapsuleHeaderArray, 633530d68baSNigel Croxon IN UINTN CapsuleCount, 634530d68baSNigel Croxon IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL 635530d68baSNigel Croxon ); 636530d68baSNigel Croxon 637530d68baSNigel Croxon typedef 638530d68baSNigel Croxon EFI_STATUS 639530d68baSNigel Croxon (EFIAPI *EFI_QUERY_CAPSULE_CAPABILITIES) ( 640530d68baSNigel Croxon IN EFI_CAPSULE_HEADER **CapsuleHeaderArray, 641530d68baSNigel Croxon IN UINTN CapsuleCount, 642530d68baSNigel Croxon OUT UINT64 *MaximumCapsuleSize, 643530d68baSNigel Croxon OUT EFI_RESET_TYPE *ResetType 644530d68baSNigel Croxon ); 645530d68baSNigel Croxon 646530d68baSNigel Croxon typedef 647530d68baSNigel Croxon EFI_STATUS 648530d68baSNigel Croxon (EFIAPI *EFI_QUERY_VARIABLE_INFO) ( 649530d68baSNigel Croxon IN UINT32 Attributes, 650530d68baSNigel Croxon OUT UINT64 *MaximumVariableStorageSize, 651530d68baSNigel Croxon OUT UINT64 *RemainingVariableStorageSize, 652530d68baSNigel Croxon OUT UINT64 *MaximumVariableSize 653530d68baSNigel Croxon ); 654530d68baSNigel Croxon 655530d68baSNigel Croxon // 656530d68baSNigel Croxon // Protocol handler functions 657530d68baSNigel Croxon // 658530d68baSNigel Croxon 659530d68baSNigel Croxon typedef enum { 660530d68baSNigel Croxon EFI_NATIVE_INTERFACE, 661530d68baSNigel Croxon EFI_PCODE_INTERFACE 662530d68baSNigel Croxon } EFI_INTERFACE_TYPE; 663530d68baSNigel Croxon 664530d68baSNigel Croxon typedef 665530d68baSNigel Croxon EFI_STATUS 666530d68baSNigel Croxon (EFIAPI *EFI_INSTALL_PROTOCOL_INTERFACE) ( 667530d68baSNigel Croxon IN OUT EFI_HANDLE *Handle, 668530d68baSNigel Croxon IN EFI_GUID *Protocol, 669530d68baSNigel Croxon IN EFI_INTERFACE_TYPE InterfaceType, 670530d68baSNigel Croxon IN VOID *Interface 671530d68baSNigel Croxon ); 672530d68baSNigel Croxon 673530d68baSNigel Croxon typedef 674530d68baSNigel Croxon EFI_STATUS 675530d68baSNigel Croxon (EFIAPI *EFI_REINSTALL_PROTOCOL_INTERFACE) ( 676530d68baSNigel Croxon IN EFI_HANDLE Handle, 677530d68baSNigel Croxon IN EFI_GUID *Protocol, 678530d68baSNigel Croxon IN VOID *OldInterface, 679530d68baSNigel Croxon IN VOID *NewInterface 680530d68baSNigel Croxon ); 681530d68baSNigel Croxon 682530d68baSNigel Croxon typedef 683530d68baSNigel Croxon EFI_STATUS 684530d68baSNigel Croxon (EFIAPI *EFI_UNINSTALL_PROTOCOL_INTERFACE) ( 685530d68baSNigel Croxon IN EFI_HANDLE Handle, 686530d68baSNigel Croxon IN EFI_GUID *Protocol, 687530d68baSNigel Croxon IN VOID *Interface 688530d68baSNigel Croxon ); 689530d68baSNigel Croxon 690530d68baSNigel Croxon typedef 691530d68baSNigel Croxon EFI_STATUS 692530d68baSNigel Croxon (EFIAPI *EFI_HANDLE_PROTOCOL) ( 693530d68baSNigel Croxon IN EFI_HANDLE Handle, 694530d68baSNigel Croxon IN EFI_GUID *Protocol, 695530d68baSNigel Croxon OUT VOID **Interface 696530d68baSNigel Croxon ); 697530d68baSNigel Croxon 698530d68baSNigel Croxon typedef 699530d68baSNigel Croxon EFI_STATUS 700530d68baSNigel Croxon (EFIAPI *EFI_REGISTER_PROTOCOL_NOTIFY) ( 701530d68baSNigel Croxon IN EFI_GUID *Protocol, 702530d68baSNigel Croxon IN EFI_EVENT Event, 703530d68baSNigel Croxon OUT VOID **Registration 704530d68baSNigel Croxon ); 705530d68baSNigel Croxon 706530d68baSNigel Croxon typedef 707530d68baSNigel Croxon EFI_STATUS 708530d68baSNigel Croxon (EFIAPI *EFI_LOCATE_HANDLE) ( 709530d68baSNigel Croxon IN EFI_LOCATE_SEARCH_TYPE SearchType, 710530d68baSNigel Croxon IN EFI_GUID *Protocol OPTIONAL, 711530d68baSNigel Croxon IN VOID *SearchKey OPTIONAL, 712530d68baSNigel Croxon IN OUT UINTN *BufferSize, 713530d68baSNigel Croxon OUT EFI_HANDLE *Buffer 714530d68baSNigel Croxon ); 715530d68baSNigel Croxon 716530d68baSNigel Croxon typedef 717530d68baSNigel Croxon EFI_STATUS 718530d68baSNigel Croxon (EFIAPI *EFI_LOCATE_DEVICE_PATH) ( 719530d68baSNigel Croxon IN EFI_GUID *Protocol, 720530d68baSNigel Croxon IN OUT EFI_DEVICE_PATH **DevicePath, 721530d68baSNigel Croxon OUT EFI_HANDLE *Device 722530d68baSNigel Croxon ); 723530d68baSNigel Croxon 724530d68baSNigel Croxon typedef 725530d68baSNigel Croxon EFI_STATUS 726530d68baSNigel Croxon (EFIAPI *EFI_INSTALL_CONFIGURATION_TABLE) ( 727530d68baSNigel Croxon IN EFI_GUID *Guid, 728530d68baSNigel Croxon IN VOID *Table 729530d68baSNigel Croxon ); 730530d68baSNigel Croxon 731530d68baSNigel Croxon typedef 732530d68baSNigel Croxon EFI_STATUS 733530d68baSNigel Croxon (EFIAPI *EFI_RESERVED_SERVICE) ( 734530d68baSNigel Croxon ); 735530d68baSNigel Croxon 736530d68baSNigel Croxon // 737530d68baSNigel Croxon // Standard EFI table header 738530d68baSNigel Croxon // 739530d68baSNigel Croxon 740530d68baSNigel Croxon typedef struct _EFI_TABLE_HEADER { 741530d68baSNigel Croxon UINT64 Signature; 742530d68baSNigel Croxon UINT32 Revision; 743530d68baSNigel Croxon UINT32 HeaderSize; 744530d68baSNigel Croxon UINT32 CRC32; 745530d68baSNigel Croxon UINT32 Reserved; 746530d68baSNigel Croxon } EFI_TABLE_HEADER; 747530d68baSNigel Croxon 748530d68baSNigel Croxon 749530d68baSNigel Croxon // 750530d68baSNigel Croxon // EFI Runtime Serivces Table 751530d68baSNigel Croxon // 752530d68baSNigel Croxon 753530d68baSNigel Croxon #define EFI_RUNTIME_SERVICES_SIGNATURE 0x56524553544e5552 754530d68baSNigel Croxon #define EFI_RUNTIME_SERVICES_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION) 755530d68baSNigel Croxon 756530d68baSNigel Croxon typedef struct { 757530d68baSNigel Croxon EFI_TABLE_HEADER Hdr; 758530d68baSNigel Croxon 759530d68baSNigel Croxon // 760530d68baSNigel Croxon // Time services 761530d68baSNigel Croxon // 762530d68baSNigel Croxon 763530d68baSNigel Croxon EFI_GET_TIME GetTime; 764530d68baSNigel Croxon EFI_SET_TIME SetTime; 765530d68baSNigel Croxon EFI_GET_WAKEUP_TIME GetWakeupTime; 766530d68baSNigel Croxon EFI_SET_WAKEUP_TIME SetWakeupTime; 767530d68baSNigel Croxon 768530d68baSNigel Croxon // 769530d68baSNigel Croxon // Virtual memory services 770530d68baSNigel Croxon // 771530d68baSNigel Croxon 772530d68baSNigel Croxon EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap; 773530d68baSNigel Croxon EFI_CONVERT_POINTER ConvertPointer; 774530d68baSNigel Croxon 775530d68baSNigel Croxon // 776530d68baSNigel Croxon // Variable serviers 777530d68baSNigel Croxon // 778530d68baSNigel Croxon 779530d68baSNigel Croxon EFI_GET_VARIABLE GetVariable; 780530d68baSNigel Croxon EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName; 781530d68baSNigel Croxon EFI_SET_VARIABLE SetVariable; 782530d68baSNigel Croxon 783530d68baSNigel Croxon // 784530d68baSNigel Croxon // Misc 785530d68baSNigel Croxon // 786530d68baSNigel Croxon 787530d68baSNigel Croxon EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount; 788530d68baSNigel Croxon EFI_RESET_SYSTEM ResetSystem; 789530d68baSNigel Croxon 790530d68baSNigel Croxon EFI_UPDATE_CAPSULE UpdateCapsule; 791530d68baSNigel Croxon EFI_QUERY_CAPSULE_CAPABILITIES QueryCapsuleCapabilities; 792530d68baSNigel Croxon EFI_QUERY_VARIABLE_INFO QueryVariableInfo; 793530d68baSNigel Croxon } EFI_RUNTIME_SERVICES; 794530d68baSNigel Croxon 795530d68baSNigel Croxon 796530d68baSNigel Croxon // 797530d68baSNigel Croxon // EFI Boot Services Table 798530d68baSNigel Croxon // 799530d68baSNigel Croxon 800530d68baSNigel Croxon #define EFI_BOOT_SERVICES_SIGNATURE 0x56524553544f4f42 801530d68baSNigel Croxon #define EFI_BOOT_SERVICES_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION) 802530d68baSNigel Croxon 803530d68baSNigel Croxon typedef struct _EFI_BOOT_SERVICES { 804530d68baSNigel Croxon 805530d68baSNigel Croxon EFI_TABLE_HEADER Hdr; 806530d68baSNigel Croxon 807530d68baSNigel Croxon // 808530d68baSNigel Croxon // Task priority functions 809530d68baSNigel Croxon // 810530d68baSNigel Croxon 811530d68baSNigel Croxon EFI_RAISE_TPL RaiseTPL; 812530d68baSNigel Croxon EFI_RESTORE_TPL RestoreTPL; 813530d68baSNigel Croxon 814530d68baSNigel Croxon // 815530d68baSNigel Croxon // Memory functions 816530d68baSNigel Croxon // 817530d68baSNigel Croxon 818530d68baSNigel Croxon EFI_ALLOCATE_PAGES AllocatePages; 819530d68baSNigel Croxon EFI_FREE_PAGES FreePages; 820530d68baSNigel Croxon EFI_GET_MEMORY_MAP GetMemoryMap; 821530d68baSNigel Croxon EFI_ALLOCATE_POOL AllocatePool; 822530d68baSNigel Croxon EFI_FREE_POOL FreePool; 823530d68baSNigel Croxon 824530d68baSNigel Croxon // 825530d68baSNigel Croxon // Event & timer functions 826530d68baSNigel Croxon // 827530d68baSNigel Croxon 828530d68baSNigel Croxon EFI_CREATE_EVENT CreateEvent; 829530d68baSNigel Croxon EFI_SET_TIMER SetTimer; 830530d68baSNigel Croxon EFI_WAIT_FOR_EVENT WaitForEvent; 831530d68baSNigel Croxon EFI_SIGNAL_EVENT SignalEvent; 832530d68baSNigel Croxon EFI_CLOSE_EVENT CloseEvent; 833530d68baSNigel Croxon EFI_CHECK_EVENT CheckEvent; 834530d68baSNigel Croxon 835530d68baSNigel Croxon // 836530d68baSNigel Croxon // Protocol handler functions 837530d68baSNigel Croxon // 838530d68baSNigel Croxon 839530d68baSNigel Croxon EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface; 840530d68baSNigel Croxon EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface; 841530d68baSNigel Croxon EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface; 842530d68baSNigel Croxon EFI_HANDLE_PROTOCOL HandleProtocol; 843530d68baSNigel Croxon EFI_HANDLE_PROTOCOL PCHandleProtocol; 844530d68baSNigel Croxon EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify; 845530d68baSNigel Croxon EFI_LOCATE_HANDLE LocateHandle; 846530d68baSNigel Croxon EFI_LOCATE_DEVICE_PATH LocateDevicePath; 847530d68baSNigel Croxon EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable; 848530d68baSNigel Croxon 849530d68baSNigel Croxon // 850530d68baSNigel Croxon // Image functions 851530d68baSNigel Croxon // 852530d68baSNigel Croxon 853530d68baSNigel Croxon EFI_IMAGE_LOAD LoadImage; 854530d68baSNigel Croxon EFI_IMAGE_START StartImage; 855530d68baSNigel Croxon EFI_EXIT Exit; 856530d68baSNigel Croxon EFI_IMAGE_UNLOAD UnloadImage; 857530d68baSNigel Croxon EFI_EXIT_BOOT_SERVICES ExitBootServices; 858530d68baSNigel Croxon 859530d68baSNigel Croxon // 860530d68baSNigel Croxon // Misc functions 861530d68baSNigel Croxon // 862530d68baSNigel Croxon 863530d68baSNigel Croxon EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount; 864530d68baSNigel Croxon EFI_STALL Stall; 865530d68baSNigel Croxon EFI_SET_WATCHDOG_TIMER SetWatchdogTimer; 866530d68baSNigel Croxon 867530d68baSNigel Croxon // 868530d68baSNigel Croxon // DriverSupport Services 869530d68baSNigel Croxon // 870530d68baSNigel Croxon 871530d68baSNigel Croxon EFI_CONNECT_CONTROLLER ConnectController; 872530d68baSNigel Croxon EFI_DISCONNECT_CONTROLLER DisconnectController; 873530d68baSNigel Croxon 874530d68baSNigel Croxon // 875530d68baSNigel Croxon // Open and Close Protocol Services 876530d68baSNigel Croxon // 877530d68baSNigel Croxon EFI_OPEN_PROTOCOL OpenProtocol; 878530d68baSNigel Croxon EFI_CLOSE_PROTOCOL CloseProtocol; 879530d68baSNigel Croxon EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation; 880530d68baSNigel Croxon 881530d68baSNigel Croxon // 882530d68baSNigel Croxon // Library Services 883530d68baSNigel Croxon // 884530d68baSNigel Croxon EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle; 885530d68baSNigel Croxon EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer; 886530d68baSNigel Croxon EFI_LOCATE_PROTOCOL LocateProtocol; 887530d68baSNigel Croxon EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces; 888530d68baSNigel Croxon EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces; 889530d68baSNigel Croxon 890530d68baSNigel Croxon // 891530d68baSNigel Croxon // 32-bit CRC Services 892530d68baSNigel Croxon // 893530d68baSNigel Croxon EFI_CALCULATE_CRC32 CalculateCrc32; 894530d68baSNigel Croxon 895530d68baSNigel Croxon // 896530d68baSNigel Croxon // Misc Services 897530d68baSNigel Croxon // 898530d68baSNigel Croxon EFI_COPY_MEM CopyMem; 899530d68baSNigel Croxon EFI_SET_MEM SetMem; 900530d68baSNigel Croxon EFI_CREATE_EVENT_EX CreateEventEx; 901530d68baSNigel Croxon } EFI_BOOT_SERVICES; 902530d68baSNigel Croxon 903530d68baSNigel Croxon 904530d68baSNigel Croxon // 905530d68baSNigel Croxon // EFI Configuration Table and GUID definitions 906530d68baSNigel Croxon // 907530d68baSNigel Croxon 908530d68baSNigel Croxon #define MPS_TABLE_GUID \ 909530d68baSNigel Croxon { 0xeb9d2d2f, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} } 910530d68baSNigel Croxon 911530d68baSNigel Croxon #define ACPI_TABLE_GUID \ 912530d68baSNigel Croxon { 0xeb9d2d30, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} } 913530d68baSNigel Croxon 914530d68baSNigel Croxon #define ACPI_20_TABLE_GUID \ 915530d68baSNigel Croxon { 0x8868e871, 0xe4f1, 0x11d3, {0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} } 916530d68baSNigel Croxon 917530d68baSNigel Croxon #define SMBIOS_TABLE_GUID \ 918530d68baSNigel Croxon { 0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} } 919530d68baSNigel Croxon 920ef81c051SNigel Croxon #define SMBIOS3_TABLE_GUID \ 921ef81c051SNigel Croxon { 0xf2fd1544, 0x9794, 0x4a2c, {0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94} } 922ef81c051SNigel Croxon 923530d68baSNigel Croxon #define SAL_SYSTEM_TABLE_GUID \ 924530d68baSNigel Croxon { 0xeb9d2d32, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} } 925530d68baSNigel Croxon 926530d68baSNigel Croxon 927530d68baSNigel Croxon typedef struct _EFI_CONFIGURATION_TABLE { 928530d68baSNigel Croxon EFI_GUID VendorGuid; 929530d68baSNigel Croxon VOID *VendorTable; 930530d68baSNigel Croxon } EFI_CONFIGURATION_TABLE; 931530d68baSNigel Croxon 932530d68baSNigel Croxon 933530d68baSNigel Croxon // 934530d68baSNigel Croxon // EFI System Table 935530d68baSNigel Croxon // 936530d68baSNigel Croxon 937530d68baSNigel Croxon 938530d68baSNigel Croxon 939530d68baSNigel Croxon 940530d68baSNigel Croxon #define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249 941530d68baSNigel Croxon #define EFI_SYSTEM_TABLE_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION) 942530d68baSNigel Croxon 943530d68baSNigel Croxon typedef struct _EFI_SYSTEM_TABLE { 944530d68baSNigel Croxon EFI_TABLE_HEADER Hdr; 945530d68baSNigel Croxon 946530d68baSNigel Croxon CHAR16 *FirmwareVendor; 947530d68baSNigel Croxon UINT32 FirmwareRevision; 948530d68baSNigel Croxon 949530d68baSNigel Croxon EFI_HANDLE ConsoleInHandle; 950530d68baSNigel Croxon SIMPLE_INPUT_INTERFACE *ConIn; 951530d68baSNigel Croxon 952530d68baSNigel Croxon EFI_HANDLE ConsoleOutHandle; 953530d68baSNigel Croxon SIMPLE_TEXT_OUTPUT_INTERFACE *ConOut; 954530d68baSNigel Croxon 955530d68baSNigel Croxon EFI_HANDLE StandardErrorHandle; 956530d68baSNigel Croxon SIMPLE_TEXT_OUTPUT_INTERFACE *StdErr; 957530d68baSNigel Croxon 958530d68baSNigel Croxon EFI_RUNTIME_SERVICES *RuntimeServices; 959530d68baSNigel Croxon EFI_BOOT_SERVICES *BootServices; 960530d68baSNigel Croxon 961530d68baSNigel Croxon UINTN NumberOfTableEntries; 962530d68baSNigel Croxon EFI_CONFIGURATION_TABLE *ConfigurationTable; 963530d68baSNigel Croxon 964530d68baSNigel Croxon } EFI_SYSTEM_TABLE; 965530d68baSNigel Croxon 966530d68baSNigel Croxon #endif 967530d68baSNigel Croxon 968