xref: /freebsd/stand/efi/include/efiapi.h (revision 5c2bc3db201a4fe8d7911cf816bea104d5dc2138)
1 #ifndef _EFI_API_H
2 #define _EFI_API_H
3 
4 /*++
5 
6 Copyright (c)  1999 - 2002 Intel Corporation. All rights reserved
7 This software and associated documentation (if any) is furnished
8 under a license and may only be used or copied in accordance
9 with the terms of the license. Except as permitted by such
10 license, no part of this software or documentation may be
11 reproduced, stored in a retrieval system, or transmitted in any
12 form or by any means without the express written consent of
13 Intel Corporation.
14 
15 Module Name:
16 
17     efiapi.h
18 
19 Abstract:
20 
21     Global EFI runtime & boot service interfaces
22 
23 
24 
25 
26 Revision History
27 
28 --*/
29 
30 //
31 // EFI Specification Revision
32 //
33 
34 #define EFI_SPECIFICATION_MAJOR_REVISION 1
35 #define EFI_SPECIFICATION_MINOR_REVISION 10
36 
37 //
38 // Declare forward referenced data structures
39 //
40 
41 INTERFACE_DECL(_EFI_SYSTEM_TABLE);
42 
43 //
44 // EFI Memory
45 //
46 
47 typedef
48 EFI_STATUS
49 (EFIAPI *EFI_ALLOCATE_PAGES) (
50     IN EFI_ALLOCATE_TYPE            Type,
51     IN EFI_MEMORY_TYPE              MemoryType,
52     IN UINTN                        NoPages,
53     OUT EFI_PHYSICAL_ADDRESS        *Memory
54     );
55 
56 typedef
57 EFI_STATUS
58 (EFIAPI *EFI_FREE_PAGES) (
59     IN EFI_PHYSICAL_ADDRESS         Memory,
60     IN UINTN                        NoPages
61     );
62 
63 typedef
64 EFI_STATUS
65 (EFIAPI *EFI_GET_MEMORY_MAP) (
66     IN OUT UINTN                    *MemoryMapSize,
67     IN OUT EFI_MEMORY_DESCRIPTOR    *MemoryMap,
68     OUT UINTN                       *MapKey,
69     OUT UINTN                       *DescriptorSize,
70     OUT UINT32                      *DescriptorVersion
71     );
72 
73 #define NextMemoryDescriptor(Ptr,Size)  ((EFI_MEMORY_DESCRIPTOR *) (((UINT8 *) Ptr) + Size))
74 
75 
76 typedef
77 EFI_STATUS
78 (EFIAPI *EFI_ALLOCATE_POOL) (
79     IN EFI_MEMORY_TYPE              PoolType,
80     IN UINTN                        Size,
81     OUT VOID                        **Buffer
82     );
83 
84 typedef
85 EFI_STATUS
86 (EFIAPI *EFI_FREE_POOL) (
87     IN VOID                         *Buffer
88     );
89 
90 typedef
91 EFI_STATUS
92 (EFIAPI *EFI_SET_VIRTUAL_ADDRESS_MAP) (
93     IN UINTN                        MemoryMapSize,
94     IN UINTN                        DescriptorSize,
95     IN UINT32                       DescriptorVersion,
96     IN EFI_MEMORY_DESCRIPTOR        *VirtualMap
97     );
98 
99 
100 #define EFI_OPTIONAL_PTR            0x00000001
101 #define EFI_INTERNAL_FNC            0x00000002      // Pointer to internal runtime fnc
102 #define EFI_INTERNAL_PTR            0x00000004      // Pointer to internal runtime data
103 
104 
105 typedef
106 EFI_STATUS
107 (EFIAPI *EFI_CONVERT_POINTER) (
108     IN UINTN                        DebugDisposition,
109     IN OUT VOID                     **Address
110     );
111 
112 
113 //
114 // EFI Events
115 //
116 
117 
118 
119 #define EVT_TIMER                           0x80000000
120 #define EVT_RUNTIME                         0x40000000
121 #define EVT_RUNTIME_CONTEXT                 0x20000000
122 
123 #define EVT_NOTIFY_WAIT                     0x00000100
124 #define EVT_NOTIFY_SIGNAL                   0x00000200
125 
126 #define EVT_SIGNAL_EXIT_BOOT_SERVICES       0x00000201
127 #define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE   0x60000202
128 
129 #define EVT_EFI_SIGNAL_MASK                 0x000000FF
130 #define EVT_EFI_SIGNAL_MAX                  2
131 
132 typedef
133 VOID
134 (EFIAPI *EFI_EVENT_NOTIFY) (
135     IN EFI_EVENT                Event,
136     IN VOID                     *Context
137     );
138 
139 typedef
140 EFI_STATUS
141 (EFIAPI *EFI_CREATE_EVENT) (
142     IN UINT32                       Type,
143     IN EFI_TPL                      NotifyTpl,
144     IN EFI_EVENT_NOTIFY             NotifyFunction,
145     IN VOID                         *NotifyContext,
146     OUT EFI_EVENT                   *Event
147     );
148 
149 typedef enum {
150     TimerCancel,
151     TimerPeriodic,
152     TimerRelative,
153     TimerTypeMax
154 } EFI_TIMER_DELAY;
155 
156 typedef
157 EFI_STATUS
158 (EFIAPI *EFI_SET_TIMER) (
159     IN EFI_EVENT                Event,
160     IN EFI_TIMER_DELAY          Type,
161     IN UINT64                   TriggerTime
162     );
163 
164 typedef
165 EFI_STATUS
166 (EFIAPI *EFI_SIGNAL_EVENT) (
167     IN EFI_EVENT                Event
168     );
169 
170 typedef
171 EFI_STATUS
172 (EFIAPI *EFI_WAIT_FOR_EVENT) (
173     IN UINTN                    NumberOfEvents,
174     IN EFI_EVENT                *Event,
175     OUT UINTN                   *Index
176     );
177 
178 typedef
179 EFI_STATUS
180 (EFIAPI *EFI_CLOSE_EVENT) (
181     IN EFI_EVENT                Event
182     );
183 
184 typedef
185 EFI_STATUS
186 (EFIAPI *EFI_CHECK_EVENT) (
187     IN EFI_EVENT                Event
188     );
189 
190 //
191 // Task priority level
192 //
193 
194 #define TPL_APPLICATION    4
195 #define TPL_CALLBACK       8
196 #define TPL_NOTIFY        16
197 #define TPL_HIGH_LEVEL    31
198 
199 typedef
200 EFI_TPL
201 (EFIAPI *EFI_RAISE_TPL) (
202     IN EFI_TPL      NewTpl
203     );
204 
205 typedef
206 VOID
207 (EFIAPI *EFI_RESTORE_TPL) (
208     IN EFI_TPL      OldTpl
209     );
210 
211 
212 //
213 // EFI platform varibles
214 //
215 
216 #define EFI_GLOBAL_VARIABLE \
217     { 0x8BE4DF61, 0x93CA, 0x11d2, {0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C} }
218 
219 // Variable attributes
220 #define EFI_VARIABLE_NON_VOLATILE		0x00000001
221 #define EFI_VARIABLE_BOOTSERVICE_ACCESS		0x00000002
222 #define EFI_VARIABLE_RUNTIME_ACCESS		0x00000004
223 #define	EFI_VARIABLE_HARDWARE_ERROR_RECORD	0x00000008
224 #define	EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS	0x00000010
225 #define	EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS	0x00000020
226 #define	EFI_VARIABLE_APPEND_WRITE		0x00000040
227 
228 // Variable size limitation
229 #define EFI_MAXIMUM_VARIABLE_SIZE           1024
230 
231 typedef
232 EFI_STATUS
233 (EFIAPI *EFI_GET_VARIABLE) (
234     IN CHAR16                       *VariableName,
235     IN EFI_GUID                     *VendorGuid,
236     OUT UINT32                      *Attributes OPTIONAL,
237     IN OUT UINTN                    *DataSize,
238     OUT VOID                        *Data
239     );
240 
241 typedef
242 EFI_STATUS
243 (EFIAPI *EFI_GET_NEXT_VARIABLE_NAME) (
244     IN OUT UINTN                    *VariableNameSize,
245     IN OUT CHAR16                   *VariableName,
246     IN OUT EFI_GUID                 *VendorGuid
247     );
248 
249 
250 typedef
251 EFI_STATUS
252 (EFIAPI *EFI_SET_VARIABLE) (
253     IN const CHAR16                 *VariableName,
254     IN EFI_GUID                     *VendorGuid,
255     IN UINT32                       Attributes,
256     IN UINTN                        DataSize,
257     IN VOID                         *Data
258     );
259 
260 
261 //
262 // EFI Time
263 //
264 
265 typedef struct {
266         UINT32                      Resolution;     // 1e-6 parts per million
267         UINT32                      Accuracy;       // hertz
268         BOOLEAN                     SetsToZero;     // Set clears sub-second time
269 } EFI_TIME_CAPABILITIES;
270 
271 
272 typedef
273 EFI_STATUS
274 (EFIAPI *EFI_GET_TIME) (
275     OUT EFI_TIME                    *Time,
276     OUT EFI_TIME_CAPABILITIES       *Capabilities OPTIONAL
277     );
278 
279 typedef
280 EFI_STATUS
281 (EFIAPI *EFI_SET_TIME) (
282     IN EFI_TIME                     *Time
283     );
284 
285 typedef
286 EFI_STATUS
287 (EFIAPI *EFI_GET_WAKEUP_TIME) (
288     OUT BOOLEAN                     *Enabled,
289     OUT BOOLEAN                     *Pending,
290     OUT EFI_TIME                    *Time
291     );
292 
293 typedef
294 EFI_STATUS
295 (EFIAPI *EFI_SET_WAKEUP_TIME) (
296     IN BOOLEAN                      Enable,
297     IN EFI_TIME                     *Time OPTIONAL
298     );
299 
300 
301 //
302 // Image functions
303 //
304 
305 
306 // PE32+ Subsystem type for EFI images
307 
308 #if !defined(IMAGE_SUBSYSTEM_EFI_APPLICATION)
309 #define IMAGE_SUBSYSTEM_EFI_APPLICATION             10
310 #define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER     11
311 #define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER          12
312 #endif
313 
314 // PE32+ Machine type for EFI images
315 
316 #if !defined(EFI_IMAGE_MACHINE_IA32)
317 #define EFI_IMAGE_MACHINE_IA32      0x014c
318 #endif
319 
320 #if !defined(EFI_IMAGE_MACHINE_EBC)
321 #define EFI_IMAGE_MACHINE_EBC       0x0EBC
322 #endif
323 
324 // Image Entry prototype
325 
326 typedef
327 EFI_STATUS
328 (EFIAPI *EFI_IMAGE_ENTRY_POINT) (
329     IN EFI_HANDLE                   ImageHandle,
330     IN struct _EFI_SYSTEM_TABLE     *SystemTable
331     );
332 
333 typedef
334 EFI_STATUS
335 (EFIAPI *EFI_IMAGE_LOAD) (
336     IN BOOLEAN                      BootPolicy,
337     IN EFI_HANDLE                   ParentImageHandle,
338     IN EFI_DEVICE_PATH              *FilePath,
339     IN VOID                         *SourceBuffer   OPTIONAL,
340     IN UINTN                        SourceSize,
341     OUT EFI_HANDLE                  *ImageHandle
342     );
343 
344 typedef
345 EFI_STATUS
346 (EFIAPI *EFI_IMAGE_START) (
347     IN EFI_HANDLE                   ImageHandle,
348     OUT UINTN                       *ExitDataSize,
349     OUT CHAR16                      **ExitData  OPTIONAL
350     );
351 
352 typedef
353 EFI_STATUS
354 (EFIAPI *EFI_EXIT) (
355     IN EFI_HANDLE                   ImageHandle,
356     IN EFI_STATUS                   ExitStatus,
357     IN UINTN                        ExitDataSize,
358     IN CHAR16                       *ExitData OPTIONAL
359     ) __dead2;
360 
361 typedef
362 EFI_STATUS
363 (EFIAPI *EFI_IMAGE_UNLOAD) (
364     IN EFI_HANDLE                   ImageHandle
365     );
366 
367 
368 // Image handle
369 #define LOADED_IMAGE_PROTOCOL \
370     { 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} }
371 
372 #define EFI_LOADED_IMAGE_INFORMATION_REVISION      0x1000
373 typedef struct {
374     UINT32                          Revision;
375     EFI_HANDLE                      ParentHandle;
376     struct _EFI_SYSTEM_TABLE        *SystemTable;
377 
378     // Source location of image
379     EFI_HANDLE                      DeviceHandle;
380     EFI_DEVICE_PATH                 *FilePath;
381     VOID                            *Reserved;
382 
383     // Images load options
384     UINT32                          LoadOptionsSize;
385     VOID                            *LoadOptions;
386 
387     // Location of where image was loaded
388     VOID                            *ImageBase;
389     UINT64                          ImageSize;
390     EFI_MEMORY_TYPE                 ImageCodeType;
391     EFI_MEMORY_TYPE                 ImageDataType;
392 
393     // If the driver image supports a dynamic unload request
394     EFI_IMAGE_UNLOAD                Unload;
395 
396 } EFI_LOADED_IMAGE;
397 
398 
399 typedef
400 EFI_STATUS
401 (EFIAPI *EFI_EXIT_BOOT_SERVICES) (
402     IN EFI_HANDLE                   ImageHandle,
403     IN UINTN                        MapKey
404     );
405 
406 //
407 // Misc
408 //
409 
410 
411 typedef
412 EFI_STATUS
413 (EFIAPI *EFI_STALL) (
414     IN UINTN                    Microseconds
415     );
416 
417 typedef
418 EFI_STATUS
419 (EFIAPI *EFI_SET_WATCHDOG_TIMER) (
420     IN UINTN                    Timeout,
421     IN UINT64                   WatchdogCode,
422     IN UINTN                    DataSize,
423     IN CHAR16                   *WatchdogData OPTIONAL
424     );
425 
426 
427 typedef enum {
428     EfiResetCold,
429     EfiResetWarm,
430     EfiResetShutdown
431 } EFI_RESET_TYPE;
432 
433 typedef
434 VOID
435 (EFIAPI *EFI_RESET_SYSTEM) (
436     IN EFI_RESET_TYPE           ResetType,
437     IN EFI_STATUS               ResetStatus,
438     IN UINTN                    DataSize,
439     IN CHAR16                   *ResetData OPTIONAL
440     ) __dead2;
441 
442 typedef
443 EFI_STATUS
444 (EFIAPI *EFI_GET_NEXT_MONOTONIC_COUNT) (
445     OUT UINT64                  *Count
446     );
447 
448 typedef
449 EFI_STATUS
450 (EFIAPI *EFI_GET_NEXT_HIGH_MONO_COUNT) (
451     OUT UINT32                  *HighCount
452     );
453 
454 //
455 // Protocol handler functions
456 //
457 
458 typedef enum {
459     EFI_NATIVE_INTERFACE
460 } EFI_INTERFACE_TYPE;
461 
462 typedef
463 EFI_STATUS
464 (EFIAPI *EFI_INSTALL_PROTOCOL_INTERFACE) (
465     IN OUT EFI_HANDLE           *Handle,
466     IN EFI_GUID                 *Protocol,
467     IN EFI_INTERFACE_TYPE       InterfaceType,
468     IN VOID                     *Interface
469     );
470 
471 typedef
472 EFI_STATUS
473 (EFIAPI *EFI_REINSTALL_PROTOCOL_INTERFACE) (
474     IN EFI_HANDLE               Handle,
475     IN EFI_GUID                 *Protocol,
476     IN VOID                     *OldInterface,
477     IN VOID                     *NewInterface
478     );
479 
480 typedef
481 EFI_STATUS
482 (EFIAPI *EFI_UNINSTALL_PROTOCOL_INTERFACE) (
483     IN EFI_HANDLE               Handle,
484     IN EFI_GUID                 *Protocol,
485     IN VOID                     *Interface
486     );
487 
488 typedef
489 EFI_STATUS
490 (EFIAPI *EFI_HANDLE_PROTOCOL) (
491     IN EFI_HANDLE               Handle,
492     IN EFI_GUID                 *Protocol,
493     OUT VOID                    **Interface
494     );
495 
496 typedef
497 EFI_STATUS
498 (EFIAPI *EFI_REGISTER_PROTOCOL_NOTIFY) (
499     IN EFI_GUID                 *Protocol,
500     IN EFI_EVENT                Event,
501     OUT VOID                    **Registration
502     );
503 
504 typedef enum {
505     AllHandles,
506     ByRegisterNotify,
507     ByProtocol
508 } EFI_LOCATE_SEARCH_TYPE;
509 
510 typedef
511 EFI_STATUS
512 (EFIAPI *EFI_LOCATE_HANDLE) (
513     IN EFI_LOCATE_SEARCH_TYPE   SearchType,
514     IN EFI_GUID                 *Protocol OPTIONAL,
515     IN VOID                     *SearchKey OPTIONAL,
516     IN OUT UINTN                *BufferSize,
517     OUT EFI_HANDLE              *Buffer
518     );
519 
520 typedef
521 EFI_STATUS
522 (EFIAPI *EFI_LOCATE_DEVICE_PATH) (
523     IN EFI_GUID                 *Protocol,
524     IN OUT EFI_DEVICE_PATH      **DevicePath,
525     OUT EFI_HANDLE              *Device
526     );
527 
528 typedef
529 EFI_STATUS
530 (EFIAPI *EFI_INSTALL_CONFIGURATION_TABLE) (
531     IN EFI_GUID                 *Guid,
532     IN VOID                     *Table
533     );
534 
535 typedef
536 EFI_STATUS
537 (EFIAPI *EFI_RESERVED_SERVICE) (
538     VOID
539     );
540 
541 typedef
542 EFI_STATUS
543 (EFIAPI *EFI_CONNECT_CONTROLLER) (
544   IN  EFI_HANDLE                    ControllerHandle,
545   IN  EFI_HANDLE                    *DriverImageHandle    OPTIONAL,
546   IN  EFI_DEVICE_PATH               *RemainingDevicePath  OPTIONAL,
547   IN  BOOLEAN                       Recursive
548   );
549 
550 typedef
551 EFI_STATUS
552 (EFIAPI *EFI_DISCONNECT_CONTROLLER)(
553   IN EFI_HANDLE           ControllerHandle,
554   IN EFI_HANDLE           DriverImageHandle, OPTIONAL
555   IN EFI_HANDLE           ChildHandle        OPTIONAL
556   );
557 
558 #define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL	 0x00000001
559 #define EFI_OPEN_PROTOCOL_GET_PROTOCOL	       0x00000002
560 #define EFI_OPEN_PROTOCOL_TEST_PROTOCOL        0x00000004
561 #define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER  0x00000008
562 #define EFI_OPEN_PROTOCOL_BY_DRIVER            0x00000010
563 #define EFI_OPEN_PROTOCOL_EXCLUSIVE            0x00000020
564 
565 typedef
566 EFI_STATUS
567 (EFIAPI *EFI_OPEN_PROTOCOL) (
568   IN EFI_HANDLE                 Handle,
569   IN EFI_GUID                   *Protocol,
570   OUT VOID                      **Interface,
571   IN  EFI_HANDLE                ImageHandle,
572   IN  EFI_HANDLE                ControllerHandle, OPTIONAL
573   IN  UINT32                    Attributes
574   );
575 
576 typedef
577 EFI_STATUS
578 (EFIAPI *EFI_CLOSE_PROTOCOL) (
579   IN EFI_HANDLE               Handle,
580   IN EFI_GUID                 *Protocol,
581   IN EFI_HANDLE               ImageHandle,
582   IN EFI_HANDLE               DeviceHandle
583   );
584 
585 typedef struct {
586   EFI_HANDLE                  AgentHandle;
587   EFI_HANDLE                  ControllerHandle;
588   UINT32                      Attributes;
589   UINT32                      OpenCount;
590 } EFI_OPEN_PROTOCOL_INFORMATION_ENTRY;
591 
592 typedef
593 EFI_STATUS
594 (EFIAPI *EFI_OPEN_PROTOCOL_INFORMATION) (
595   IN  EFI_HANDLE                          UserHandle,
596   IN  EFI_GUID                            *Protocol,
597   IN  EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,
598   OUT UINTN                               *EntryCount
599   );
600 
601 typedef
602 EFI_STATUS
603 (EFIAPI *EFI_PROTOCOLS_PER_HANDLE) (
604   IN EFI_HANDLE       UserHandle,
605   OUT EFI_GUID        ***ProtocolBuffer,
606   OUT UINTN           *ProtocolBufferCount
607   );
608 
609 typedef
610 EFI_STATUS
611 (EFIAPI *EFI_LOCATE_HANDLE_BUFFER) (
612   IN EFI_LOCATE_SEARCH_TYPE       SearchType,
613   IN EFI_GUID                     *Protocol OPTIONAL,
614   IN VOID                         *SearchKey OPTIONAL,
615   IN OUT UINTN                    *NumberHandles,
616   OUT EFI_HANDLE                  **Buffer
617   );
618 
619 typedef
620 EFI_STATUS
621 (EFIAPI *EFI_LOCATE_PROTOCOL) (
622   EFI_GUID  *Protocol,
623   VOID      *Registration, OPTIONAL
624   VOID      **Interface
625   );
626 
627 typedef
628 EFI_STATUS
629 (EFIAPI *EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES) (
630   IN OUT EFI_HANDLE           *Handle,
631   ...
632   );
633 
634 typedef
635 EFI_STATUS
636 (EFIAPI *EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES) (
637   IN EFI_HANDLE           Handle,
638   ...
639   );
640 
641 typedef
642 EFI_STATUS
643 (EFIAPI *EFI_CALCULATE_CRC32) (
644   IN  VOID                              *Data,
645   IN  UINTN                             DataSize,
646   OUT UINT32                            *Crc32
647   );
648 
649 typedef
650 VOID
651 (EFIAPI *EFI_COPY_MEM) (
652   IN VOID     *Destination,
653   IN VOID     *Source,
654   IN UINTN    Length
655   );
656 
657 typedef
658 VOID
659 (EFIAPI *EFI_SET_MEM) (
660   IN VOID     *Buffer,
661   IN UINTN    Size,
662   IN UINT8    Value
663   );
664 
665 //
666 // Standard EFI table header
667 //
668 
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;
676 
677 
678 //
679 // EFI Runtime Serivces Table
680 //
681 
682 #define EFI_RUNTIME_SERVICES_SIGNATURE  0x56524553544e5552
683 #define EFI_RUNTIME_SERVICES_REVISION   ((EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION))
684 
685 typedef struct  {
686   EFI_TABLE_HEADER                Hdr;
687 
688   //
689   // Time services
690   //
691 
692   EFI_GET_TIME                    GetTime;
693   EFI_SET_TIME                    SetTime;
694   EFI_GET_WAKEUP_TIME             GetWakeupTime;
695   EFI_SET_WAKEUP_TIME             SetWakeupTime;
696 
697   //
698   // Virtual memory services
699   //
700 
701   EFI_SET_VIRTUAL_ADDRESS_MAP     SetVirtualAddressMap;
702   EFI_CONVERT_POINTER             ConvertPointer;
703 
704   //
705   // Variable serviers
706   //
707 
708   EFI_GET_VARIABLE                GetVariable;
709   EFI_GET_NEXT_VARIABLE_NAME      GetNextVariableName;
710   EFI_SET_VARIABLE                SetVariable;
711 
712   //
713   // Misc
714   //
715 
716   EFI_GET_NEXT_HIGH_MONO_COUNT    GetNextHighMonotonicCount;
717   EFI_RESET_SYSTEM                ResetSystem;
718 
719 } EFI_RUNTIME_SERVICES;
720 
721 
722 //
723 // EFI Boot Services Table
724 //
725 
726 #define EFI_BOOT_SERVICES_SIGNATURE     0x56524553544f4f42
727 #define EFI_BOOT_SERVICES_REVISION      ((EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION))
728 
729 typedef struct {
730 
731   EFI_TABLE_HEADER                Hdr;
732 
733   //
734   // Task priority functions
735   //
736 
737   EFI_RAISE_TPL                   RaiseTPL;
738   EFI_RESTORE_TPL                 RestoreTPL;
739 
740   //
741   // Memory functions
742   //
743 
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;
749 
750   //
751   // Event & timer functions
752   //
753 
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;
760 
761   //
762   // Protocol handler functions
763   //
764 
765   EFI_INSTALL_PROTOCOL_INTERFACE  InstallProtocolInterface;
766   EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface;
767   EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface;
768   EFI_HANDLE_PROTOCOL             HandleProtocol;
769   VOID                            *Reserved;
770   EFI_REGISTER_PROTOCOL_NOTIFY    RegisterProtocolNotify;
771   EFI_LOCATE_HANDLE               LocateHandle;
772   EFI_LOCATE_DEVICE_PATH          LocateDevicePath;
773   EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable;
774 
775   //
776   // Image functions
777   //
778 
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;
784 
785   //
786   // Misc functions
787   //
788 
789   EFI_GET_NEXT_MONOTONIC_COUNT    GetNextMonotonicCount;
790   EFI_STALL                       Stall;
791   EFI_SET_WATCHDOG_TIMER          SetWatchdogTimer;
792 
793   //
794   // DriverSupport Services
795   //
796   EFI_CONNECT_CONTROLLER	        ConnectController;
797   EFI_DISCONNECT_CONTROLLER       DisconnectController;
798 
799   //
800   // Open and Close Protocol Services
801   //
802   EFI_OPEN_PROTOCOL               OpenProtocol;
803   EFI_CLOSE_PROTOCOL              CloseProtocol;
804   EFI_OPEN_PROTOCOL_INFORMATION   OpenProtocolInformation;
805 
806   //
807   // Library Services to reduce size of drivers
808   //
809   EFI_PROTOCOLS_PER_HANDLE        ProtocolsPerHandle;
810   EFI_LOCATE_HANDLE_BUFFER        LocateHandleBuffer;
811   EFI_LOCATE_PROTOCOL             LocateProtocol;
812 
813   EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES    InstallMultipleProtocolInterfaces;
814   EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES  UninstallMultipleProtocolInterfaces;
815 
816   //
817   // CRC32 services
818   //
819   EFI_CALCULATE_CRC32             CalculateCrc32;
820 
821   //
822   // Memory Utility Services
823   //
824   EFI_COPY_MEM                    CopyMem;
825   EFI_SET_MEM                     SetMem;
826 
827 } EFI_BOOT_SERVICES;
828 
829 
830 //
831 // EFI Configuration Table and GUID definitions
832 //
833 
834 #define MPS_TABLE_GUID \
835     { 0xeb9d2d2f, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
836 
837 #define ACPI_TABLE_GUID \
838     { 0xeb9d2d30, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
839 
840 #define ACPI_20_TABLE_GUID \
841     { 0x8868e871, 0xe4f1, 0x11d3, {0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} }
842 
843 #define SMBIOS_TABLE_GUID \
844     { 0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
845 
846 #define SMBIOS3_TABLE_GUID \
847 	{ 0xf2fd1544, 0x9794, 0x4a2c, {0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94} }
848 
849 #define SAL_SYSTEM_TABLE_GUID  \
850     { 0xeb9d2d32, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
851 
852 #define FDT_TABLE_GUID \
853     { 0xb1b621d5, 0xf19c, 0x41a5, {0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0} }
854 
855 #define DXE_SERVICES_TABLE_GUID \
856     { 0x5ad34ba, 0x6f02, 0x4214, {0x95, 0x2e, 0x4d, 0xa0, 0x39, 0x8e, 0x2b, 0xb9} }
857 
858 #define HOB_LIST_TABLE_GUID \
859     { 0x7739f24c, 0x93d7, 0x11d4, {0x9a, 0x3a, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
860 
861 #define LZMA_DECOMPRESSION_GUID \
862 	{ 0xee4e5898, 0x3914, 0x4259, {0x9d, 0x6e, 0xdc, 0x7b, 0xd7, 0x94, 0x3, 0xcf} }
863 
864 #define ARM_MP_CORE_INFO_TABLE_GUID \
865 	{ 0xa4ee0728, 0xe5d7, 0x4ac5, {0xb2, 0x1e, 0x65, 0x8e, 0xd8, 0x57, 0xe8, 0x34} }
866 
867 #define ESRT_TABLE_GUID \
868 	{ 0xb122a263, 0x3661, 0x4f68, {0x99, 0x29, 0x78, 0xf8, 0xb0, 0xd6, 0x21, 0x80} }
869 
870 #define MEMORY_TYPE_INFORMATION_TABLE_GUID \
871     { 0x4c19049f, 0x4137, 0x4dd3, {0x9c, 0x10, 0x8b, 0x97, 0xa8, 0x3f, 0xfd, 0xfa} }
872 
873 #define DEBUG_IMAGE_INFO_TABLE_GUID \
874     { 0x49152e77, 0x1ada, 0x4764, {0xb7, 0xa2, 0x7a, 0xfe, 0xfe, 0xd9, 0x5e, 0x8b} }
875 
876 typedef struct _EFI_CONFIGURATION_TABLE {
877   EFI_GUID                VendorGuid;
878   VOID                    *VendorTable;
879 } EFI_CONFIGURATION_TABLE;
880 
881 
882 //
883 // EFI System Table
884 //
885 
886 
887 
888 
889 #define EFI_SYSTEM_TABLE_SIGNATURE      0x5453595320494249
890 #define EFI_SYSTEM_TABLE_REVISION      ((EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION))
891 #define EFI_1_10_SYSTEM_TABLE_REVISION ((1<<16) | 10)
892 #define EFI_1_02_SYSTEM_TABLE_REVISION ((1<<16) | 02)
893 
894 typedef struct _EFI_SYSTEM_TABLE {
895   EFI_TABLE_HEADER                Hdr;
896 
897   CHAR16                          *FirmwareVendor;
898   UINT32                          FirmwareRevision;
899 
900   EFI_HANDLE                      ConsoleInHandle;
901   SIMPLE_INPUT_INTERFACE          *ConIn;
902 
903   EFI_HANDLE                      ConsoleOutHandle;
904   SIMPLE_TEXT_OUTPUT_INTERFACE    *ConOut;
905 
906   EFI_HANDLE                      StandardErrorHandle;
907   SIMPLE_TEXT_OUTPUT_INTERFACE    *StdErr;
908 
909   EFI_RUNTIME_SERVICES            *RuntimeServices;
910   EFI_BOOT_SERVICES               *BootServices;
911 
912   UINTN                           NumberOfTableEntries;
913   EFI_CONFIGURATION_TABLE         *ConfigurationTable;
914 
915 } EFI_SYSTEM_TABLE;
916 
917 /*
918  * unlisted GUID's..
919  */
920 #define EFI_EBC_INTERPRETER_PROTOCOL_GUID \
921 { 0x13AC6DD1, 0x73D0, 0x11D4, {0xB0, 0x6B, 0x00, 0xAA, 0x00, 0xBD, 0x6D, 0xE7} }
922 
923 #define EFI_DRIVER_CONFIGURATION2_PROTOCOL_GUID \
924 { 0xbfd7dc1d, 0x24f1, 0x40d9, {0x82, 0xe7, 0x2e, 0x09, 0xbb, 0x6b, 0x4e, 0xbe} }
925 
926 #define EFI_DRIVER_CONFIGURATION_PROTOCOL_GUID \
927 { 0x107a772b, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
928 
929 #define EFI_DRIVER_BINDING_PROTOCOL_GUID \
930   { 0x18A031AB, 0xB443, 0x4D1A, \
931     { 0xA5, 0xC0, 0x0C, 0x09, 0x26, 0x1E, 0x9F, 0x71 } \
932   }
933 
934 #define EFI_TAPE_IO_PROTOCOL_GUID \
935   { 0x1e93e633, 0xd65a, 0x459e, \
936     { 0xab, 0x84, 0x93, 0xd9, 0xec, 0x26, 0x6d, 0x18 } \
937   }
938 
939 #define EFI_SCSI_IO_PROTOCOL_GUID \
940   { 0x932f47e6, 0x2362, 0x4002, \
941     { 0x80, 0x3e, 0x3c, 0xd5, 0x4b, 0x13, 0x8f, 0x85 } \
942   }
943 
944 #define EFI_USB2_HC_PROTOCOL_GUID \
945   { 0x3e745226, 0x9818, 0x45b6, \
946     { 0xa2, 0xac, 0xd7, 0xcd, 0x0e, 0x8b, 0xa2, 0xbc } \
947   }
948 
949 #define EFI_DEBUG_SUPPORT_PROTOCOL_GUID \
950   { 0x2755590C, 0x6F3C, 0x42FA, \
951     { 0x9E, 0xA4, 0xA3, 0xBA, 0x54, 0x3C, 0xDA, 0x25 } \
952   }
953 
954 #define EFI_DEBUGPORT_PROTOCOL_GUID \
955   { 0xEBA4E8D2, 0x3858, 0x41EC, \
956     { 0xA2, 0x81, 0x26, 0x47, 0xBA, 0x96, 0x60, 0xD0 } \
957   }
958 
959 #define EFI_DECOMPRESS_PROTOCOL_GUID \
960   { 0xd8117cfe, 0x94a6, 0x11d4, \
961     { 0x9a, 0x3a, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
962   }
963 
964 #define EFI_ACPI_TABLE_PROTOCOL_GUID \
965   { 0xffe06bdd, 0x6107, 0x46a6, \
966     { 0x7b, 0xb2, 0x5a, 0x9c, 0x7e, 0xc5, 0x27, 0x5c} \
967   }
968 
969 #define EFI_HII_CONFIG_ROUTING_PROTOCOL_GUID \
970   { 0x587e72d7, 0xcc50, 0x4f79, \
971     { 0x82, 0x09, 0xca, 0x29, 0x1f, 0xc1, 0xa1, 0x0f } \
972   }
973 
974 #define EFI_HII_DATABASE_PROTOCOL_GUID \
975   { 0xef9fc172, 0xa1b2, 0x4693, \
976     { 0xb3, 0x27, 0x6d, 0x32, 0xfc, 0x41, 0x60, 0x42 } \
977   }
978 
979 #define EFI_HII_STRING_PROTOCOL_GUID \
980   { 0xfd96974, 0x23aa, 0x4cdc, \
981     { 0xb9, 0xcb, 0x98, 0xd1, 0x77, 0x50, 0x32, 0x2a } \
982   }
983 
984 #define EFI_HII_IMAGE_PROTOCOL_GUID \
985   { 0x31a6406a, 0x6bdf, 0x4e46, \
986     { 0xb2, 0xa2, 0xeb, 0xaa, 0x89, 0xc4, 0x9, 0x20 } \
987   }
988 
989 #define EFI_HII_FONT_PROTOCOL_GUID \
990   { 0xe9ca4775, 0x8657, 0x47fc, \
991     { 0x97, 0xe7, 0x7e, 0xd6, 0x5a, 0x8, 0x43, 0x24 } \
992   }
993 #define EFI_HII_CONFIGURATION_ACCESS_PROTOCOL_GUID \
994   { 0x330d4706, 0xf2a0, 0x4e4f, \
995     { 0xa3, 0x69, 0xb6, 0x6f, 0xa8, 0xd5, 0x43, 0x85 } \
996   }
997 
998 #define EFI_COMPONENT_NAME_PROTOCOL_GUID \
999 { 0x107a772c, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
1000 
1001 #define EFI_COMPONENT_NAME2_PROTOCOL_GUID \
1002   { 0x6a7a5cff, 0xe8d9, 0x4f70, \
1003     { 0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14} \
1004   }
1005 
1006 #define EFI_USB_IO_PROTOCOL_GUID \
1007   { 0x2B2F68D6, 0x0CD2, 0x44cf, \
1008     { 0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75 } \
1009   }
1010 #define EFI_HCDP_TABLE_GUID \
1011   { 0xf951938d, 0x620b, 0x42ef, \
1012       { 0x82, 0x79, 0xa8, 0x4b, 0x79, 0x61, 0x78, 0x98 } \
1013   }
1014 
1015 #define EFI_DEVICE_TREE_GUID \
1016   { 0xb1b621d5, 0xf19c, 0x41a5, \
1017       { 0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0 } \
1018   }
1019 
1020 #define EFI_VENDOR_APPLE_GUID \
1021   { 0x2B0585EB, 0xD8B8, 0x49A9, \
1022       { 0x8B, 0x8C, 0xE2, 0x1B, 0x01, 0xAE, 0xF2, 0xB7 } \
1023   }
1024 
1025 #define EFI_CONSOLE_IN_DEVICE_GUID    \
1026 { 0xd3b36f2b, 0xd551, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
1027 
1028 #define EFI_CONSOLE_OUT_DEVICE_GUID    \
1029 { 0xd3b36f2c, 0xd551, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
1030 
1031 #define EFI_STANDARD_ERROR_DEVICE_GUID	\
1032 { 0xd3b36f2d, 0xd551, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
1033 
1034 #define EFI_UNICODE_COLLATION2_PROTOCOL_GUID \
1035 { 0xa4c751fc, 0x23ae, 0x4c3e, {0x92, 0xe9, 0x49, 0x64, 0xcf, 0x63, 0xf3, 0x49} }
1036 
1037 #define EFI_FORM_BROWSER2_PROTOCOL_GUID \
1038 { 0xb9d4c360, 0xbcfb, 0x4f9b, {0x92, 0x98, 0x53, 0xc1, 0x36, 0x98, 0x22, 0x58} }
1039 
1040 #define EFI_ARP_SERVICE_BINDING_PROTOCOL_GUID \
1041 { 0xf44c00ee, 0x1f2c, 0x4a00, {0xaa, 0x9, 0x1c, 0x9f, 0x3e, 0x8, 0x0, 0xa3} }
1042 
1043 #define EFI_ARP_PROTOCOL_GUID \
1044 { 0xf4b427bb, 0xba21, 0x4f16, {0xbc, 0x4e, 0x43, 0xe4, 0x16, 0xab, 0x61, 0x9c} }
1045 
1046 #define EFI_IP4_CONFIG_PROTOCOL_GUID \
1047 { 0x3b95aa31, 0x3793, 0x434b, {0x86, 0x67, 0xc8, 0x07, 0x08, 0x92, 0xe0, 0x5e} }
1048 
1049 #define EFI_IP6_CONFIG_PROTOCOL_GUID \
1050 { 0x937fe521, 0x95ae, 0x4d1a, {0x89, 0x29, 0x48, 0xbc, 0xd9, 0x0a, 0xd3, 0x1a} }
1051 
1052 #define EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL_GUID \
1053 { 0xf36ff770, 0xa7e1, 0x42cf, {0x9e, 0xd2, 0x56, 0xf0, 0xf2, 0x71, 0xf4, 0x4c} }
1054 
1055 #define EFI_MANAGED_NETWORK_PROTOCOL_GUID \
1056 { 0x7ab33a91, 0xace5, 0x4326, {0xb5, 0x72, 0xe7, 0xee, 0x33, 0xd3, 0x9f, 0x16} }
1057 
1058 #define EFI_MTFTP4_SERVICE_BINDING_PROTOCOL_GUID \
1059 { 0x2FE800BE, 0x8F01, 0x4aa6, {0x94, 0x6B, 0xD7, 0x13, 0x88, 0xE1, 0x83, 0x3F} }
1060 
1061 #define EFI_MTFTP4_PROTOCOL_GUID \
1062 { 0x78247c57, 0x63db, 0x4708, {0x99, 0xc2, 0xa8, 0xb4, 0xa9, 0xa6, 0x1f, 0x6b} }
1063 
1064 #define EFI_MTFTP6_SERVICE_BINDING_PROTOCOL_GUID \
1065 { 0xd9760ff3, 0x3cca, 0x4267, {0x80, 0xf9, 0x75, 0x27, 0xfa, 0xfa, 0x42, 0x23} }
1066 
1067 #define EFI_MTFTP6_PROTOCOL_GUID \
1068 { 0xbf0a78ba, 0xec29, 0x49cf, {0xa1, 0xc9, 0x7a, 0xe5, 0x4e, 0xab, 0x6a, 0x51} }
1069 
1070 #define EFI_DHCP4_PROTOCOL_GUID \
1071 { 0x8a219718, 0x4ef5, 0x4761, {0x91, 0xc8, 0xc0, 0xf0, 0x4b, 0xda, 0x9e, 0x56} }
1072 
1073 #define EFI_DHCP4_SERVICE_BINDING_PROTOCOL_GUID \
1074 { 0x9d9a39d8, 0xbd42, 0x4a73, {0xa4, 0xd5, 0x8e, 0xe9, 0x4b, 0xe1, 0x13, 0x80} }
1075 
1076 #define EFI_DHCP6_SERVICE_BINDING_PROTOCOL_GUID \
1077 { 0x9fb9a8a1, 0x2f4a, 0x43a6, {0x88, 0x9c, 0xd0, 0xf7, 0xb6, 0xc4, 0x7a, 0xd5} }
1078 
1079 #define EFI_DHCP6_PROTOCOL_GUID \
1080 { 0x87c8bad7, 0x595, 0x4053, {0x82, 0x97, 0xde, 0xde, 0x39, 0x5f, 0x5d, 0x5b} }
1081 
1082 #define EFI_SCSI_PASS_THRU_PROTOCOL_GUID \
1083 { 0xa59e8fcf, 0xbda0, 0x43bb, {0x90, 0xb1, 0xd3, 0x73, 0x2e, 0xca, 0xa8, 0x77} }
1084 
1085 #define EFI_EXT_SCSI_PASS_THRU_PROTOCOL_GUID \
1086 { 0x143b7632, 0xb81b, 0x4cb7, {0xab, 0xd3, 0xb6, 0x25, 0xa5, 0xb9, 0xbf, 0xfe} }
1087 
1088 #define EFI_DISK_INFO_PROTOCOL_GUID \
1089 { 0xd432a67f, 0x14dc, 0x484b, {0xb3, 0xbb, 0x3f, 0x2, 0x91, 0x84, 0x93, 0x27} }
1090 
1091 #define EFI_ISA_IO_PROTOCOL_GUID \
1092 { 0x7ee2bd44, 0x3da0, 0x11d4, { 0x9a, 0x38, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
1093 
1094 #define EFI_VLAN_CONFIG_PROTOCOL_GUID \
1095 { 0x9e23d768, 0xd2f3, 0x4366, {0x9f, 0xc3, 0x3a, 0x7a, 0xba, 0x86, 0x43, 0x74} }
1096 
1097 #define EFI_IDE_CONTROLLER_INIT_PROTOCOL_GUID \
1098 { 0xa1e37052, 0x80d9, 0x4e65, {0xa3, 0x17, 0x3e, 0x9a, 0x55, 0xc4, 0x3e, 0xc9} }
1099 
1100 #define EFI_ISA_ACPI_PROTOCOL_GUID \
1101 { 0x64a892dc, 0x5561, 0x4536, {0x92, 0xc7, 0x79, 0x9b, 0xfc, 0x18, 0x33, 0x55} }
1102 
1103 #define EFI_PCI_ENUMERATION_COMPLETE_GUID \
1104 { 0x30cfe3e7, 0x3de1, 0x4586, {0xbe, 0x20, 0xde, 0xab, 0xa1, 0xb3, 0xb7, 0x93} }
1105 
1106 #define EFI_DRIVER_DIAGNOSTICS_PROTOCOL_GUID \
1107 { 0x0784924f, 0xe296, 0x11d4, {0x9a, 0x49, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }
1108 
1109 #define EFI_DRIVER_DIAGNOSTICS2_PROTOCOL_GUID \
1110 { 0x4d330321, 0x025f, 0x4aac, {0x90, 0xd8, 0x5e, 0xd9, 0x00, 0x17, 0x3b, 0x63} }
1111 
1112 #define EFI_CAPSULE_ARCH_PROTOCOL_GUID \
1113 { 0x5053697e, 0x2cbc, 0x4819, {0x90, 0xd9, 0x05, 0x80, 0xde, 0xee, 0x57, 0x54} }
1114 
1115 #define EFI_MONOTONIC_COUNTER_ARCH_PROTOCOL_GUID \
1116 {0x1da97072, 0xbddc, 0x4b30, {0x99, 0xf1, 0x72, 0xa0, 0xb5, 0x6f, 0xff, 0x2a} }
1117 
1118 #define EFI_REALTIME_CLOCK_ARCH_PROTOCOL_GUID \
1119 {0x27cfac87, 0x46cc, 0x11d4, {0x9a, 0x38, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
1120 
1121 #define EFI_MP_SERVICES_PROTOCOL_GUID \
1122 { 0x3fdda605, 0xa76e, 0x4f46, {0xad, 0x29, 0x12, 0xf4, 0x53, 0x1b, 0x3d, 0x08} }
1123 
1124 #define EFI_VARIABLE_ARCH_PROTOCOL_GUID \
1125 { 0x1e5668e2, 0x8481, 0x11d4, {0xbc, 0xf1, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
1126 
1127 #define EFI_VARIABLE_WRITE_ARCH_PROTOCOL_GUID \
1128 { 0x6441f818, 0x6362, 0x4e44, {0xb5, 0x70, 0x7d, 0xba, 0x31, 0xdd, 0x24, 0x53} }
1129 
1130 #define EFI_WATCHDOG_TIMER_ARCH_PROTOCOL_GUID \
1131 { 0x6441f818, 0x6362, 0x4e44, {0xb5, 0x70, 0x7d, 0xba, 0x31, 0xdd, 0x24, 0x53} }
1132 
1133 #define EFI_ACPI_SUPPORT_PROTOCOL_GUID \
1134 { 0x6441f818, 0x6362, 0x4e44, {0xb5, 0x70, 0x7d, 0xba, 0x31, 0xdd, 0x24, 0x53} }
1135 
1136 #define EFI_BDS_ARCH_PROTOCOL_GUID \
1137 { 0x665e3ff6, 0x46cc, 0x11d4, {0x9a, 0x38, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
1138 
1139 #define EFI_METRONOME_ARCH_PROTOCOL_GUID \
1140 { 0x26baccb2, 0x6f42, 0x11d4, {0xbc, 0xe7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
1141 
1142 #define EFI_TIMER_ARCH_PROTOCOL_GUID \
1143 { 0x26baccb3, 0x6f42, 0x11d4, {0xbc, 0xe7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
1144 
1145 #define EFI_DPC_PROTOCOL_GUID \
1146 { 0x480f8ae9, 0xc46, 0x4aa9, { 0xbc, 0x89, 0xdb, 0x9f, 0xba, 0x61, 0x98, 0x6} }
1147 
1148 #define EFI_PRINT2_PROTOCOL_GUID  \
1149 { 0xf05976ef, 0x83f1, 0x4f3d, {0x86, 0x19, 0xf7, 0x59, 0x5d, 0x41, 0xe5, 0x38} }
1150 
1151 #define EFI_RESET_ARCH_PROTOCOL_GUID  \
1152 { 0x27cfac88, 0x46cc, 0x11d4, {0x9a, 0x38, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
1153 
1154 #define EFI_CPU_ARCH_PROTOCOL_GUID \
1155 { 0x26baccb1, 0x6f42, 0x11d4, {0xbc, 0xe7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
1156 
1157 #define EFI_CPU_IO2_PROTOCOL_GUID \
1158 { 0xad61f191, 0xae5f, 0x4c0e, {0xb9, 0xfa, 0xe8, 0x69, 0xd2, 0x88, 0xc6, 0x4f} }
1159 
1160 #define EFI_LEGACY_8259_PROTOCOL_GUID \
1161 { 0x38321dba, 0x4fe0, 0x4e17, {0x8a, 0xec, 0x41, 0x30, 0x55, 0xea, 0xed, 0xc1} }
1162 
1163 #define EFI_SECURITY_ARCH_PROTOCOL_GUID \
1164 { 0xa46423e3, 0x4617, 0x49f1, {0xb9, 0xff, 0xd1, 0xbf, 0xa9, 0x11, 0x58, 0x39} }
1165 
1166 #define EFI_SECURITY2_ARCH_PROTOCOL_GUID \
1167 { 0x94ab2f58, 0x1438, 0x4ef1, {0x91, 0x52, 0x18, 0x94, 0x1a, 0x3a, 0x0e, 0x68} }
1168 
1169 #define EFI_RUNTIME_ARCH_PROTOCOL_GUID \
1170 { 0xb7dfb4e1, 0x52f, 0x449f, {0x87, 0xbe, 0x98, 0x18, 0xfc, 0x91, 0xb7, 0x33} }
1171 
1172 #define EFI_STATUS_CODE_RUNTIME_PROTOCOL_GUID  \
1173 { 0xd2b2b828, 0x826, 0x48a7, {0xb3, 0xdf, 0x98, 0x3c, 0x0, 0x60, 0x24, 0xf0} }
1174 
1175 #define EFI_DATA_HUB_PROTOCOL_GUID \
1176 { 0xae80d021, 0x618e, 0x11d4, {0xbc, 0xd7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} }
1177 
1178 #define PCD_PROTOCOL_GUID \
1179 { 0x11b34006, 0xd85b, 0x4d0a, { 0xa2, 0x90, 0xd5, 0xa5, 0x71, 0x31, 0xe, 0xf7} }
1180 
1181 #define EFI_PCD_PROTOCOL_GUID \
1182 { 0x13a3f0f6, 0x264a, 0x3ef0, {0xf2, 0xe0, 0xde, 0xc5, 0x12, 0x34, 0x2f, 0x34} }
1183 
1184 #define EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL_GUID \
1185 { 0x8f644fa9, 0xe850, 0x4db1, {0x9c, 0xe2, 0xb, 0x44, 0x69, 0x8e, 0x8d, 0xa4 } }
1186 
1187 #define EFI_FIRMWARE_VOLUME2_PROTOCOL_GUID \
1188 { 0x220e73b6, 0x6bdb, 0x4413, { 0x84, 0x5, 0xb9, 0x74, 0xb1, 0x8, 0x61, 0x9a } }
1189 
1190 #define EFI_FIRMWARE_VOLUME_DISPATCH_PROTOCOL_GUID \
1191 { 0x7aa35a69, 0x506c, 0x444f, {0xa7, 0xaf, 0x69, 0x4b, 0xf5, 0x6f, 0x71, 0xc8} }
1192 
1193 #define LZMA_COMPRESS_GUID \
1194 { 0xee4e5898, 0x3914, 0x4259, {0x9d, 0x6e, 0xdc, 0x7b, 0xd7, 0x94, 0x03, 0xcf} }
1195 #endif
1196