Adding upstream version 6.03~pre1+dfsg.
[syslinux-debian/hramrach.git] / efi64 / include / efi / efiapi.h
blob5e47324da491496bb37fefebe1e5160605f87426
1 #ifndef _EFI_API_H
2 #define _EFI_API_H
4 /*++
6 Copyright (c) 1998 Intel Corporation
8 Module Name:
10 efiapi.h
12 Abstract:
14 Global EFI runtime & boot service interfaces
19 Revision History
21 --*/
24 // EFI Specification Revision
27 #define EFI_SPECIFICATION_MAJOR_REVISION 1
28 #define EFI_SPECIFICATION_MINOR_REVISION 02
31 // Declare forward referenced data structures
34 INTERFACE_DECL(_EFI_SYSTEM_TABLE);
37 // EFI Memory
40 typedef
41 EFI_STATUS
42 (EFIAPI *EFI_ALLOCATE_PAGES) (
43 IN EFI_ALLOCATE_TYPE Type,
44 IN EFI_MEMORY_TYPE MemoryType,
45 IN UINTN NoPages,
46 OUT EFI_PHYSICAL_ADDRESS *Memory
49 typedef
50 EFI_STATUS
51 (EFIAPI *EFI_FREE_PAGES) (
52 IN EFI_PHYSICAL_ADDRESS Memory,
53 IN UINTN NoPages
56 typedef
57 EFI_STATUS
58 (EFIAPI *EFI_GET_MEMORY_MAP) (
59 IN OUT UINTN *MemoryMapSize,
60 IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap,
61 OUT UINTN *MapKey,
62 OUT UINTN *DescriptorSize,
63 OUT UINT32 *DescriptorVersion
66 #define NextMemoryDescriptor(Ptr,Size) ((EFI_MEMORY_DESCRIPTOR *) (((UINT8 *) Ptr) + Size))
69 typedef
70 EFI_STATUS
71 (EFIAPI *EFI_ALLOCATE_POOL) (
72 IN EFI_MEMORY_TYPE PoolType,
73 IN UINTN Size,
74 OUT VOID **Buffer
77 typedef
78 EFI_STATUS
79 (EFIAPI *EFI_FREE_POOL) (
80 IN VOID *Buffer
83 typedef
84 EFI_STATUS
85 (EFIAPI *EFI_SET_VIRTUAL_ADDRESS_MAP) (
86 IN UINTN MemoryMapSize,
87 IN UINTN DescriptorSize,
88 IN UINT32 DescriptorVersion,
89 IN EFI_MEMORY_DESCRIPTOR *VirtualMap
93 #define EFI_OPTIONAL_PTR 0x00000001
94 #define EFI_INTERNAL_FNC 0x00000002 // Pointer to internal runtime fnc
95 #define EFI_INTERNAL_PTR 0x00000004 // Pointer to internal runtime data
98 typedef
99 EFI_STATUS
100 (EFIAPI *EFI_CONVERT_POINTER) (
101 IN UINTN DebugDisposition,
102 IN OUT VOID **Address
107 // EFI Events
112 #define EVT_TIMER 0x80000000
113 #define EVT_RUNTIME 0x40000000
114 #define EVT_RUNTIME_CONTEXT 0x20000000
116 #define EVT_NOTIFY_WAIT 0x00000100
117 #define EVT_NOTIFY_SIGNAL 0x00000200
119 #define EVT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201
120 #define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202
122 #define EVT_EFI_SIGNAL_MASK 0x000000FF
123 #define EVT_EFI_SIGNAL_MAX 2
125 typedef
126 VOID
127 (EFIAPI *EFI_EVENT_NOTIFY) (
128 IN EFI_EVENT Event,
129 IN VOID *Context
132 typedef
133 EFI_STATUS
134 (EFIAPI *EFI_CREATE_EVENT) (
135 IN UINT32 Type,
136 IN EFI_TPL NotifyTpl,
137 IN EFI_EVENT_NOTIFY NotifyFunction,
138 IN VOID *NotifyContext,
139 OUT EFI_EVENT *Event
142 typedef enum {
143 TimerCancel,
144 TimerPeriodic,
145 TimerRelative,
146 TimerTypeMax
147 } EFI_TIMER_DELAY;
149 typedef
150 EFI_STATUS
151 (EFIAPI *EFI_SET_TIMER) (
152 IN EFI_EVENT Event,
153 IN EFI_TIMER_DELAY Type,
154 IN UINT64 TriggerTime
157 typedef
158 EFI_STATUS
159 (EFIAPI *EFI_SIGNAL_EVENT) (
160 IN EFI_EVENT Event
163 typedef
164 EFI_STATUS
165 (EFIAPI *EFI_WAIT_FOR_EVENT) (
166 IN UINTN NumberOfEvents,
167 IN EFI_EVENT *Event,
168 OUT UINTN *Index
171 typedef
172 EFI_STATUS
173 (EFIAPI *EFI_CLOSE_EVENT) (
174 IN EFI_EVENT Event
177 typedef
178 EFI_STATUS
179 (EFIAPI *EFI_CHECK_EVENT) (
180 IN EFI_EVENT Event
184 // Task priority level
187 #define TPL_APPLICATION 4
188 #define TPL_CALLBACK 8
189 #define TPL_NOTIFY 16
190 #define TPL_HIGH_LEVEL 31
192 typedef
193 EFI_TPL
194 (EFIAPI *EFI_RAISE_TPL) (
195 IN EFI_TPL NewTpl
198 typedef
199 VOID
200 (EFIAPI *EFI_RESTORE_TPL) (
201 IN EFI_TPL OldTpl
206 // EFI platform varibles
209 #define EFI_GLOBAL_VARIABLE \
210 { 0x8BE4DF61, 0x93CA, 0x11d2, {0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C} }
212 // Variable attributes
213 #define EFI_VARIABLE_NON_VOLATILE 0x00000001
214 #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
215 #define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004
217 // Variable size limitation
218 #define EFI_MAXIMUM_VARIABLE_SIZE 1024
220 typedef
221 EFI_STATUS
222 (EFIAPI *EFI_GET_VARIABLE) (
223 IN CHAR16 *VariableName,
224 IN EFI_GUID *VendorGuid,
225 OUT UINT32 *Attributes OPTIONAL,
226 IN OUT UINTN *DataSize,
227 OUT VOID *Data
230 typedef
231 EFI_STATUS
232 (EFIAPI *EFI_GET_NEXT_VARIABLE_NAME) (
233 IN OUT UINTN *VariableNameSize,
234 IN OUT CHAR16 *VariableName,
235 IN OUT EFI_GUID *VendorGuid
239 typedef
240 EFI_STATUS
241 (EFIAPI *EFI_SET_VARIABLE) (
242 IN CHAR16 *VariableName,
243 IN EFI_GUID *VendorGuid,
244 IN UINT32 Attributes,
245 IN UINTN DataSize,
246 IN VOID *Data
251 // EFI Time
254 typedef struct {
255 UINT32 Resolution; // 1e-6 parts per million
256 UINT32 Accuracy; // hertz
257 BOOLEAN SetsToZero; // Set clears sub-second time
258 } EFI_TIME_CAPABILITIES;
261 typedef
262 EFI_STATUS
263 (EFIAPI *EFI_GET_TIME) (
264 OUT EFI_TIME *Time,
265 OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL
268 typedef
269 EFI_STATUS
270 (EFIAPI *EFI_SET_TIME) (
271 IN EFI_TIME *Time
274 typedef
275 EFI_STATUS
276 (EFIAPI *EFI_GET_WAKEUP_TIME) (
277 OUT BOOLEAN *Enabled,
278 OUT BOOLEAN *Pending,
279 OUT EFI_TIME *Time
282 typedef
283 EFI_STATUS
284 (EFIAPI *EFI_SET_WAKEUP_TIME) (
285 IN BOOLEAN Enable,
286 IN EFI_TIME *Time OPTIONAL
291 // Image functions
295 // PE32+ Subsystem type for EFI images
297 #if !defined(IMAGE_SUBSYSTEM_EFI_APPLICATION)
298 #define IMAGE_SUBSYSTEM_EFI_APPLICATION 10
299 #define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
300 #define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12
301 #endif
303 // PE32+ Machine type for EFI images
305 #if !defined(EFI_IMAGE_MACHINE_IA32)
306 #define EFI_IMAGE_MACHINE_IA32 0x014c
307 #endif
309 #if !defined(EFI_IMAGE_MACHINE_IA64)
310 #define EFI_IMAGE_MACHINE_IA64 0x0200
311 #endif
313 // Image Entry prototype
315 typedef
316 EFI_STATUS
317 (EFIAPI *EFI_IMAGE_ENTRY_POINT) (
318 IN EFI_HANDLE ImageHandle,
319 IN struct _EFI_SYSTEM_TABLE *SystemTable
322 typedef
323 EFI_STATUS
324 (EFIAPI *EFI_IMAGE_LOAD) (
325 IN BOOLEAN BootPolicy,
326 IN EFI_HANDLE ParentImageHandle,
327 IN EFI_DEVICE_PATH *FilePath,
328 IN VOID *SourceBuffer OPTIONAL,
329 IN UINTN SourceSize,
330 OUT EFI_HANDLE *ImageHandle
333 typedef
334 EFI_STATUS
335 (EFIAPI *EFI_IMAGE_START) (
336 IN EFI_HANDLE ImageHandle,
337 OUT UINTN *ExitDataSize,
338 OUT CHAR16 **ExitData OPTIONAL
341 typedef
342 EFI_STATUS
343 (EFIAPI *EFI_EXIT) (
344 IN EFI_HANDLE ImageHandle,
345 IN EFI_STATUS ExitStatus,
346 IN UINTN ExitDataSize,
347 IN CHAR16 *ExitData OPTIONAL
350 typedef
351 EFI_STATUS
352 (EFIAPI *EFI_IMAGE_UNLOAD) (
353 IN EFI_HANDLE ImageHandle
357 // Image handle
358 #define LOADED_IMAGE_PROTOCOL \
359 { 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} }
361 #define EFI_IMAGE_INFORMATION_REVISION 0x1000
362 typedef struct {
363 UINT32 Revision;
364 EFI_HANDLE ParentHandle;
365 struct _EFI_SYSTEM_TABLE *SystemTable;
367 // Source location of image
368 EFI_HANDLE DeviceHandle;
369 EFI_DEVICE_PATH *FilePath;
370 VOID *Reserved;
372 // Images load options
373 UINT32 LoadOptionsSize;
374 VOID *LoadOptions;
376 // Location of where image was loaded
377 VOID *ImageBase;
378 UINT64 ImageSize;
379 EFI_MEMORY_TYPE ImageCodeType;
380 EFI_MEMORY_TYPE ImageDataType;
382 // If the driver image supports a dynamic unload request
383 EFI_IMAGE_UNLOAD Unload;
385 } EFI_LOADED_IMAGE;
388 typedef
389 EFI_STATUS
390 (EFIAPI *EFI_EXIT_BOOT_SERVICES) (
391 IN EFI_HANDLE ImageHandle,
392 IN UINTN MapKey
396 // Misc
400 typedef
401 EFI_STATUS
402 (EFIAPI *EFI_STALL) (
403 IN UINTN Microseconds
406 typedef
407 EFI_STATUS
408 (EFIAPI *EFI_SET_WATCHDOG_TIMER) (
409 IN UINTN Timeout,
410 IN UINT64 WatchdogCode,
411 IN UINTN DataSize,
412 IN CHAR16 *WatchdogData OPTIONAL
415 typedef
416 EFI_STATUS
417 (EFIAPI *EFI_CONNECT_CONTROLLER) (
418 IN EFI_HANDLE ControllerHandle,
419 IN EFI_HANDLE *DriverImageHandle OPTIONAL,
420 IN EFI_DEVICE_PATH *RemainingDevicePath OPTIONAL,
421 IN BOOLEAN Recursive
424 typedef
425 EFI_STATUS
426 (EFIAPI *EFI_DISCONNECT_CONTROLLER) (
427 IN EFI_HANDLE ControllerHandle,
428 IN EFI_HANDLE DriverImageHandle OPTIONAL,
429 IN EFI_HANDLE ChildHandle OPTIONAL
432 #define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001
433 #define EFI_OPEN_PROTOCOL_GET_PROTOCOL 0x00000002
434 #define EFI_OPEN_PROTOCOL_TEST_PROTOCOL 0x00000004
435 #define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008
436 #define EFI_OPEN_PROTOCOL_BY_DRIVER 0x00000010
437 #define EFI_OPEN_PROTOCOL_EXCLUSIVE 0x00000020
439 typedef
440 EFI_STATUS
441 (EFIAPI *EFI_OPEN_PROTOCOL) (
442 IN EFI_HANDLE Handle,
443 IN EFI_GUID *Protocol,
444 OUT VOID **Interface OPTIONAL,
445 IN EFI_HANDLE AgentHandle,
446 IN EFI_HANDLE ControllerHandle,
447 IN UINT32 Attributes
450 typedef
451 EFI_STATUS
452 (EFIAPI *EFI_CLOSE_PROTOCOL) (
453 IN EFI_HANDLE Handle,
454 IN EFI_GUID *Protocol,
455 IN EFI_HANDLE AgentHandle,
456 IN EFI_HANDLE ControllerHandle
459 typedef struct {
460 EFI_HANDLE AgentHandle;
461 EFI_HANDLE ControllerHandle;
462 UINT32 Attributes;
463 UINT32 OpenCount;
464 } EFI_OPEN_PROTOCOL_INFORMATION_ENTRY;
466 typedef
467 EFI_STATUS
468 (EFIAPI *EFI_OPEN_PROTOCOL_INFORMATION) (
469 IN EFI_HANDLE Handle,
470 IN EFI_GUID *Protocol,
471 OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,
472 OUT UINTN *EntryCount
475 typedef
476 EFI_STATUS
477 (EFIAPI *EFI_PROTOCOLS_PER_HANDLE) (
478 IN EFI_HANDLE Handle,
479 OUT EFI_GUID ***ProtocolBuffer,
480 OUT UINTN *ProtocolBufferCount
483 typedef enum {
484 AllHandles,
485 ByRegisterNotify,
486 ByProtocol
487 } EFI_LOCATE_SEARCH_TYPE;
489 typedef
490 EFI_STATUS
491 (EFIAPI *EFI_LOCATE_HANDLE_BUFFER) (
492 IN EFI_LOCATE_SEARCH_TYPE SearchType,
493 IN EFI_GUID *Protocol OPTIONAL,
494 IN VOID *SearchKey OPTIONAL,
495 IN OUT UINTN *NoHandles,
496 OUT EFI_HANDLE **Buffer
499 typedef
500 EFI_STATUS
501 (EFIAPI *EFI_LOCATE_PROTOCOL) (
502 IN EFI_GUID *Protocol,
503 IN VOID *Registration OPTIONAL,
504 OUT VOID **Interface
507 typedef
508 EFI_STATUS
509 (EFIAPI *EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES) (
510 IN OUT EFI_HANDLE *Handle,
514 typedef
515 EFI_STATUS
516 (EFIAPI *EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES) (
517 IN OUT EFI_HANDLE Handle,
521 typedef
522 EFI_STATUS
523 (EFIAPI *EFI_CALCULATE_CRC32) (
524 IN VOID *Data,
525 IN UINTN DataSize,
526 OUT UINT32 *Crc32
529 typedef
530 VOID
531 (EFIAPI *EFI_COPY_MEM) (
532 IN VOID *Destination,
533 IN VOID *Source,
534 IN UINTN Length
537 typedef
538 VOID
539 (EFIAPI *EFI_SET_MEM) (
540 IN VOID *Buffer,
541 IN UINTN Size,
542 IN UINT8 Value
546 typedef
547 EFI_STATUS
548 (EFIAPI *EFI_CREATE_EVENT_EX) (
549 IN UINT32 Type,
550 IN EFI_TPL NotifyTpl,
551 IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL,
552 IN const VOID *NotifyContext OPTIONAL,
553 IN const EFI_GUID EventGroup OPTIONAL,
554 OUT EFI_EVENT *Event
557 typedef enum {
558 EfiResetCold,
559 EfiResetWarm,
560 EfiResetShutdown
561 } EFI_RESET_TYPE;
563 typedef
564 EFI_STATUS
565 (EFIAPI *EFI_RESET_SYSTEM) (
566 IN EFI_RESET_TYPE ResetType,
567 IN EFI_STATUS ResetStatus,
568 IN UINTN DataSize,
569 IN CHAR16 *ResetData OPTIONAL
572 typedef
573 EFI_STATUS
574 (EFIAPI *EFI_GET_NEXT_MONOTONIC_COUNT) (
575 OUT UINT64 *Count
578 typedef
579 EFI_STATUS
580 (EFIAPI *EFI_GET_NEXT_HIGH_MONO_COUNT) (
581 OUT UINT32 *HighCount
585 // Protocol handler functions
588 typedef enum {
589 EFI_NATIVE_INTERFACE,
590 EFI_PCODE_INTERFACE
591 } EFI_INTERFACE_TYPE;
593 typedef
594 EFI_STATUS
595 (EFIAPI *EFI_INSTALL_PROTOCOL_INTERFACE) (
596 IN OUT EFI_HANDLE *Handle,
597 IN EFI_GUID *Protocol,
598 IN EFI_INTERFACE_TYPE InterfaceType,
599 IN VOID *Interface
602 typedef
603 EFI_STATUS
604 (EFIAPI *EFI_REINSTALL_PROTOCOL_INTERFACE) (
605 IN EFI_HANDLE Handle,
606 IN EFI_GUID *Protocol,
607 IN VOID *OldInterface,
608 IN VOID *NewInterface
611 typedef
612 EFI_STATUS
613 (EFIAPI *EFI_UNINSTALL_PROTOCOL_INTERFACE) (
614 IN EFI_HANDLE Handle,
615 IN EFI_GUID *Protocol,
616 IN VOID *Interface
619 typedef
620 EFI_STATUS
621 (EFIAPI *EFI_HANDLE_PROTOCOL) (
622 IN EFI_HANDLE Handle,
623 IN EFI_GUID *Protocol,
624 OUT VOID **Interface
627 typedef
628 EFI_STATUS
629 (EFIAPI *EFI_REGISTER_PROTOCOL_NOTIFY) (
630 IN EFI_GUID *Protocol,
631 IN EFI_EVENT Event,
632 OUT VOID **Registration
635 typedef
636 EFI_STATUS
637 (EFIAPI *EFI_LOCATE_HANDLE) (
638 IN EFI_LOCATE_SEARCH_TYPE SearchType,
639 IN EFI_GUID *Protocol OPTIONAL,
640 IN VOID *SearchKey OPTIONAL,
641 IN OUT UINTN *BufferSize,
642 OUT EFI_HANDLE *Buffer
645 typedef
646 EFI_STATUS
647 (EFIAPI *EFI_LOCATE_DEVICE_PATH) (
648 IN EFI_GUID *Protocol,
649 IN OUT EFI_DEVICE_PATH **DevicePath,
650 OUT EFI_HANDLE *Device
653 typedef
654 EFI_STATUS
655 (EFIAPI *EFI_INSTALL_CONFIGURATION_TABLE) (
656 IN EFI_GUID *Guid,
657 IN VOID *Table
660 typedef
661 EFI_STATUS
662 (EFIAPI *EFI_RESERVED_SERVICE) (
666 // Standard EFI table header
669 typedef struct _EFI_TABLE_HEARDER {
670 UINT64 Signature;
671 UINT32 Revision;
672 UINT32 HeaderSize;
673 UINT32 CRC32;
674 UINT32 Reserved;
675 } EFI_TABLE_HEADER;
679 // EFI Runtime Serivces Table
682 #define EFI_RUNTIME_SERVICES_SIGNATURE 0x56524553544e5552
683 #define EFI_RUNTIME_SERVICES_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION)
685 typedef struct {
686 EFI_TABLE_HEADER Hdr;
689 // Time services
692 EFI_GET_TIME GetTime;
693 EFI_SET_TIME SetTime;
694 EFI_GET_WAKEUP_TIME GetWakeupTime;
695 EFI_SET_WAKEUP_TIME SetWakeupTime;
698 // Virtual memory services
701 EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap;
702 EFI_CONVERT_POINTER ConvertPointer;
705 // Variable serviers
708 EFI_GET_VARIABLE GetVariable;
709 EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName;
710 EFI_SET_VARIABLE SetVariable;
713 // Misc
716 EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount;
717 EFI_RESET_SYSTEM ResetSystem;
719 } EFI_RUNTIME_SERVICES;
723 // EFI Boot Services Table
726 #define EFI_BOOT_SERVICES_SIGNATURE 0x56524553544f4f42
727 #define EFI_BOOT_SERVICES_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION)
729 typedef struct _EFI_BOOT_SERVICES {
731 EFI_TABLE_HEADER Hdr;
734 // Task priority functions
737 EFI_RAISE_TPL RaiseTPL;
738 EFI_RESTORE_TPL RestoreTPL;
741 // Memory functions
744 EFI_ALLOCATE_PAGES AllocatePages;
745 EFI_FREE_PAGES FreePages;
746 EFI_GET_MEMORY_MAP GetMemoryMap;
747 EFI_ALLOCATE_POOL AllocatePool;
748 EFI_FREE_POOL FreePool;
751 // Event & timer functions
754 EFI_CREATE_EVENT CreateEvent;
755 EFI_SET_TIMER SetTimer;
756 EFI_WAIT_FOR_EVENT WaitForEvent;
757 EFI_SIGNAL_EVENT SignalEvent;
758 EFI_CLOSE_EVENT CloseEvent;
759 EFI_CHECK_EVENT CheckEvent;
762 // Protocol handler functions
765 EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface;
766 EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface;
767 EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface;
768 EFI_HANDLE_PROTOCOL HandleProtocol;
769 EFI_HANDLE_PROTOCOL PCHandleProtocol;
770 EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify;
771 EFI_LOCATE_HANDLE LocateHandle;
772 EFI_LOCATE_DEVICE_PATH LocateDevicePath;
773 EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable;
776 // Image functions
779 EFI_IMAGE_LOAD LoadImage;
780 EFI_IMAGE_START StartImage;
781 EFI_EXIT Exit;
782 EFI_IMAGE_UNLOAD UnloadImage;
783 EFI_EXIT_BOOT_SERVICES ExitBootServices;
786 // Misc functions
789 EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount;
790 EFI_STALL Stall;
791 EFI_SET_WATCHDOG_TIMER SetWatchdogTimer;
794 // DriverSupport Services
797 EFI_CONNECT_CONTROLLER ConnectController;
798 EFI_DISCONNECT_CONTROLLER DisconnectController;
801 // Open and Close Protocol Services
803 EFI_OPEN_PROTOCOL OpenProtocol;
804 EFI_CLOSE_PROTOCOL CloseProtocol;
805 EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation;
808 // Library Services
810 EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle;
811 EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer;
812 EFI_LOCATE_PROTOCOL LocateProtocol;
813 EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces;
814 EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces;
817 // 32-bit CRC Services
819 EFI_CALCULATE_CRC32 CalculateCrc32;
822 // Misc Services
824 EFI_COPY_MEM CopyMem;
825 EFI_SET_MEM SetMem;
826 EFI_CREATE_EVENT_EX CreateEventEx;
827 } EFI_BOOT_SERVICES;
831 // EFI Configuration Table and GUID definitions
834 #define MPS_TABLE_GUID \
835 { 0xeb9d2d2f, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
837 #define ACPI_TABLE_GUID \
838 { 0xeb9d2d30, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
840 #define ACPI_20_TABLE_GUID \
841 { 0x8868e871, 0xe4f1, 0x11d3, {0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} }
843 #define SMBIOS_TABLE_GUID \
844 { 0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
846 #define SAL_SYSTEM_TABLE_GUID \
847 { 0xeb9d2d32, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
850 typedef struct _EFI_CONFIGURATION_TABLE {
851 EFI_GUID VendorGuid;
852 VOID *VendorTable;
853 } EFI_CONFIGURATION_TABLE;
857 // EFI System Table
863 #define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249
864 #define EFI_SYSTEM_TABLE_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION)
866 typedef struct _EFI_SYSTEM_TABLE {
867 EFI_TABLE_HEADER Hdr;
869 CHAR16 *FirmwareVendor;
870 UINT32 FirmwareRevision;
872 EFI_HANDLE ConsoleInHandle;
873 SIMPLE_INPUT_INTERFACE *ConIn;
875 EFI_HANDLE ConsoleOutHandle;
876 SIMPLE_TEXT_OUTPUT_INTERFACE *ConOut;
878 EFI_HANDLE StandardErrorHandle;
879 SIMPLE_TEXT_OUTPUT_INTERFACE *StdErr;
881 EFI_RUNTIME_SERVICES *RuntimeServices;
882 EFI_BOOT_SERVICES *BootServices;
884 UINTN NumberOfTableEntries;
885 EFI_CONFIGURATION_TABLE *ConfigurationTable;
887 } EFI_SYSTEM_TABLE;
889 #endif