iPXE
UefiSpec.h
Go to the documentation of this file.
1 /** @file
2  Include file that supports UEFI.
3 
4  This include file must contain things defined in the UEFI 2.7 specification.
5  If a code construct is defined in the UEFI 2.7 specification it must be included
6  by this include file.
7 
8 Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
9 Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
10 Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
11 
12 SPDX-License-Identifier: BSD-2-Clause-Patent
13 
14 **/
15 
16 #ifndef __UEFI_SPEC_H__
17 #define __UEFI_SPEC_H__
18 
19 FILE_LICENCE ( BSD2_PATENT );
20 
22 
27 
28 ///
29 /// Enumeration of EFI memory allocation types.
30 ///
31 typedef enum {
32  ///
33  /// Allocate any available range of pages that satisfies the request.
34  ///
36  ///
37  /// Allocate any available range of pages whose uppermost address is less than
38  /// or equal to a specified maximum address.
39  ///
41  ///
42  /// Allocate pages at a specified address.
43  ///
45  ///
46  /// Maximum enumeration value that may be used for bounds checking.
47  ///
50 
51 //
52 // Bit definitions for EFI_TIME.Daylight
53 //
54 #define EFI_TIME_ADJUST_DAYLIGHT 0x01
55 #define EFI_TIME_IN_DAYLIGHT 0x02
56 
57 ///
58 /// Value definition for EFI_TIME.TimeZone.
59 ///
60 #define EFI_UNSPECIFIED_TIMEZONE 0x07FF
61 
62 //
63 // Memory cacheability attributes
64 //
65 #define EFI_MEMORY_UC 0x0000000000000001ULL
66 #define EFI_MEMORY_WC 0x0000000000000002ULL
67 #define EFI_MEMORY_WT 0x0000000000000004ULL
68 #define EFI_MEMORY_WB 0x0000000000000008ULL
69 #define EFI_MEMORY_UCE 0x0000000000000010ULL
70 //
71 // Physical memory protection attributes
72 //
73 // Note: UEFI spec 2.5 and following: use EFI_MEMORY_RO as write-protected physical memory
74 // protection attribute. Also, EFI_MEMORY_WP means cacheability attribute.
75 //
76 #define EFI_MEMORY_WP 0x0000000000001000ULL
77 #define EFI_MEMORY_RP 0x0000000000002000ULL
78 #define EFI_MEMORY_XP 0x0000000000004000ULL
79 #define EFI_MEMORY_RO 0x0000000000020000ULL
80 //
81 // Physical memory persistence attribute.
82 // The memory region supports byte-addressable non-volatility.
83 //
84 #define EFI_MEMORY_NV 0x0000000000008000ULL
85 //
86 // The memory region provides higher reliability relative to other memory in the system.
87 // If all memory has the same reliability, then this bit is not used.
88 //
89 #define EFI_MEMORY_MORE_RELIABLE 0x0000000000010000ULL
90 
91 //
92 // Note: UEFI spec 2.8 and following:
93 //
94 // Specific-purpose memory (SPM). The memory is earmarked for
95 // specific purposes such as for specific device drivers or applications.
96 // The SPM attribute serves as a hint to the OS to avoid allocating this
97 // memory for core OS data or code that can not be relocated.
98 //
99 #define EFI_MEMORY_SP 0x0000000000040000ULL
100 //
101 // If this flag is set, the memory region is capable of being
102 // protected with the CPU's memory cryptographic
103 // capabilities. If this flag is clear, the memory region is not
104 // capable of being protected with the CPU's memory
105 // cryptographic capabilities or the CPU does not support CPU
106 // memory cryptographic capabilities.
107 //
108 #define EFI_MEMORY_CPU_CRYPTO 0x0000000000080000ULL
109 
110 //
111 // If this flag is set, the memory region is present and capable of having
112 // memory dynamically removed from the platform. This attribute serves as
113 // a hint to the OS prior to its ACPI subsystem initialization to avoid
114 // allocating this memory for core OS data or code that cannot be dynamically
115 // relocated at runtime. If this flag is clear, the memory region is not
116 // capable of being dynamically removed from the platform at runtime.
117 //
118 #define EFI_MEMORY_HOT_PLUGGABLE 0x0000000000100000
119 
120 //
121 // Runtime memory attribute
122 //
123 #define EFI_MEMORY_RUNTIME 0x8000000000000000ULL
124 
125 //
126 // If this flag is set, the memory region is
127 // described with additional ISA-specific memory attributes
128 // as specified in EFI_MEMORY_ISA_MASK.
129 //
130 #define EFI_MEMORY_ISA_VALID 0x4000000000000000ULL
131 
132 //
133 // Defines the bits reserved for describing optional ISA-specific cacheability
134 // attributes that are not covered by the standard UEFI Memory Attributes cacheability
135 // bits (EFI_MEMORY_UC, EFI_MEMORY_WC, EFI_MEMORY_WT, EFI_MEMORY_WB and EFI_MEMORY_UCE).
136 // See Calling Conventions for further ISA-specific enumeration of these bits.
137 //
138 #define EFI_MEMORY_ISA_MASK 0x0FFFF00000000000ULL
139 
140 //
141 // Attributes bitmasks, grouped by type
142 //
143 #define EFI_CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP)
144 #define EFI_MEMORY_ACCESS_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO)
145 #define EFI_MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_ACCESS_MASK | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO)
146 
147 ///
148 /// Memory descriptor version number.
149 ///
150 #define EFI_MEMORY_DESCRIPTOR_VERSION 1
151 
152 ///
153 /// Definition of an EFI memory descriptor.
154 ///
155 typedef struct {
156  ///
157  /// Type of the memory region.
158  /// Type EFI_MEMORY_TYPE is defined in the
159  /// AllocatePages() function description.
160  ///
162  ///
163  /// Physical address of the first byte in the memory region. PhysicalStart must be
164  /// aligned on a 4 KiB boundary, and must not be above 0xfffffffffffff000. Type
165  /// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function description
166  ///
168  ///
169  /// Virtual address of the first byte in the memory region.
170  /// VirtualStart must be aligned on a 4 KiB boundary,
171  /// and must not be above 0xfffffffffffff000.
172  ///
174  ///
175  /// NumberOfPagesNumber of 4 KiB pages in the memory region.
176  /// NumberOfPages must not be 0, and must not be any value
177  /// that would represent a memory page with a start address,
178  /// either physical or virtual, above 0xfffffffffffff000.
179  ///
181  ///
182  /// Attributes of the memory region that describe the bit mask of capabilities
183  /// for that memory region, and not necessarily the current settings for that
184  /// memory region.
185  ///
188 
189 /**
190  Allocates memory pages from the system.
191 
192  @param[in] Type The type of allocation to perform.
193  @param[in] MemoryType The type of memory to allocate.
194  MemoryType values in the range 0x70000000..0x7FFFFFFF
195  are reserved for OEM use. MemoryType values in the range
196  0x80000000..0xFFFFFFFF are reserved for use by UEFI OS loaders
197  that are provided by operating system vendors.
198  @param[in] Pages The number of contiguous 4 KB pages to allocate.
199  @param[in, out] Memory The pointer to a physical address. On input, the way in which the address is
200  used depends on the value of Type.
201 
202  @retval EFI_SUCCESS The requested pages were allocated.
203  @retval EFI_INVALID_PARAMETER 1) Type is not AllocateAnyPages or
204  AllocateMaxAddress or AllocateAddress.
205  2) MemoryType is in the range
206  EfiMaxMemoryType..0x6FFFFFFF.
207  3) Memory is NULL.
208  4) MemoryType is EfiPersistentMemory.
209  @retval EFI_OUT_OF_RESOURCES The pages could not be allocated.
210  @retval EFI_NOT_FOUND The requested pages could not be found.
211 
212 **/
213 typedef
217  IN EFI_MEMORY_TYPE MemoryType,
218  IN UINTN Pages,
219  IN OUT EFI_PHYSICAL_ADDRESS *Memory
220  );
221 
222 /**
223  Frees memory pages.
224 
225  @param[in] Memory The base physical address of the pages to be freed.
226  @param[in] Pages The number of contiguous 4 KB pages to free.
227 
228  @retval EFI_SUCCESS The requested pages were freed.
229  @retval EFI_INVALID_PARAMETER Memory is not a page-aligned address or Pages is invalid.
230  @retval EFI_NOT_FOUND The requested memory pages were not allocated with
231  AllocatePages().
232 
233 **/
234 typedef
237  IN EFI_PHYSICAL_ADDRESS Memory,
238  IN UINTN Pages
239  );
240 
241 /**
242  Returns the current memory map.
243 
244  @param[in, out] MemoryMapSize A pointer to the size, in bytes, of the MemoryMap buffer.
245  On input, this is the size of the buffer allocated by the caller.
246  On output, it is the size of the buffer returned by the firmware if
247  the buffer was large enough, or the size of the buffer needed to contain
248  the map if the buffer was too small.
249  @param[out] MemoryMap A pointer to the buffer in which firmware places the current memory
250  map.
251  @param[out] MapKey A pointer to the location in which firmware returns the key for the
252  current memory map.
253  @param[out] DescriptorSize A pointer to the location in which firmware returns the size, in bytes, of
254  an individual EFI_MEMORY_DESCRIPTOR.
255  @param[out] DescriptorVersion A pointer to the location in which firmware returns the version number
256  associated with the EFI_MEMORY_DESCRIPTOR.
257 
258  @retval EFI_SUCCESS The memory map was returned in the MemoryMap buffer.
259  @retval EFI_BUFFER_TOO_SMALL The MemoryMap buffer was too small. The current buffer size
260  needed to hold the memory map is returned in MemoryMapSize.
261  @retval EFI_INVALID_PARAMETER 1) MemoryMapSize is NULL.
262  2) The MemoryMap buffer is not too small and MemoryMap is
263  NULL.
264 
265 **/
266 typedef
269  IN OUT UINTN *MemoryMapSize,
270  OUT EFI_MEMORY_DESCRIPTOR *MemoryMap,
271  OUT UINTN *MapKey,
272  OUT UINTN *DescriptorSize,
273  OUT UINT32 *DescriptorVersion
274  );
275 
276 /**
277  Allocates pool memory.
278 
279  @param[in] PoolType The type of pool to allocate.
280  MemoryType values in the range 0x70000000..0x7FFFFFFF
281  are reserved for OEM use. MemoryType values in the range
282  0x80000000..0xFFFFFFFF are reserved for use by UEFI OS loaders
283  that are provided by operating system vendors.
284  @param[in] Size The number of bytes to allocate from the pool.
285  @param[out] Buffer A pointer to a pointer to the allocated buffer if the call succeeds;
286  undefined otherwise.
287 
288  @retval EFI_SUCCESS The requested number of bytes was allocated.
289  @retval EFI_OUT_OF_RESOURCES The pool requested could not be allocated.
290  @retval EFI_INVALID_PARAMETER Buffer is NULL.
291  PoolType is in the range EfiMaxMemoryType..0x6FFFFFFF.
292  PoolType is EfiPersistentMemory.
293 
294 **/
295 typedef
298  IN EFI_MEMORY_TYPE PoolType,
299  IN UINTN Size,
300  OUT VOID **Buffer
301  );
302 
303 /**
304  Returns pool memory to the system.
305 
306  @param[in] Buffer The pointer to the buffer to free.
307 
308  @retval EFI_SUCCESS The memory was returned to the system.
309  @retval EFI_INVALID_PARAMETER Buffer was invalid.
310 
311 **/
312 typedef
315  IN VOID *Buffer
316  );
317 
318 /**
319  Changes the runtime addressing mode of EFI firmware from physical to virtual.
320 
321  @param[in] MemoryMapSize The size in bytes of VirtualMap.
322  @param[in] DescriptorSize The size in bytes of an entry in the VirtualMap.
323  @param[in] DescriptorVersion The version of the structure entries in VirtualMap.
324  @param[in] VirtualMap An array of memory descriptors which contain new virtual
325  address mapping information for all runtime ranges.
326 
327  @retval EFI_SUCCESS The virtual address map has been applied.
328  @retval EFI_UNSUPPORTED EFI firmware is not at runtime, or the EFI firmware is already in
329  virtual address mapped mode.
330  @retval EFI_INVALID_PARAMETER DescriptorSize or DescriptorVersion is invalid.
331  @retval EFI_NO_MAPPING A virtual address was not supplied for a range in the memory
332  map that requires a mapping.
333  @retval EFI_NOT_FOUND A virtual address was supplied for an address that is not found
334  in the memory map.
335  @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
336  The platform should describe this runtime service as unsupported at runtime
337  via an EFI_RT_PROPERTIES_TABLE configuration table.
338 
339 **/
340 typedef
343  IN UINTN MemoryMapSize,
344  IN UINTN DescriptorSize,
345  IN UINT32 DescriptorVersion,
346  IN EFI_MEMORY_DESCRIPTOR *VirtualMap
347  );
348 
349 /**
350  Connects one or more drivers to a controller.
351 
352  @param[in] ControllerHandle The handle of the controller to which driver(s) are to be connected.
353  @param[in] DriverImageHandle A pointer to an ordered list handles that support the
354  EFI_DRIVER_BINDING_PROTOCOL.
355  @param[in] RemainingDevicePath A pointer to the device path that specifies a child of the
356  controller specified by ControllerHandle.
357  @param[in] Recursive If TRUE, then ConnectController() is called recursively
358  until the entire tree of controllers below the controller specified
359  by ControllerHandle have been created. If FALSE, then
360  the tree of controllers is only expanded one level.
361 
362  @retval EFI_SUCCESS 1) One or more drivers were connected to ControllerHandle.
363  2) No drivers were connected to ControllerHandle, but
364  RemainingDevicePath is not NULL, and it is an End Device
365  Path Node.
366  @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
367  @retval EFI_NOT_FOUND 1) There are no EFI_DRIVER_BINDING_PROTOCOL instances
368  present in the system.
369  2) No drivers were connected to ControllerHandle.
370  @retval EFI_SECURITY_VIOLATION
371  The user has no permission to start UEFI device drivers on the device path
372  associated with the ControllerHandle or specified by the RemainingDevicePath.
373 **/
374 typedef
378  IN EFI_HANDLE *DriverImageHandle OPTIONAL,
379  IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL,
380  IN BOOLEAN Recursive
381  );
382 
383 /**
384  Disconnects one or more drivers from a controller.
385 
386  @param[in] ControllerHandle The handle of the controller from which driver(s) are to be disconnected.
387  @param[in] DriverImageHandle The driver to disconnect from ControllerHandle.
388  If DriverImageHandle is NULL, then all the drivers currently managing
389  ControllerHandle are disconnected from ControllerHandle.
390  @param[in] ChildHandle The handle of the child to destroy.
391  If ChildHandle is NULL, then all the children of ControllerHandle are
392  destroyed before the drivers are disconnected from ControllerHandle.
393 
394  @retval EFI_SUCCESS 1) One or more drivers were disconnected from the controller.
395  2) On entry, no drivers are managing ControllerHandle.
396  3) DriverImageHandle is not NULL, and on entry
397  DriverImageHandle is not managing ControllerHandle.
398  @retval EFI_INVALID_PARAMETER 1) ControllerHandle is NULL.
399  2) DriverImageHandle is not NULL, and it is not a valid EFI_HANDLE.
400  3) ChildHandle is not NULL, and it is not a valid EFI_HANDLE.
401  4) DriverImageHandle does not support the EFI_DRIVER_BINDING_PROTOCOL.
402  @retval EFI_OUT_OF_RESOURCES There are not enough resources available to disconnect any drivers from
403  ControllerHandle.
404  @retval EFI_DEVICE_ERROR The controller could not be disconnected because of a device error.
405 
406 **/
407 typedef
411  IN EFI_HANDLE DriverImageHandle OPTIONAL,
412  IN EFI_HANDLE ChildHandle OPTIONAL
413  );
414 
415 //
416 // ConvertPointer DebugDisposition type.
417 //
418 #define EFI_OPTIONAL_PTR 0x00000001
419 
420 /**
421  Determines the new virtual address that is to be used on subsequent memory accesses.
422 
423  @param[in] DebugDisposition Supplies type information for the pointer being converted.
424  @param[in, out] Address A pointer to a pointer that is to be fixed to be the value needed
425  for the new virtual address mappings being applied.
426 
427  @retval EFI_SUCCESS The pointer pointed to by Address was modified.
428  @retval EFI_NOT_FOUND The pointer pointed to by Address was not found to be part
429  of the current memory map. This is normally fatal.
430  @retval EFI_INVALID_PARAMETER Address is NULL.
431  @retval EFI_INVALID_PARAMETER *Address is NULL and DebugDisposition does
432  not have the EFI_OPTIONAL_PTR bit set.
433  @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
434  The platform should describe this runtime service as unsupported at runtime
435  via an EFI_RT_PROPERTIES_TABLE configuration table.
436 
437 **/
438 typedef
441  IN UINTN DebugDisposition,
442  IN OUT VOID **Address
443  );
444 
445 //
446 // These types can be ORed together as needed - for example,
447 // EVT_TIMER might be Ored with EVT_NOTIFY_WAIT or
448 // EVT_NOTIFY_SIGNAL.
449 //
450 #define EVT_TIMER 0x80000000
451 #define EVT_RUNTIME 0x40000000
452 #define EVT_NOTIFY_WAIT 0x00000100
453 #define EVT_NOTIFY_SIGNAL 0x00000200
454 
455 #define EVT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201
456 #define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202
457 
458 //
459 // The event's NotifyContext pointer points to a runtime memory
460 // address.
461 // The event is deprecated in UEFI2.0 and later specifications.
462 //
463 #define EVT_RUNTIME_CONTEXT 0x20000000
464 
465 /**
466  Invoke a notification event
467 
468  @param[in] Event Event whose notification function is being invoked.
469  @param[in] Context The pointer to the notification function's context,
470  which is implementation-dependent.
471 
472 **/
473 typedef
474 VOID
476  IN EFI_EVENT Event,
477  IN VOID *Context
478  );
479 
480 /**
481  Creates an event.
482 
483  @param[in] Type The type of event to create and its mode and attributes.
484  @param[in] NotifyTpl The task priority level of event notifications, if needed.
485  @param[in] NotifyFunction The pointer to the event's notification function, if any.
486  @param[in] NotifyContext The pointer to the notification function's context; corresponds to parameter
487  Context in the notification function.
488  @param[out] Event The pointer to the newly created event if the call succeeds; undefined
489  otherwise.
490 
491  @retval EFI_SUCCESS The event structure was created.
492  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
493  @retval EFI_OUT_OF_RESOURCES The event could not be allocated.
494 
495 **/
496 typedef
499  IN UINT32 Type,
500  IN EFI_TPL NotifyTpl,
501  IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL,
502  IN VOID *NotifyContext OPTIONAL,
503  OUT EFI_EVENT *Event
504  );
505 
506 /**
507  Creates an event in a group.
508 
509  @param[in] Type The type of event to create and its mode and attributes.
510  @param[in] NotifyTpl The task priority level of event notifications,if needed.
511  @param[in] NotifyFunction The pointer to the event's notification function, if any.
512  @param[in] NotifyContext The pointer to the notification function's context; corresponds to parameter
513  Context in the notification function.
514  @param[in] EventGroup The pointer to the unique identifier of the group to which this event belongs.
515  If this is NULL, then the function behaves as if the parameters were passed
516  to CreateEvent.
517  @param[out] Event The pointer to the newly created event if the call succeeds; undefined
518  otherwise.
519 
520  @retval EFI_SUCCESS The event structure was created.
521  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
522  @retval EFI_OUT_OF_RESOURCES The event could not be allocated.
523 
524 **/
525 typedef
528  IN UINT32 Type,
529  IN EFI_TPL NotifyTpl,
530  IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL,
531  IN CONST VOID *NotifyContext OPTIONAL,
532  IN CONST EFI_GUID *EventGroup OPTIONAL,
533  OUT EFI_EVENT *Event
534  );
535 
536 ///
537 /// Timer delay types
538 ///
539 typedef enum {
540  ///
541  /// An event's timer settings is to be cancelled and not trigger time is to be set/
542  ///
544  ///
545  /// An event is to be signaled periodically at a specified interval from the current time.
546  ///
548  ///
549  /// An event is to be signaled once at a specified interval from the current time.
550  ///
553 
554 /**
555  Sets the type of timer and the trigger time for a timer event.
556 
557  @param[in] Event The timer event that is to be signaled at the specified time.
558  @param[in] Type The type of time that is specified in TriggerTime.
559  @param[in] TriggerTime The number of 100ns units until the timer expires.
560  A TriggerTime of 0 is legal.
561  If Type is TimerRelative and TriggerTime is 0, then the timer
562  event will be signaled on the next timer tick.
563  If Type is TimerPeriodic and TriggerTime is 0, then the timer
564  event will be signaled on every timer tick.
565 
566  @retval EFI_SUCCESS The event has been set to be signaled at the requested time.
567  @retval EFI_INVALID_PARAMETER Event or Type is not valid.
568 
569 **/
570 typedef
573  IN EFI_EVENT Event,
575  IN UINT64 TriggerTime
576  );
577 
578 /**
579  Signals an event.
580 
581  @param[in] Event The event to signal.
582 
583  @retval EFI_SUCCESS The event has been signaled.
584 
585 **/
586 typedef
589  IN EFI_EVENT Event
590  );
591 
592 /**
593  Stops execution until an event is signaled.
594 
595  @param[in] NumberOfEvents The number of events in the Event array.
596  @param[in] Event An array of EFI_EVENT.
597  @param[out] Index The pointer to the index of the event which satisfied the wait condition.
598 
599  @retval EFI_SUCCESS The event indicated by Index was signaled.
600  @retval EFI_INVALID_PARAMETER 1) NumberOfEvents is 0.
601  2) The event indicated by Index is of type
602  EVT_NOTIFY_SIGNAL.
603  @retval EFI_UNSUPPORTED The current TPL is not TPL_APPLICATION.
604 
605 **/
606 typedef
609  IN UINTN NumberOfEvents,
610  IN EFI_EVENT *Event,
611  OUT UINTN *Index
612  );
613 
614 /**
615  Closes an event.
616 
617  @param[in] Event The event to close.
618 
619  @retval EFI_SUCCESS The event has been closed.
620 
621 **/
622 typedef
625  IN EFI_EVENT Event
626  );
627 
628 /**
629  Checks whether an event is in the signaled state.
630 
631  @param[in] Event The event to check.
632 
633  @retval EFI_SUCCESS The event is in the signaled state.
634  @retval EFI_NOT_READY The event is not in the signaled state.
635  @retval EFI_INVALID_PARAMETER Event is of type EVT_NOTIFY_SIGNAL.
636 
637 **/
638 typedef
641  IN EFI_EVENT Event
642  );
643 
644 //
645 // Task priority level
646 //
647 #define TPL_APPLICATION 4
648 #define TPL_CALLBACK 8
649 #define TPL_NOTIFY 16
650 #define TPL_HIGH_LEVEL 31
651 
652 /**
653  Raises a task's priority level and returns its previous level.
654 
655  @param[in] NewTpl The new task priority level.
656 
657  @return Previous task priority level
658 
659 **/
660 typedef
661 EFI_TPL
663  IN EFI_TPL NewTpl
664  );
665 
666 /**
667  Restores a task's priority level to its previous value.
668 
669  @param[in] OldTpl The previous task priority level to restore.
670 
671 **/
672 typedef
673 VOID
675  IN EFI_TPL OldTpl
676  );
677 
678 /**
679  Returns the value of a variable.
680 
681  @param[in] VariableName A Null-terminated string that is the name of the vendor's
682  variable.
683  @param[in] VendorGuid A unique identifier for the vendor.
684  @param[out] Attributes If not NULL, a pointer to the memory location to return the
685  attributes bitmask for the variable.
686  @param[in, out] DataSize On input, the size in bytes of the return Data buffer.
687  On output the size of data returned in Data.
688  @param[out] Data The buffer to return the contents of the variable. May be NULL
689  with a zero DataSize in order to determine the size buffer needed.
690 
691  @retval EFI_SUCCESS The function completed successfully.
692  @retval EFI_NOT_FOUND The variable was not found.
693  @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the result.
694  @retval EFI_INVALID_PARAMETER VariableName is NULL.
695  @retval EFI_INVALID_PARAMETER VendorGuid is NULL.
696  @retval EFI_INVALID_PARAMETER DataSize is NULL.
697  @retval EFI_INVALID_PARAMETER The DataSize is not too small and Data is NULL.
698  @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
699  @retval EFI_SECURITY_VIOLATION The variable could not be retrieved due to an authentication failure.
700  @retval EFI_UNSUPPORTED After ExitBootServices() has been called, this return code may be returned
701  if no variable storage is supported. The platform should describe this
702  runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
703  configuration table.
704 
705 **/
706 typedef
709  IN CHAR16 *VariableName,
710  IN EFI_GUID *VendorGuid,
711  OUT UINT32 *Attributes OPTIONAL,
712  IN OUT UINTN *DataSize,
713  OUT VOID *Data OPTIONAL
714  );
715 
716 /**
717  Enumerates the current variable names.
718 
719  @param[in, out] VariableNameSize The size of the VariableName buffer. The size must be large
720  enough to fit input string supplied in VariableName buffer.
721  @param[in, out] VariableName On input, supplies the last VariableName that was returned
722  by GetNextVariableName(). On output, returns the Nullterminated
723  string of the current variable.
724  @param[in, out] VendorGuid On input, supplies the last VendorGuid that was returned by
725  GetNextVariableName(). On output, returns the
726  VendorGuid of the current variable.
727 
728  @retval EFI_SUCCESS The function completed successfully.
729  @retval EFI_NOT_FOUND The next variable was not found.
730  @retval EFI_BUFFER_TOO_SMALL The VariableNameSize is too small for the result.
731  VariableNameSize has been updated with the size needed to complete the request.
732  @retval EFI_INVALID_PARAMETER VariableNameSize is NULL.
733  @retval EFI_INVALID_PARAMETER VariableName is NULL.
734  @retval EFI_INVALID_PARAMETER VendorGuid is NULL.
735  @retval EFI_INVALID_PARAMETER The input values of VariableName and VendorGuid are not a name and
736  GUID of an existing variable.
737  @retval EFI_INVALID_PARAMETER Null-terminator is not found in the first VariableNameSize bytes of
738  the input VariableName buffer.
739  @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
740  @retval EFI_UNSUPPORTED After ExitBootServices() has been called, this return code may be returned
741  if no variable storage is supported. The platform should describe this
742  runtime service as unsupported at runtime via an EFI_RT_PROPERTIES_TABLE
743  configuration table.
744 
745 **/
746 typedef
749  IN OUT UINTN *VariableNameSize,
750  IN OUT CHAR16 *VariableName,
751  IN OUT EFI_GUID *VendorGuid
752  );
753 
754 /**
755  Sets the value of a variable.
756 
757  @param[in] VariableName A Null-terminated string that is the name of the vendor's variable.
758  Each VariableName is unique for each VendorGuid. VariableName must
759  contain 1 or more characters. If VariableName is an empty string,
760  then EFI_INVALID_PARAMETER is returned.
761  @param[in] VendorGuid A unique identifier for the vendor.
762  @param[in] Attributes Attributes bitmask to set for the variable.
763  @param[in] DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE or
764  EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero
765  causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is
766  set, then a SetVariable() call with a DataSize of zero will not cause any change to
767  the variable value (the timestamp associated with the variable may be updated however
768  even if no new data value is provided,see the description of the
769  EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not
770  be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated).
771  @param[in] Data The contents for the variable.
772 
773  @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as
774  defined by the Attributes.
775  @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits, name, and GUID was supplied, or the
776  DataSize exceeds the maximum allowed.
777  @retval EFI_INVALID_PARAMETER VariableName is an empty string.
778  @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.
779  @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
780  @retval EFI_WRITE_PROTECTED The variable in question is read-only.
781  @retval EFI_WRITE_PROTECTED The variable in question cannot be deleted.
782  @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set,
783  but the AuthInfo does NOT pass the validation check carried out by the firmware.
784 
785  @retval EFI_NOT_FOUND The variable trying to be updated or deleted was not found.
786  @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
787  The platform should describe this runtime service as unsupported at runtime
788  via an EFI_RT_PROPERTIES_TABLE configuration table.
789 
790 **/
791 typedef
794  IN CHAR16 *VariableName,
795  IN EFI_GUID *VendorGuid,
796  IN UINT32 Attributes,
797  IN UINTN DataSize,
798  IN VOID *Data
799  );
800 
801 ///
802 /// This provides the capabilities of the
803 /// real time clock device as exposed through the EFI interfaces.
804 ///
805 typedef struct {
806  ///
807  /// Provides the reporting resolution of the real-time clock device in
808  /// counts per second. For a normal PC-AT CMOS RTC device, this
809  /// value would be 1 Hz, or 1, to indicate that the device only reports
810  /// the time to the resolution of 1 second.
811  ///
813  ///
814  /// Provides the timekeeping accuracy of the real-time clock in an
815  /// error rate of 1E-6 parts per million. For a clock with an accuracy
816  /// of 50 parts per million, the value in this field would be
817  /// 50,000,000.
818  ///
820  ///
821  /// A TRUE indicates that a time set operation clears the device's
822  /// time below the Resolution reporting level. A FALSE
823  /// indicates that the state below the Resolution level of the
824  /// device is not cleared when the time is set. Normal PC-AT CMOS
825  /// RTC devices set this value to FALSE.
826  ///
829 
830 /**
831  Returns the current time and date information, and the time-keeping capabilities
832  of the hardware platform.
833 
834  @param[out] Time A pointer to storage to receive a snapshot of the current time.
835  @param[out] Capabilities An optional pointer to a buffer to receive the real time clock
836  device's capabilities.
837 
838  @retval EFI_SUCCESS The operation completed successfully.
839  @retval EFI_INVALID_PARAMETER Time is NULL.
840  @retval EFI_DEVICE_ERROR The time could not be retrieved due to hardware error.
841  @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
842  The platform should describe this runtime service as unsupported at runtime
843  via an EFI_RT_PROPERTIES_TABLE configuration table.
844 
845 **/
846 typedef
849  OUT EFI_TIME *Time,
850  OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL
851  );
852 
853 /**
854  Sets the current local time and date information.
855 
856  @param[in] Time A pointer to the current time.
857 
858  @retval EFI_SUCCESS The operation completed successfully.
859  @retval EFI_INVALID_PARAMETER A time field is out of range.
860  @retval EFI_DEVICE_ERROR The time could not be set due due to hardware error.
861  @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
862  The platform should describe this runtime service as unsupported at runtime
863  via an EFI_RT_PROPERTIES_TABLE configuration table.
864 
865 **/
866 typedef
869  IN EFI_TIME *Time
870  );
871 
872 /**
873  Returns the current wakeup alarm clock setting.
874 
875  @param[out] Enabled Indicates if the alarm is currently enabled or disabled.
876  @param[out] Pending Indicates if the alarm signal is pending and requires acknowledgement.
877  @param[out] Time The current alarm setting.
878 
879  @retval EFI_SUCCESS The alarm settings were returned.
880  @retval EFI_INVALID_PARAMETER Enabled is NULL.
881  @retval EFI_INVALID_PARAMETER Pending is NULL.
882  @retval EFI_INVALID_PARAMETER Time is NULL.
883  @retval EFI_DEVICE_ERROR The wakeup time could not be retrieved due to a hardware error.
884  @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
885  The platform should describe this runtime service as unsupported at runtime
886  via an EFI_RT_PROPERTIES_TABLE configuration table.
887 
888 **/
889 typedef
892  OUT BOOLEAN *Enabled,
893  OUT BOOLEAN *Pending,
894  OUT EFI_TIME *Time
895  );
896 
897 /**
898  Sets the system wakeup alarm clock time.
899 
900  @param[in] Enable Enable or disable the wakeup alarm.
901  @param[in] Time If Enable is TRUE, the time to set the wakeup alarm for.
902  If Enable is FALSE, then this parameter is optional, and may be NULL.
903 
904  @retval EFI_SUCCESS If Enable is TRUE, then the wakeup alarm was enabled. If
905  Enable is FALSE, then the wakeup alarm was disabled.
906  @retval EFI_INVALID_PARAMETER A time field is out of range.
907  @retval EFI_DEVICE_ERROR The wakeup time could not be set due to a hardware error.
908  @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
909  The platform should describe this runtime service as unsupported at runtime
910  via an EFI_RT_PROPERTIES_TABLE configuration table.
911 
912 **/
913 typedef
916  IN BOOLEAN Enable,
917  IN EFI_TIME *Time OPTIONAL
918  );
919 
920 /**
921  Loads an EFI image into memory.
922 
923  @param[in] BootPolicy If TRUE, indicates that the request originates from the boot
924  manager, and that the boot manager is attempting to load
925  FilePath as a boot selection. Ignored if SourceBuffer is
926  not NULL.
927  @param[in] ParentImageHandle The caller's image handle.
928  @param[in] DevicePath The DeviceHandle specific file path from which the image is
929  loaded.
930  @param[in] SourceBuffer If not NULL, a pointer to the memory location containing a copy
931  of the image to be loaded.
932  @param[in] SourceSize The size in bytes of SourceBuffer. Ignored if SourceBuffer is NULL.
933  @param[out] ImageHandle The pointer to the returned image handle that is created when the
934  image is successfully loaded.
935 
936  @retval EFI_SUCCESS Image was loaded into memory correctly.
937  @retval EFI_NOT_FOUND Both SourceBuffer and DevicePath are NULL.
938  @retval EFI_INVALID_PARAMETER One or more parametes are invalid.
939  @retval EFI_UNSUPPORTED The image type is not supported.
940  @retval EFI_OUT_OF_RESOURCES Image was not loaded due to insufficient resources.
941  @retval EFI_LOAD_ERROR Image was not loaded because the image format was corrupt or not
942  understood.
943  @retval EFI_DEVICE_ERROR Image was not loaded because the device returned a read error.
944  @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the
945  image from being loaded. NULL is returned in *ImageHandle.
946  @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a
947  valid EFI_LOADED_IMAGE_PROTOCOL. However, the current
948  platform policy specifies that the image should not be started.
949 **/
950 typedef
953  IN BOOLEAN BootPolicy,
954  IN EFI_HANDLE ParentImageHandle,
956  IN VOID *SourceBuffer OPTIONAL,
957  IN UINTN SourceSize,
958  OUT EFI_HANDLE *ImageHandle
959  );
960 
961 /**
962  Transfers control to a loaded image's entry point.
963 
964  @param[in] ImageHandle Handle of image to be started.
965  @param[out] ExitDataSize The pointer to the size, in bytes, of ExitData.
966  @param[out] ExitData The pointer to a pointer to a data buffer that includes a Null-terminated
967  string, optionally followed by additional binary data.
968 
969  @retval EFI_INVALID_PARAMETER ImageHandle is either an invalid image handle or the image
970  has already been initialized with StartImage.
971  @retval EFI_SECURITY_VIOLATION The current platform policy specifies that the image should not be started.
972  @return Exit code from image
973 
974 **/
975 typedef
978  IN EFI_HANDLE ImageHandle,
979  OUT UINTN *ExitDataSize,
980  OUT CHAR16 **ExitData OPTIONAL
981  );
982 
983 /**
984  Terminates a loaded EFI image and returns control to boot services.
985 
986  @param[in] ImageHandle Handle that identifies the image. This parameter is passed to the
987  image on entry.
988  @param[in] ExitStatus The image's exit code.
989  @param[in] ExitDataSize The size, in bytes, of ExitData. Ignored if ExitStatus is EFI_SUCCESS.
990  @param[in] ExitData The pointer to a data buffer that includes a Null-terminated string,
991  optionally followed by additional binary data. The string is a
992  description that the caller may use to further indicate the reason
993  for the image's exit. ExitData is only valid if ExitStatus
994  is something other than EFI_SUCCESS. The ExitData buffer
995  must be allocated by calling AllocatePool().
996 
997  @retval EFI_SUCCESS The image specified by ImageHandle was unloaded.
998  @retval EFI_INVALID_PARAMETER The image specified by ImageHandle has been loaded and
999  started with LoadImage() and StartImage(), but the
1000  image is not the currently executing image.
1001 
1002 **/
1003 typedef
1004 EFI_STATUS
1006  IN EFI_HANDLE ImageHandle,
1007  IN EFI_STATUS ExitStatus,
1008  IN UINTN ExitDataSize,
1009  IN CHAR16 *ExitData OPTIONAL
1010  );
1011 
1012 /**
1013  Unloads an image.
1014 
1015  @param[in] ImageHandle Handle that identifies the image to be unloaded.
1016 
1017  @retval EFI_SUCCESS The image has been unloaded.
1018  @retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.
1019 
1020 **/
1021 typedef
1022 EFI_STATUS
1024  IN EFI_HANDLE ImageHandle
1025  );
1026 
1027 /**
1028  Terminates all boot services.
1029 
1030  @param[in] ImageHandle Handle that identifies the exiting image.
1031  @param[in] MapKey Key to the latest memory map.
1032 
1033  @retval EFI_SUCCESS Boot services have been terminated.
1034  @retval EFI_INVALID_PARAMETER MapKey is incorrect.
1035 
1036 **/
1037 typedef
1038 EFI_STATUS
1040  IN EFI_HANDLE ImageHandle,
1041  IN UINTN MapKey
1042  );
1043 
1044 /**
1045  Induces a fine-grained stall.
1046 
1047  @param[in] Microseconds The number of microseconds to stall execution.
1048 
1049  @retval EFI_SUCCESS Execution was stalled at least the requested number of
1050  Microseconds.
1051 
1052 **/
1053 typedef
1054 EFI_STATUS
1056  IN UINTN Microseconds
1057  );
1058 
1059 /**
1060  Sets the system's watchdog timer.
1061 
1062  @param[in] Timeout The number of seconds to set the watchdog timer to.
1063  @param[in] WatchdogCode The numeric code to log on a watchdog timer timeout event.
1064  @param[in] DataSize The size, in bytes, of WatchdogData.
1065  @param[in] WatchdogData A data buffer that includes a Null-terminated string, optionally
1066  followed by additional binary data.
1067 
1068  @retval EFI_SUCCESS The timeout has been set.
1069  @retval EFI_INVALID_PARAMETER The supplied WatchdogCode is invalid.
1070  @retval EFI_UNSUPPORTED The system does not have a watchdog timer.
1071  @retval EFI_DEVICE_ERROR The watchdog timer could not be programmed due to a hardware
1072  error.
1073 
1074 **/
1075 typedef
1076 EFI_STATUS
1078  IN UINTN Timeout,
1079  IN UINT64 WatchdogCode,
1080  IN UINTN DataSize,
1081  IN CHAR16 *WatchdogData OPTIONAL
1082  );
1083 
1084 /**
1085  Resets the entire platform.
1086 
1087  @param[in] ResetType The type of reset to perform.
1088  @param[in] ResetStatus The status code for the reset.
1089  @param[in] DataSize The size, in bytes, of ResetData.
1090  @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or
1091  EfiResetShutdown the data buffer starts with a Null-terminated
1092  string, optionally followed by additional binary data.
1093  The string is a description that the caller may use to further
1094  indicate the reason for the system reset.
1095  For a ResetType of EfiResetPlatformSpecific the data buffer
1096  also starts with a Null-terminated string that is followed
1097  by an EFI_GUID that describes the specific type of reset to perform.
1098 **/
1099 typedef
1100 VOID
1102  IN EFI_RESET_TYPE ResetType,
1103  IN EFI_STATUS ResetStatus,
1104  IN UINTN DataSize,
1105  IN VOID *ResetData OPTIONAL
1106  );
1107 
1108 /**
1109  Returns a monotonically increasing count for the platform.
1110 
1111  @param[out] Count The pointer to returned value.
1112 
1113  @retval EFI_SUCCESS The next monotonic count was returned.
1114  @retval EFI_INVALID_PARAMETER Count is NULL.
1115  @retval EFI_DEVICE_ERROR The device is not functioning properly.
1116 
1117 **/
1118 typedef
1119 EFI_STATUS
1121  OUT UINT64 *Count
1122  );
1123 
1124 /**
1125  Returns the next high 32 bits of the platform's monotonic counter.
1126 
1127  @param[out] HighCount The pointer to returned value.
1128 
1129  @retval EFI_SUCCESS The next high monotonic count was returned.
1130  @retval EFI_INVALID_PARAMETER HighCount is NULL.
1131  @retval EFI_DEVICE_ERROR The device is not functioning properly.
1132  @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
1133  The platform should describe this runtime service as unsupported at runtime
1134  via an EFI_RT_PROPERTIES_TABLE configuration table.
1135 
1136 **/
1137 typedef
1138 EFI_STATUS
1140  OUT UINT32 *HighCount
1141  );
1142 
1143 /**
1144  Computes and returns a 32-bit CRC for a data buffer.
1145 
1146  @param[in] Data A pointer to the buffer on which the 32-bit CRC is to be computed.
1147  @param[in] DataSize The number of bytes in the buffer Data.
1148  @param[out] Crc32 The 32-bit CRC that was computed for the data buffer specified by Data
1149  and DataSize.
1150 
1151  @retval EFI_SUCCESS The 32-bit CRC was computed for the data buffer and returned in
1152  Crc32.
1153  @retval EFI_INVALID_PARAMETER Data is NULL.
1154  @retval EFI_INVALID_PARAMETER Crc32 is NULL.
1155  @retval EFI_INVALID_PARAMETER DataSize is 0.
1156 
1157 **/
1158 typedef
1159 EFI_STATUS
1161  IN VOID *Data,
1162  IN UINTN DataSize,
1163  OUT UINT32 *Crc32
1164  );
1165 
1166 /**
1167  Copies the contents of one buffer to another buffer.
1168 
1169  @param[in] Destination The pointer to the destination buffer of the memory copy.
1170  @param[in] Source The pointer to the source buffer of the memory copy.
1171  @param[in] Length Number of bytes to copy from Source to Destination.
1172 
1173 **/
1174 typedef
1175 VOID
1177  IN VOID *Destination,
1178  IN VOID *Source,
1179  IN UINTN Length
1180  );
1181 
1182 /**
1183  The SetMem() function fills a buffer with a specified value.
1184 
1185  @param[in] Buffer The pointer to the buffer to fill.
1186  @param[in] Size Number of bytes in Buffer to fill.
1187  @param[in] Value Value to fill Buffer with.
1188 
1189 **/
1190 typedef
1191 VOID
1193  IN VOID *Buffer,
1194  IN UINTN Size,
1195  IN UINT8 Value
1196  );
1197 
1198 ///
1199 /// Enumeration of EFI Interface Types
1200 ///
1201 typedef enum {
1202  ///
1203  /// Indicates that the supplied protocol interface is supplied in native form.
1204  ///
1207 
1208 /**
1209  Installs a protocol interface on a device handle. If the handle does not exist, it is created and added
1210  to the list of handles in the system. InstallMultipleProtocolInterfaces() performs
1211  more error checking than InstallProtocolInterface(), so it is recommended that
1212  InstallMultipleProtocolInterfaces() be used in place of
1213  InstallProtocolInterface()
1214 
1215  @param[in, out] Handle A pointer to the EFI_HANDLE on which the interface is to be installed.
1216  @param[in] Protocol The numeric ID of the protocol interface.
1217  @param[in] InterfaceType Indicates whether Interface is supplied in native form.
1218  @param[in] Interface A pointer to the protocol interface.
1219 
1220  @retval EFI_SUCCESS The protocol interface was installed.
1221  @retval EFI_OUT_OF_RESOURCES Space for a new handle could not be allocated.
1222  @retval EFI_INVALID_PARAMETER Handle is NULL.
1223  @retval EFI_INVALID_PARAMETER Protocol is NULL.
1224  @retval EFI_INVALID_PARAMETER InterfaceType is not EFI_NATIVE_INTERFACE.
1225  @retval EFI_INVALID_PARAMETER Protocol is already installed on the handle specified by Handle.
1226 
1227 **/
1228 typedef
1229 EFI_STATUS
1231  IN OUT EFI_HANDLE *Handle,
1232  IN EFI_GUID *Protocol,
1233  IN EFI_INTERFACE_TYPE InterfaceType,
1234  IN VOID *Interface
1235  );
1236 
1237 /**
1238  Installs one or more protocol interfaces into the boot services environment.
1239 
1240  @param[in, out] Handle The pointer to a handle to install the new protocol interfaces on,
1241  or a pointer to NULL if a new handle is to be allocated.
1242  @param ... A variable argument list containing pairs of protocol GUIDs and protocol
1243  interfaces.
1244 
1245  @retval EFI_SUCCESS All the protocol interface was installed.
1246  @retval EFI_OUT_OF_RESOURCES There was not enough memory in pool to install all the protocols.
1247  @retval EFI_ALREADY_STARTED A Device Path Protocol instance was passed in that is already present in
1248  the handle database.
1249  @retval EFI_INVALID_PARAMETER Handle is NULL.
1250  @retval EFI_INVALID_PARAMETER Protocol is already installed on the handle specified by Handle.
1251 
1252 **/
1253 typedef
1254 EFI_STATUS
1256  IN OUT EFI_HANDLE *Handle,
1257  ...
1258  );
1259 
1260 /**
1261  Reinstalls a protocol interface on a device handle.
1262 
1263  @param[in] Handle Handle on which the interface is to be reinstalled.
1264  @param[in] Protocol The numeric ID of the interface.
1265  @param[in] OldInterface A pointer to the old interface. NULL can be used if a structure is not
1266  associated with Protocol.
1267  @param[in] NewInterface A pointer to the new interface.
1268 
1269  @retval EFI_SUCCESS The protocol interface was reinstalled.
1270  @retval EFI_NOT_FOUND The OldInterface on the handle was not found.
1271  @retval EFI_ACCESS_DENIED The protocol interface could not be reinstalled,
1272  because OldInterface is still being used by a
1273  driver that will not release it.
1274  @retval EFI_INVALID_PARAMETER Handle is NULL.
1275  @retval EFI_INVALID_PARAMETER Protocol is NULL.
1276 
1277 **/
1278 typedef
1279 EFI_STATUS
1281  IN EFI_HANDLE Handle,
1282  IN EFI_GUID *Protocol,
1283  IN VOID *OldInterface,
1284  IN VOID *NewInterface
1285  );
1286 
1287 /**
1288  Removes a protocol interface from a device handle. It is recommended that
1289  UninstallMultipleProtocolInterfaces() be used in place of
1290  UninstallProtocolInterface().
1291 
1292  @param[in] Handle The handle on which the interface was installed.
1293  @param[in] Protocol The numeric ID of the interface.
1294  @param[in] Interface A pointer to the interface.
1295 
1296  @retval EFI_SUCCESS The interface was removed.
1297  @retval EFI_NOT_FOUND The interface was not found.
1298  @retval EFI_ACCESS_DENIED The interface was not removed because the interface
1299  is still being used by a driver.
1300  @retval EFI_INVALID_PARAMETER Handle is NULL.
1301  @retval EFI_INVALID_PARAMETER Protocol is NULL.
1302 
1303 **/
1304 typedef
1305 EFI_STATUS
1307  IN EFI_HANDLE Handle,
1308  IN EFI_GUID *Protocol,
1309  IN VOID *Interface
1310  );
1311 
1312 /**
1313  Removes one or more protocol interfaces into the boot services environment.
1314 
1315  @param[in] Handle The handle to remove the protocol interfaces from.
1316  @param ... A variable argument list containing pairs of protocol GUIDs and
1317  protocol interfaces.
1318 
1319  @retval EFI_SUCCESS All the protocol interfaces were removed.
1320  @retval EFI_INVALID_PARAMETER One of the protocol interfaces was not previously installed on Handle.
1321 
1322 **/
1323 typedef
1324 EFI_STATUS
1326  IN EFI_HANDLE Handle,
1327  ...
1328  );
1329 
1330 /**
1331  Queries a handle to determine if it supports a specified protocol.
1332 
1333  @param[in] Handle The handle being queried.
1334  @param[in] Protocol The published unique identifier of the protocol.
1335  @param[out] Interface Supplies the address where a pointer to the corresponding Protocol
1336  Interface is returned.
1337 
1338  @retval EFI_SUCCESS The interface information for the specified protocol was returned.
1339  @retval EFI_UNSUPPORTED The device does not support the specified protocol.
1340  @retval EFI_INVALID_PARAMETER Handle is NULL.
1341  @retval EFI_INVALID_PARAMETER Protocol is NULL.
1342  @retval EFI_INVALID_PARAMETER Interface is NULL.
1343 
1344 **/
1345 typedef
1346 EFI_STATUS
1348  IN EFI_HANDLE Handle,
1349  IN EFI_GUID *Protocol,
1350  OUT VOID **Interface
1351  );
1352 
1353 #define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001
1354 #define EFI_OPEN_PROTOCOL_GET_PROTOCOL 0x00000002
1355 #define EFI_OPEN_PROTOCOL_TEST_PROTOCOL 0x00000004
1356 #define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008
1357 #define EFI_OPEN_PROTOCOL_BY_DRIVER 0x00000010
1358 #define EFI_OPEN_PROTOCOL_EXCLUSIVE 0x00000020
1359 
1360 /**
1361  Queries a handle to determine if it supports a specified protocol. If the protocol is supported by the
1362  handle, it opens the protocol on behalf of the calling agent.
1363 
1364  @param[in] Handle The handle for the protocol interface that is being opened.
1365  @param[in] Protocol The published unique identifier of the protocol.
1366  @param[out] Interface Supplies the address where a pointer to the corresponding Protocol
1367  Interface is returned.
1368  @param[in] AgentHandle The handle of the agent that is opening the protocol interface
1369  specified by Protocol and Interface.
1370  @param[in] ControllerHandle If the agent that is opening a protocol is a driver that follows the
1371  UEFI Driver Model, then this parameter is the controller handle
1372  that requires the protocol interface. If the agent does not follow
1373  the UEFI Driver Model, then this parameter is optional and may
1374  be NULL.
1375  @param[in] Attributes The open mode of the protocol interface specified by Handle
1376  and Protocol.
1377 
1378  @retval EFI_SUCCESS An item was added to the open list for the protocol interface, and the
1379  protocol interface was returned in Interface.
1380  @retval EFI_UNSUPPORTED Handle does not support Protocol.
1381  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1382  @retval EFI_ACCESS_DENIED Required attributes can't be supported in current environment.
1383  @retval EFI_ALREADY_STARTED Item on the open list already has requierd attributes whose agent
1384  handle is the same as AgentHandle.
1385 
1386 **/
1387 typedef
1388 EFI_STATUS
1390  IN EFI_HANDLE Handle,
1391  IN EFI_GUID *Protocol,
1392  OUT VOID **Interface OPTIONAL,
1393  IN EFI_HANDLE AgentHandle,
1395  IN UINT32 Attributes
1396  );
1397 
1398 /**
1399  Closes a protocol on a handle that was opened using OpenProtocol().
1400 
1401  @param[in] Handle The handle for the protocol interface that was previously opened
1402  with OpenProtocol(), and is now being closed.
1403  @param[in] Protocol The published unique identifier of the protocol.
1404  @param[in] AgentHandle The handle of the agent that is closing the protocol interface.
1405  @param[in] ControllerHandle If the agent that opened a protocol is a driver that follows the
1406  UEFI Driver Model, then this parameter is the controller handle
1407  that required the protocol interface.
1408 
1409  @retval EFI_SUCCESS The protocol instance was closed.
1410  @retval EFI_INVALID_PARAMETER 1) Handle is NULL.
1411  2) AgentHandle is NULL.
1412  3) ControllerHandle is not NULL and ControllerHandle is not a valid EFI_HANDLE.
1413  4) Protocol is NULL.
1414  @retval EFI_NOT_FOUND 1) Handle does not support the protocol specified by Protocol.
1415  2) The protocol interface specified by Handle and Protocol is not
1416  currently open by AgentHandle and ControllerHandle.
1417 
1418 **/
1419 typedef
1420 EFI_STATUS
1422  IN EFI_HANDLE Handle,
1423  IN EFI_GUID *Protocol,
1424  IN EFI_HANDLE AgentHandle,
1426  );
1427 
1428 ///
1429 /// EFI Oprn Protocol Information Entry
1430 ///
1431 typedef struct {
1437 
1438 /**
1439  Retrieves the list of agents that currently have a protocol interface opened.
1440 
1441  @param[in] Handle The handle for the protocol interface that is being queried.
1442  @param[in] Protocol The published unique identifier of the protocol.
1443  @param[out] EntryBuffer A pointer to a buffer of open protocol information in the form of
1444  EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.
1445  @param[out] EntryCount A pointer to the number of entries in EntryBuffer.
1446 
1447  @retval EFI_SUCCESS The open protocol information was returned in EntryBuffer, and the
1448  number of entries was returned EntryCount.
1449  @retval EFI_OUT_OF_RESOURCES There are not enough resources available to allocate EntryBuffer.
1450  @retval EFI_NOT_FOUND Handle does not support the protocol specified by Protocol.
1451 
1452 **/
1453 typedef
1454 EFI_STATUS
1456  IN EFI_HANDLE Handle,
1457  IN EFI_GUID *Protocol,
1459  OUT UINTN *EntryCount
1460  );
1461 
1462 /**
1463  Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated
1464  from pool.
1465 
1466  @param[in] Handle The handle from which to retrieve the list of protocol interface
1467  GUIDs.
1468  @param[out] ProtocolBuffer A pointer to the list of protocol interface GUID pointers that are
1469  installed on Handle.
1470  @param[out] ProtocolBufferCount A pointer to the number of GUID pointers present in
1471  ProtocolBuffer.
1472 
1473  @retval EFI_SUCCESS The list of protocol interface GUIDs installed on Handle was returned in
1474  ProtocolBuffer. The number of protocol interface GUIDs was
1475  returned in ProtocolBufferCount.
1476  @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the results.
1477  @retval EFI_INVALID_PARAMETER Handle is NULL.
1478  @retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE.
1479  @retval EFI_INVALID_PARAMETER ProtocolBuffer is NULL.
1480  @retval EFI_INVALID_PARAMETER ProtocolBufferCount is NULL.
1481 
1482 **/
1483 typedef
1484 EFI_STATUS
1486  IN EFI_HANDLE Handle,
1487  OUT EFI_GUID ***ProtocolBuffer,
1488  OUT UINTN *ProtocolBufferCount
1489  );
1490 
1491 /**
1492  Creates an event that is to be signaled whenever an interface is installed for a specified protocol.
1493 
1494  @param[in] Protocol The numeric ID of the protocol for which the event is to be registered.
1495  @param[in] Event Event that is to be signaled whenever a protocol interface is registered
1496  for Protocol.
1497  @param[out] Registration A pointer to a memory location to receive the registration value.
1498 
1499  @retval EFI_SUCCESS The notification event has been registered.
1500  @retval EFI_OUT_OF_RESOURCES Space for the notification event could not be allocated.
1501  @retval EFI_INVALID_PARAMETER Protocol is NULL.
1502  @retval EFI_INVALID_PARAMETER Event is NULL.
1503  @retval EFI_INVALID_PARAMETER Registration is NULL.
1504 
1505 **/
1506 typedef
1507 EFI_STATUS
1509  IN EFI_GUID *Protocol,
1510  IN EFI_EVENT Event,
1511  OUT VOID **Registration
1512  );
1513 
1514 ///
1515 /// Enumeration of EFI Locate Search Types
1516 ///
1517 typedef enum {
1518  ///
1519  /// Retrieve all the handles in the handle database.
1520  ///
1522  ///
1523  /// Retrieve the next handle fron a RegisterProtocolNotify() event.
1524  ///
1526  ///
1527  /// Retrieve the set of handles from the handle database that support a
1528  /// specified protocol.
1529  ///
1532 
1533 /**
1534  Returns an array of handles that support a specified protocol.
1535 
1536  @param[in] SearchType Specifies which handle(s) are to be returned.
1537  @param[in] Protocol Specifies the protocol to search by.
1538  @param[in] SearchKey Specifies the search key.
1539  @param[in, out] BufferSize On input, the size in bytes of Buffer. On output, the size in bytes of
1540  the array returned in Buffer (if the buffer was large enough) or the
1541  size, in bytes, of the buffer needed to obtain the array (if the buffer was
1542  not large enough).
1543  @param[out] Buffer The buffer in which the array is returned.
1544 
1545  @retval EFI_SUCCESS The array of handles was returned.
1546  @retval EFI_NOT_FOUND No handles match the search.
1547  @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small for the result.
1548  @retval EFI_INVALID_PARAMETER SearchType is not a member of EFI_LOCATE_SEARCH_TYPE.
1549  @retval EFI_INVALID_PARAMETER SearchType is ByRegisterNotify and SearchKey is NULL.
1550  @retval EFI_INVALID_PARAMETER SearchType is ByProtocol and Protocol is NULL.
1551  @retval EFI_INVALID_PARAMETER One or more matches are found and BufferSize is NULL.
1552  @retval EFI_INVALID_PARAMETER BufferSize is large enough for the result and Buffer is NULL.
1553 
1554 **/
1555 typedef
1556 EFI_STATUS
1558  IN EFI_LOCATE_SEARCH_TYPE SearchType,
1560  IN VOID *SearchKey OPTIONAL,
1563  );
1564 
1565 /**
1566  Locates the handle to a device on the device path that supports the specified protocol.
1567 
1568  @param[in] Protocol Specifies the protocol to search for.
1569  @param[in, out] DevicePath On input, a pointer to a pointer to the device path. On output, the device
1570  path pointer is modified to point to the remaining part of the device
1571  path.
1572  @param[out] Device A pointer to the returned device handle.
1573 
1574  @retval EFI_SUCCESS The resulting handle was returned.
1575  @retval EFI_NOT_FOUND No handles match the search.
1576  @retval EFI_INVALID_PARAMETER Protocol is NULL.
1577  @retval EFI_INVALID_PARAMETER DevicePath is NULL.
1578  @retval EFI_INVALID_PARAMETER A handle matched the search and Device is NULL.
1579 
1580 **/
1581 typedef
1582 EFI_STATUS
1584  IN EFI_GUID *Protocol,
1585  IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
1586  OUT EFI_HANDLE *Device
1587  );
1588 
1589 /**
1590  Adds, updates, or removes a configuration table entry from the EFI System Table.
1591 
1592  @param[in] Guid A pointer to the GUID for the entry to add, update, or remove.
1593  @param[in] Table A pointer to the configuration table for the entry to add, update, or
1594  remove. May be NULL.
1595 
1596  @retval EFI_SUCCESS The (Guid, Table) pair was added, updated, or removed.
1597  @retval EFI_NOT_FOUND An attempt was made to delete a nonexistent entry.
1598  @retval EFI_INVALID_PARAMETER Guid is NULL.
1599  @retval EFI_OUT_OF_RESOURCES There is not enough memory available to complete the operation.
1600 
1601 **/
1602 typedef
1603 EFI_STATUS
1605  IN EFI_GUID *Guid,
1606  IN VOID *Table
1607  );
1608 
1609 /**
1610  Returns an array of handles that support the requested protocol in a buffer allocated from pool.
1611 
1612  @param[in] SearchType Specifies which handle(s) are to be returned.
1613  @param[in] Protocol Provides the protocol to search by.
1614  This parameter is only valid for a SearchType of ByProtocol.
1615  @param[in] SearchKey Supplies the search key depending on the SearchType.
1616  @param[out] NoHandles The number of handles returned in Buffer.
1617  @param[out] Buffer A pointer to the buffer to return the requested array of handles that
1618  support Protocol.
1619 
1620  @retval EFI_SUCCESS The array of handles was returned in Buffer, and the number of
1621  handles in Buffer was returned in NoHandles.
1622  @retval EFI_NOT_FOUND No handles match the search.
1623  @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the matching results.
1624  @retval EFI_INVALID_PARAMETER NoHandles is NULL.
1625  @retval EFI_INVALID_PARAMETER Buffer is NULL.
1626 
1627 **/
1628 typedef
1629 EFI_STATUS
1631  IN EFI_LOCATE_SEARCH_TYPE SearchType,
1633  IN VOID *SearchKey OPTIONAL,
1634  OUT UINTN *NoHandles,
1636  );
1637 
1638 /**
1639  Returns the first protocol instance that matches the given protocol.
1640 
1641  @param[in] Protocol Provides the protocol to search for.
1642  @param[in] Registration Optional registration key returned from
1643  RegisterProtocolNotify().
1644  @param[out] Interface On return, a pointer to the first interface that matches Protocol and
1645  Registration.
1646 
1647  @retval EFI_SUCCESS A protocol instance matching Protocol was found and returned in
1648  Interface.
1649  @retval EFI_NOT_FOUND No protocol instances were found that match Protocol and
1650  Registration.
1651  @retval EFI_INVALID_PARAMETER Interface is NULL.
1652  Protocol is NULL.
1653 
1654 **/
1655 typedef
1656 EFI_STATUS
1658  IN EFI_GUID *Protocol,
1659  IN VOID *Registration OPTIONAL,
1660  OUT VOID **Interface
1661  );
1662 
1663 ///
1664 /// EFI Capsule Block Descriptor
1665 ///
1666 typedef struct {
1667  ///
1668  /// Length in bytes of the data pointed to by DataBlock/ContinuationPointer.
1669  ///
1671  union {
1672  ///
1673  /// Physical address of the data block. This member of the union is
1674  /// used if Length is not equal to zero.
1675  ///
1677  ///
1678  /// Physical address of another block of
1679  /// EFI_CAPSULE_BLOCK_DESCRIPTOR structures. This
1680  /// member of the union is used if Length is equal to zero. If
1681  /// ContinuationPointer is zero this entry represents the end of the list.
1682  ///
1684  } Union;
1686 
1687 ///
1688 /// EFI Capsule Header.
1689 ///
1690 typedef struct {
1691  ///
1692  /// A GUID that defines the contents of a capsule.
1693  ///
1695  ///
1696  /// The size of the capsule header. This may be larger than the size of
1697  /// the EFI_CAPSULE_HEADER since CapsuleGuid may imply
1698  /// extended header entries
1699  ///
1701  ///
1702  /// Bit-mapped list describing the capsule attributes. The Flag values
1703  /// of 0x0000 - 0xFFFF are defined by CapsuleGuid. Flag values
1704  /// of 0x10000 - 0xFFFFFFFF are defined by this specification
1705  ///
1707  ///
1708  /// Size in bytes of the capsule (including capsule header).
1709  ///
1712 
1713 ///
1714 /// The EFI System Table entry must point to an array of capsules
1715 /// that contain the same CapsuleGuid value. The array must be
1716 /// prefixed by a UINT32 that represents the size of the array of capsules.
1717 ///
1718 typedef struct {
1719  ///
1720  /// the size of the array of capsules.
1721  ///
1723  ///
1724  /// Point to an array of capsules that contain the same CapsuleGuid value.
1725  ///
1726  VOID *CapsulePtr[1];
1728 
1729 #define CAPSULE_FLAGS_PERSIST_ACROSS_RESET 0x00010000
1730 #define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE 0x00020000
1731 #define CAPSULE_FLAGS_INITIATE_RESET 0x00040000
1732 
1733 /**
1734  Passes capsules to the firmware with both virtual and physical mapping. Depending on the intended
1735  consumption, the firmware may process the capsule immediately. If the payload should persist
1736  across a system reset, the reset value returned from EFI_QueryCapsuleCapabilities must
1737  be passed into ResetSystem() and will cause the capsule to be processed by the firmware as
1738  part of the reset process.
1739 
1740  @param[in] CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules
1741  being passed into update capsule.
1742  @param[in] CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in
1743  CaspuleHeaderArray.
1744  @param[in] ScatterGatherList Physical pointer to a set of
1745  EFI_CAPSULE_BLOCK_DESCRIPTOR that describes the
1746  location in physical memory of a set of capsules.
1747 
1748  @retval EFI_SUCCESS Valid capsule was passed. If
1749  CAPSULE_FLAGS_PERSIT_ACROSS_RESET is not set, the
1750  capsule has been successfully processed by the firmware.
1751  @retval EFI_INVALID_PARAMETER CapsuleSize is NULL, or an incompatible set of flags were
1752  set in the capsule header.
1753  @retval EFI_INVALID_PARAMETER CapsuleCount is 0.
1754  @retval EFI_DEVICE_ERROR The capsule update was started, but failed due to a device error.
1755  @retval EFI_UNSUPPORTED The capsule type is not supported on this platform.
1756  @retval EFI_OUT_OF_RESOURCES When ExitBootServices() has been previously called this error indicates the capsule
1757  is compatible with this platform but is not capable of being submitted or processed
1758  in runtime. The caller may resubmit the capsule prior to ExitBootServices().
1759  @retval EFI_OUT_OF_RESOURCES When ExitBootServices() has not been previously called then this error indicates
1760  the capsule is compatible with this platform but there are insufficient resources to process.
1761  @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
1762  The platform should describe this runtime service as unsupported at runtime
1763  via an EFI_RT_PROPERTIES_TABLE configuration table.
1764 
1765 **/
1766 typedef
1767 EFI_STATUS
1769  IN EFI_CAPSULE_HEADER **CapsuleHeaderArray,
1770  IN UINTN CapsuleCount,
1771  IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL
1772  );
1773 
1774 /**
1775  Returns if the capsule can be supported via UpdateCapsule().
1776 
1777  @param[in] CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules
1778  being passed into update capsule.
1779  @param[in] CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in
1780  CaspuleHeaderArray.
1781  @param[out] MaxiumCapsuleSize On output the maximum size that UpdateCapsule() can
1782  support as an argument to UpdateCapsule() via
1783  CapsuleHeaderArray and ScatterGatherList.
1784  @param[out] ResetType Returns the type of reset required for the capsule update.
1785 
1786  @retval EFI_SUCCESS Valid answer returned.
1787  @retval EFI_UNSUPPORTED The capsule type is not supported on this platform, and
1788  MaximumCapsuleSize and ResetType are undefined.
1789  @retval EFI_INVALID_PARAMETER MaximumCapsuleSize is NULL.
1790  @retval EFI_OUT_OF_RESOURCES When ExitBootServices() has been previously called this error indicates the capsule
1791  is compatible with this platform but is not capable of being submitted or processed
1792  in runtime. The caller may resubmit the capsule prior to ExitBootServices().
1793  @retval EFI_OUT_OF_RESOURCES When ExitBootServices() has not been previously called then this error indicates
1794  the capsule is compatible with this platform but there are insufficient resources to process.
1795  @retval EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made.
1796  The platform should describe this runtime service as unsupported at runtime
1797  via an EFI_RT_PROPERTIES_TABLE configuration table.
1798 
1799 **/
1800 typedef
1801 EFI_STATUS
1803  IN EFI_CAPSULE_HEADER **CapsuleHeaderArray,
1804  IN UINTN CapsuleCount,
1805  OUT UINT64 *MaximumCapsuleSize,
1806  OUT EFI_RESET_TYPE *ResetType
1807  );
1808 
1809 /**
1810  Returns information about the EFI variables.
1811 
1812  @param[in] Attributes Attributes bitmask to specify the type of variables on
1813  which to return information.
1814  @param[out] MaximumVariableStorageSize On output the maximum size of the storage space
1815  available for the EFI variables associated with the
1816  attributes specified.
1817  @param[out] RemainingVariableStorageSize Returns the remaining size of the storage space
1818  available for the EFI variables associated with the
1819  attributes specified.
1820  @param[out] MaximumVariableSize Returns the maximum size of the individual EFI
1821  variables associated with the attributes specified.
1822 
1823  @retval EFI_SUCCESS Valid answer returned.
1824  @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits was supplied
1825  @retval EFI_UNSUPPORTED The attribute is not supported on this platform, and the
1826  MaximumVariableStorageSize,
1827  RemainingVariableStorageSize, MaximumVariableSize
1828  are undefined.
1829 
1830 **/
1831 typedef
1832 EFI_STATUS
1834  IN UINT32 Attributes,
1835  OUT UINT64 *MaximumVariableStorageSize,
1836  OUT UINT64 *RemainingVariableStorageSize,
1837  OUT UINT64 *MaximumVariableSize
1838  );
1839 
1840 //
1841 // Firmware should stop at a firmware user interface on next boot
1842 //
1843 #define EFI_OS_INDICATIONS_BOOT_TO_FW_UI 0x0000000000000001
1844 #define EFI_OS_INDICATIONS_TIMESTAMP_REVOCATION 0x0000000000000002
1845 #define EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED 0x0000000000000004
1846 #define EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED 0x0000000000000008
1847 #define EFI_OS_INDICATIONS_CAPSULE_RESULT_VAR_SUPPORTED 0x0000000000000010
1848 #define EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY 0x0000000000000040
1849 #define EFI_OS_INDICATIONS_JSON_CONFIG_DATA_REFRESH 0x0000000000000080
1850 
1851 //
1852 // EFI Runtime Services Table
1853 //
1854 #define EFI_SYSTEM_TABLE_SIGNATURE SIGNATURE_64 ('I','B','I',' ','S','Y','S','T')
1855 #define EFI_2_110_SYSTEM_TABLE_REVISION ((2 << 16) | (110))
1856 #define EFI_2_100_SYSTEM_TABLE_REVISION ((2 << 16) | (100))
1857 #define EFI_2_90_SYSTEM_TABLE_REVISION ((2 << 16) | (90))
1858 #define EFI_2_80_SYSTEM_TABLE_REVISION ((2 << 16) | (80))
1859 #define EFI_2_70_SYSTEM_TABLE_REVISION ((2 << 16) | (70))
1860 #define EFI_2_60_SYSTEM_TABLE_REVISION ((2 << 16) | (60))
1861 #define EFI_2_50_SYSTEM_TABLE_REVISION ((2 << 16) | (50))
1862 #define EFI_2_40_SYSTEM_TABLE_REVISION ((2 << 16) | (40))
1863 #define EFI_2_31_SYSTEM_TABLE_REVISION ((2 << 16) | (31))
1864 #define EFI_2_30_SYSTEM_TABLE_REVISION ((2 << 16) | (30))
1865 #define EFI_2_20_SYSTEM_TABLE_REVISION ((2 << 16) | (20))
1866 #define EFI_2_10_SYSTEM_TABLE_REVISION ((2 << 16) | (10))
1867 #define EFI_2_00_SYSTEM_TABLE_REVISION ((2 << 16) | (00))
1868 #define EFI_1_10_SYSTEM_TABLE_REVISION ((1 << 16) | (10))
1869 #define EFI_1_02_SYSTEM_TABLE_REVISION ((1 << 16) | (02))
1870 #define EFI_SYSTEM_TABLE_REVISION EFI_2_70_SYSTEM_TABLE_REVISION
1871 #define EFI_SPECIFICATION_VERSION EFI_SYSTEM_TABLE_REVISION
1872 
1873 #define EFI_RUNTIME_SERVICES_SIGNATURE SIGNATURE_64 ('R','U','N','T','S','E','R','V')
1874 #define EFI_RUNTIME_SERVICES_REVISION EFI_SPECIFICATION_VERSION
1875 
1876 ///
1877 /// EFI Runtime Services Table.
1878 ///
1879 typedef struct {
1880  ///
1881  /// The table header for the EFI Runtime Services Table.
1882  ///
1884 
1885  //
1886  // Time Services
1887  //
1892 
1893  //
1894  // Virtual Memory Services
1895  //
1898 
1899  //
1900  // Variable Services
1901  //
1905 
1906  //
1907  // Miscellaneous Services
1908  //
1911 
1912  //
1913  // UEFI 2.0 Capsule Services
1914  //
1917 
1918  //
1919  // Miscellaneous UEFI 2.0 Service
1920  //
1923 
1924 #define EFI_BOOT_SERVICES_SIGNATURE SIGNATURE_64 ('B','O','O','T','S','E','R','V')
1925 #define EFI_BOOT_SERVICES_REVISION EFI_SPECIFICATION_VERSION
1926 
1927 ///
1928 /// EFI Boot Services Table.
1929 ///
1930 typedef struct {
1931  ///
1932  /// The table header for the EFI Boot Services Table.
1933  ///
1935 
1936  //
1937  // Task Priority Services
1938  //
1941 
1942  //
1943  // Memory Services
1944  //
1950 
1951  //
1952  // Event & Timer Services
1953  //
1960 
1961  //
1962  // Protocol Handler Services
1963  //
1973 
1974  //
1975  // Image Services
1976  //
1982 
1983  //
1984  // Miscellaneous Services
1985  //
1989 
1990  //
1991  // DriverSupport Services
1992  //
1995 
1996  //
1997  // Open and Close Protocol Services
1998  //
2002 
2003  //
2004  // Library Services
2005  //
2011 
2012  //
2013  // 32-bit CRC Services
2014  //
2016 
2017  //
2018  // Miscellaneous Services
2019  //
2024 
2025 ///
2026 /// Contains a set of GUID/pointer pairs comprised of the ConfigurationTable field in the
2027 /// EFI System Table.
2028 ///
2029 typedef struct {
2030  ///
2031  /// The 128-bit GUID value that uniquely identifies the system configuration table.
2032  ///
2034  ///
2035  /// A pointer to the table associated with VendorGuid.
2036  ///
2039 
2040 ///
2041 /// EFI System Table
2042 ///
2043 typedef struct {
2044  ///
2045  /// The table header for the EFI System Table.
2046  ///
2048  ///
2049  /// A pointer to a null terminated string that identifies the vendor
2050  /// that produces the system firmware for the platform.
2051  ///
2053  ///
2054  /// A firmware vendor specific value that identifies the revision
2055  /// of the system firmware for the platform.
2056  ///
2058  ///
2059  /// The handle for the active console input device. This handle must support
2060  /// EFI_SIMPLE_TEXT_INPUT_PROTOCOL and EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL. If
2061  /// there is no active console, these protocols must still be present.
2062  ///
2064  ///
2065  /// A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL interface that is
2066  /// associated with ConsoleInHandle.
2067  ///
2069  ///
2070  /// The handle for the active console output device. This handle must support the
2071  /// EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL. If there is no active console, these protocols
2072  /// must still be present.
2073  ///
2075  ///
2076  /// A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface
2077  /// that is associated with ConsoleOutHandle.
2078  ///
2080  ///
2081  /// The handle for the active standard error console device.
2082  /// This handle must support the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL. If there
2083  /// is no active console, this protocol must still be present.
2084  ///
2086  ///
2087  /// A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface
2088  /// that is associated with StandardErrorHandle.
2089  ///
2091  ///
2092  /// A pointer to the EFI Runtime Services Table.
2093  ///
2095  ///
2096  /// A pointer to the EFI Boot Services Table.
2097  ///
2099  ///
2100  /// The number of system configuration tables in the buffer ConfigurationTable.
2101  ///
2103  ///
2104  /// A pointer to the system configuration tables.
2105  /// The number of entries in the table is NumberOfTableEntries.
2106  ///
2109 
2110 /**
2111  This is the declaration of an EFI image entry point. This entry point is
2112  the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including
2113  both device drivers and bus drivers.
2114 
2115  @param[in] ImageHandle The firmware allocated handle for the UEFI image.
2116  @param[in] SystemTable A pointer to the EFI System Table.
2117 
2118  @retval EFI_SUCCESS The operation completed successfully.
2119  @retval Others An unexpected error occurred.
2120 **/
2121 typedef
2122 EFI_STATUS
2124  IN EFI_HANDLE ImageHandle,
2125  IN EFI_SYSTEM_TABLE *SystemTable
2126  );
2127 
2128 //
2129 // EFI Load Option. This data structure describes format of UEFI boot option variables.
2130 //
2131 // NOTE: EFI Load Option is a byte packed buffer of variable length fields.
2132 // The first two fields have fixed length. They are declared as members of the
2133 // EFI_LOAD_OPTION structure. All the other fields are variable length fields.
2134 // They are listed in the comment block below for reference purposes.
2135 //
2136 #pragma pack(1)
2137 typedef struct _EFI_LOAD_OPTION {
2138  ///
2139  /// The attributes for this load option entry. All unused bits must be zero
2140  /// and are reserved by the UEFI specification for future growth.
2141  ///
2143  ///
2144  /// Length in bytes of the FilePathList. OptionalData starts at offset
2145  /// sizeof(UINT32) + sizeof(UINT16) + StrSize(Description) + FilePathListLength
2146  /// of the EFI_LOAD_OPTION descriptor.
2147  ///
2149  ///
2150  /// The user readable description for the load option.
2151  /// This field ends with a Null character.
2152  ///
2153  // CHAR16 Description[];
2154  ///
2155  /// A packed array of UEFI device paths. The first element of the array is a
2156  /// device path that describes the device and location of the Image for this
2157  /// load option. The FilePathList[0] is specific to the device type. Other
2158  /// device paths may optionally exist in the FilePathList, but their usage is
2159  /// OSV specific. Each element in the array is variable length, and ends at
2160  /// the device path end structure. Because the size of Description is
2161  /// arbitrary, this data structure is not guaranteed to be aligned on a
2162  /// natural boundary. This data structure may have to be copied to an aligned
2163  /// natural boundary before it is used.
2164  ///
2165  // EFI_DEVICE_PATH_PROTOCOL FilePathList[];
2166  ///
2167  /// The remaining bytes in the load option descriptor are a binary data buffer
2168  /// that is passed to the loaded image. If the field is zero bytes long, a
2169  /// NULL pointer is passed to the loaded image. The number of bytes in
2170  /// OptionalData can be computed by subtracting the starting offset of
2171  /// OptionalData from total size in bytes of the EFI_LOAD_OPTION.
2172  ///
2173  // UINT8 OptionalData[];
2174 } EFI_LOAD_OPTION;
2175 #pragma pack()
2176 
2177 //
2178 // EFI Load Options Attributes
2179 //
2180 #define LOAD_OPTION_ACTIVE 0x00000001
2181 #define LOAD_OPTION_FORCE_RECONNECT 0x00000002
2182 #define LOAD_OPTION_HIDDEN 0x00000008
2183 #define LOAD_OPTION_CATEGORY 0x00001F00
2184 
2185 #define LOAD_OPTION_CATEGORY_BOOT 0x00000000
2186 #define LOAD_OPTION_CATEGORY_APP 0x00000100
2187 
2188 #define EFI_BOOT_OPTION_SUPPORT_KEY 0x00000001
2189 #define EFI_BOOT_OPTION_SUPPORT_APP 0x00000002
2190 #define EFI_BOOT_OPTION_SUPPORT_SYSPREP 0x00000010
2191 #define EFI_BOOT_OPTION_SUPPORT_COUNT 0x00000300
2192 
2193 ///
2194 /// EFI Boot Key Data
2195 ///
2196 typedef union {
2197  struct {
2198  ///
2199  /// Indicates the revision of the EFI_KEY_OPTION structure. This revision level should be 0.
2200  ///
2202  ///
2203  /// Either the left or right Shift keys must be pressed (1) or must not be pressed (0).
2204  ///
2206  ///
2207  /// Either the left or right Control keys must be pressed (1) or must not be pressed (0).
2208  ///
2210  ///
2211  /// Either the left or right Alt keys must be pressed (1) or must not be pressed (0).
2212  ///
2214  ///
2215  /// Either the left or right Logo keys must be pressed (1) or must not be pressed (0).
2216  ///
2218  ///
2219  /// The Menu key must be pressed (1) or must not be pressed (0).
2220  ///
2222  ///
2223  /// The SysReq key must be pressed (1) or must not be pressed (0).
2224  ///
2227  ///
2228  /// Specifies the actual number of entries in EFI_KEY_OPTION.Keys, from 0-3. If
2229  /// zero, then only the shift state is considered. If more than one, then the boot option will
2230  /// only be launched if all of the specified keys are pressed with the same shift state.
2231  ///
2233  } Options;
2236 
2237 ///
2238 /// EFI Key Option.
2239 ///
2240 #pragma pack(1)
2241 typedef struct {
2242  ///
2243  /// Specifies options about how the key will be processed.
2244  ///
2246  ///
2247  /// The CRC-32 which should match the CRC-32 of the entire EFI_LOAD_OPTION to
2248  /// which BootOption refers. If the CRC-32s do not match this value, then this key
2249  /// option is ignored.
2250  ///
2252  ///
2253  /// The Boot#### option which will be invoked if this key is pressed and the boot option
2254  /// is active (LOAD_OPTION_ACTIVE is set).
2255  ///
2257  ///
2258  /// The key codes to compare against those returned by the
2259  /// EFI_SIMPLE_TEXT_INPUT and EFI_SIMPLE_TEXT_INPUT_EX protocols.
2260  /// The number of key codes (0-3) is specified by the EFI_KEY_CODE_COUNT field in KeyOptions.
2261  ///
2262  // EFI_INPUT_KEY Keys[];
2263 } EFI_KEY_OPTION;
2264 #pragma pack()
2265 
2266 //
2267 // EFI File location to boot from on removable media devices
2268 //
2269 #define EFI_REMOVABLE_MEDIA_FILE_NAME_IA32 L"\\EFI\\BOOT\\BOOTIA32.EFI"
2270 #define EFI_REMOVABLE_MEDIA_FILE_NAME_IA64 L"\\EFI\\BOOT\\BOOTIA64.EFI"
2271 #define EFI_REMOVABLE_MEDIA_FILE_NAME_X64 L"\\EFI\\BOOT\\BOOTX64.EFI"
2272 #define EFI_REMOVABLE_MEDIA_FILE_NAME_ARM L"\\EFI\\BOOT\\BOOTARM.EFI"
2273 #define EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64 L"\\EFI\\BOOT\\BOOTAA64.EFI"
2274 #define EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64 L"\\EFI\\BOOT\\BOOTRISCV64.EFI"
2275 #define EFI_REMOVABLE_MEDIA_FILE_NAME_LOONGARCH64 L"\\EFI\\BOOT\\BOOTLOONGARCH64.EFI"
2276 
2277 #if !defined (EFI_REMOVABLE_MEDIA_FILE_NAME)
2278  #if defined (MDE_CPU_IA32)
2279 #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_IA32
2280  #elif defined (MDE_CPU_X64)
2281 #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_X64
2282  #elif defined (MDE_CPU_EBC)
2283  #elif defined (MDE_CPU_ARM)
2284 #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_ARM
2285  #elif defined (MDE_CPU_AARCH64)
2286 #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64
2287  #elif defined (MDE_CPU_RISCV64)
2288 #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64
2289  #elif defined (MDE_CPU_LOONGARCH64)
2290 #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_LOONGARCH64
2291  #else
2292  #error Unknown Processor Type
2293  #endif
2294 #endif
2295 
2296 //
2297 // The directory within the active EFI System Partition defined for delivery of capsule to firmware
2298 //
2299 #define EFI_CAPSULE_FILE_DIRECTORY L"\\EFI\\UpdateCapsule\\"
2300 
2301 #include <ipxe/efi/Uefi/UefiPxe.h>
2302 #include <ipxe/efi/Uefi/UefiGpt.h>
2304 
2305 #endif
#define OPTIONAL
Passing the datum to the function is optional, and a NULL is passed if the value is not supplied.
Definition: Base.h:292
EFI_QUERY_VARIABLE_INFO QueryVariableInfo
Definition: UefiSpec.h:1921
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
Definition: UefiSpec.h:2098
EFI_STATUS(EFIAPI * EFI_GET_MEMORY_MAP)(IN OUT UINTN *MemoryMapSize, OUT EFI_MEMORY_DESCRIPTOR *MemoryMap, OUT UINTN *MapKey, OUT UINTN *DescriptorSize, OUT UINT32 *DescriptorVersion)
Returns the current memory map.
Definition: UefiSpec.h:268
EFI_SET_TIME SetTime
Definition: UefiSpec.h:1889
EFI_SET_WATCHDOG_TIMER SetWatchdogTimer
Definition: UefiSpec.h:1988
UINT32 InputKeyCount
Specifies the actual number of entries in EFI_KEY_OPTION.Keys, from 0-3.
Definition: UefiSpec.h:2232
EFI_STATUS(EFIAPI * EFI_ALLOCATE_PAGES)(IN EFI_ALLOCATE_TYPE Type, IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages, IN OUT EFI_PHYSICAL_ADDRESS *Memory)
Allocates memory pages from the system.
Definition: UefiSpec.h:215
EFI_TABLE_HEADER Hdr
The table header for the EFI Runtime Services Table.
Definition: UefiSpec.h:1883
EFI_GET_WAKEUP_TIME GetWakeupTime
Definition: UefiSpec.h:1890
EFI Oprn Protocol Information Entry.
Definition: UefiSpec.h:1431
UINT16 FilePathListLength
Length in bytes of the FilePathList.
Definition: UefiSpec.h:2148
EFI_STATUS(EFIAPI * EFI_INSTALL_PROTOCOL_INTERFACE)(IN OUT EFI_HANDLE *Handle, IN EFI_GUID *Protocol, IN EFI_INTERFACE_TYPE InterfaceType, IN VOID *Interface)
Installs a protocol interface on a device handle.
Definition: UefiSpec.h:1230
UINT32 Flags
Bit-mapped list describing the capsule attributes.
Definition: UefiSpec.h:1706
EFI_RAISE_TPL RaiseTPL
Definition: UefiSpec.h:1939
An event is to be signaled periodically at a specified interval from the current time.
Definition: UefiSpec.h:547
UINT32 ShiftPressed
Either the left or right Shift keys must be pressed (1) or must not be pressed (0).
Definition: UefiSpec.h:2205
EFI_HANDLE ControllerHandle
Definition: UefiSpec.h:1433
The device path protocol as defined in UEFI 2.0.
EFI_STATUS(EFIAPI * EFI_GET_NEXT_HIGH_MONO_COUNT)(OUT UINT32 *HighCount)
Returns the next high 32 bits of the platform's monotonic counter.
Definition: UefiSpec.h:1139
EFI_TPL(EFIAPI * EFI_RAISE_TPL)(IN EFI_TPL NewTpl)
Raises a task's priority level and returns its previous level.
Definition: UefiSpec.h:662
UINT32 ControlPressed
Either the left or right Control keys must be pressed (1) or must not be pressed (0).
Definition: UefiSpec.h:2209
UINT32 PackedValue
Definition: UefiSpec.h:2234
EFI_HANDLE AgentHandle
Definition: UefiSpec.h:1432
UINT8 Type
Definition: Acpi10.h:136
EFI_STATUS(EFIAPI * EFI_GET_WAKEUP_TIME)(OUT BOOLEAN *Enabled, OUT BOOLEAN *Pending, OUT EFI_TIME *Time)
Returns the current wakeup alarm clock setting.
Definition: UefiSpec.h:891
CHAR16 * FirmwareVendor
A pointer to a null terminated string that identifies the vendor that produces the system firmware fo...
Definition: UefiSpec.h:2052
EFI_LOCATE_PROTOCOL LocateProtocol
Definition: UefiSpec.h:2008
EFI_STALL Stall
Definition: UefiSpec.h:1987
EFI_STATUS(EFIAPI * EFI_SET_TIME)(IN EFI_TIME *Time)
Sets the current local time and date information.
Definition: UefiSpec.h:868
An event is to be signaled once at a specified interval from the current time.
Definition: UefiSpec.h:551
EFI_CONVERT_POINTER ConvertPointer
Definition: UefiSpec.h:1897
Definition of an EFI memory descriptor.
Definition: UefiSpec.h:155
EFI_QUERY_CAPSULE_CAPABILITIES QueryCapsuleCapabilities
Definition: UefiSpec.h:1916
EFI_STATUS(EFIAPI * EFI_LOCATE_DEVICE_PATH)(IN EFI_GUID *Protocol, IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, OUT EFI_HANDLE *Device)
Locates the handle to a device on the device path that supports the specified protocol.
Definition: UefiSpec.h:1583
EFI_STATUS(EFIAPI * EFI_WAIT_FOR_EVENT)(IN UINTN NumberOfEvents, IN EFI_EVENT *Event, OUT UINTN *Index)
Stops execution until an event is signaled.
Definition: UefiSpec.h:608
128 bit buffer containing a unique identifier value.
Definition: Base.h:215
UINT32 FirmwareRevision
A firmware vendor specific value that identifies the revision of the system firmware for the platform...
Definition: UefiSpec.h:2057
struct _EFI_LOAD_OPTION EFI_LOAD_OPTION
Retrieve all the handles in the handle database.
Definition: UefiSpec.h:1521
The EFI_SIMPLE_TEXT_INPUT_PROTOCOL is used on the ConsoleIn device.
Definition: SimpleTextIn.h:119
EFI_STATUS(EFIAPI * EFI_OPEN_PROTOCOL_INFORMATION)(IN EFI_HANDLE Handle, IN EFI_GUID *Protocol, OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer, OUT UINTN *EntryCount)
Retrieves the list of agents that currently have a protocol interface opened.
Definition: UefiSpec.h:1455
UINT32 CapsuleArrayNumber
the size of the array of capsules.
Definition: UefiSpec.h:1722
EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface
Definition: UefiSpec.h:1965
EFI_EXIT_BOOT_SERVICES ExitBootServices
Definition: UefiSpec.h:1981
EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface
Definition: UefiSpec.h:1966
EFI_RESET_TYPE
Enumeration of reset types.
VOID * EFI_EVENT
Handle to an event structure.
Definition: UefiBaseType.h:39
EFI_GUID VendorGuid
The 128-bit GUID value that uniquely identifies the system configuration table.
Definition: UefiSpec.h:2033
EFI_IMAGE_LOAD LoadImage
Definition: UefiSpec.h:1977
unsigned char BOOLEAN
EFI Boot Key Data.
Definition: UefiSpec.h:2196
EFI_STATUS(EFIAPI * EFI_FREE_PAGES)(IN EFI_PHYSICAL_ADDRESS Memory, IN UINTN Pages)
Frees memory pages.
Definition: UefiSpec.h:236
UINT32 Attributes
The attributes for this load option entry.
Definition: UefiSpec.h:2142
EFI_STATUS(EFIAPI * EFI_SIGNAL_EVENT)(IN EFI_EVENT Event)
Signals an event.
Definition: UefiSpec.h:588
EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount
Definition: UefiSpec.h:1909
EFI_HANDLE ConsoleInHandle
The handle for the active console input device.
Definition: UefiSpec.h:2063
EFI_STATUS(EFIAPI * EFI_STALL)(IN UINTN Microseconds)
Induces a fine-grained stall.
Definition: UefiSpec.h:1055
EFI_STATUS(EFIAPI * EFI_DISCONNECT_CONTROLLER)(IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE DriverImageHandle OPTIONAL, IN EFI_HANDLE ChildHandle OPTIONAL)
Disconnects one or more drivers from a controller.
Definition: UefiSpec.h:409
FILE_LICENCE(BSD2_PATENT)
EFI_STATUS(EFIAPI * EFI_CALCULATE_CRC32)(IN VOID *Data, IN UINTN DataSize, OUT UINT32 *Crc32)
Computes and returns a 32-bit CRC for a data buffer.
Definition: UefiSpec.h:1160
Retrieve the next handle fron a RegisterProtocolNotify() event.
Definition: UefiSpec.h:1525
EFI_SET_MEM SetMem
Definition: UefiSpec.h:2021
unsigned int UINT32
Definition: ProcessorBind.h:98
EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces
Definition: UefiSpec.h:2009
This header file contains all of the PXE type definitions, structure prototypes, global variables and...
VOID(EFIAPI * EFI_RESTORE_TPL)(IN EFI_TPL OldTpl)
Restores a task's priority level to its previous value.
Definition: UefiSpec.h:674
UINT16_t BufferSize
Buffer size.
Definition: pxe_api.h:64
EFI_STATUS(EFIAPI * EFI_SET_TIMER)(IN EFI_EVENT Event, IN EFI_TIMER_DELAY Type, IN UINT64 TriggerTime)
Sets the type of timer and the trigger time for a timer event.
Definition: UefiSpec.h:572
unsigned short CHAR16
EFI_CLOSE_EVENT CloseEvent
Definition: UefiSpec.h:1958
EFI_TABLE_HEADER Hdr
The table header for the EFI Boot Services Table.
Definition: UefiSpec.h:1934
EFI_SET_TIMER SetTimer
Definition: UefiSpec.h:1955
EFI_STATUS(EFIAPI * EFI_CLOSE_PROTOCOL)(IN EFI_HANDLE Handle, IN EFI_GUID *Protocol, IN EFI_HANDLE AgentHandle, IN EFI_HANDLE ControllerHandle)
Closes a protocol on a handle that was opened using OpenProtocol().
Definition: UefiSpec.h:1421
EFI_LOCATE_HANDLE LocateHandle
Definition: UefiSpec.h:1970
EFI_IMAGE_UNLOAD UnloadImage
Definition: UefiSpec.h:1980
EFI_BOOT_KEY_DATA KeyData
Specifies options about how the key will be processed.
Definition: UefiSpec.h:2245
This protocol can be used on any device handle to obtain generic path/location information concerning...
Definition: DevicePath.h:45
EFI_STATUS(EFIAPI * EFI_LOCATE_HANDLE)(IN EFI_LOCATE_SEARCH_TYPE SearchType, IN EFI_GUID *Protocol OPTIONAL, IN VOID *SearchKey OPTIONAL, IN OUT UINTN *BufferSize, OUT EFI_HANDLE *Buffer)
Returns an array of handles that support a specified protocol.
Definition: UefiSpec.h:1557
UINT8_t Length
Length of this structure.
Definition: pxe_api.h:70
VOID(EFIAPI * EFI_EVENT_NOTIFY)(IN EFI_EVENT Event, IN VOID *Context)
Invoke a notification event.
Definition: UefiSpec.h:475
EFI_STATUS(EFIAPI * EFI_GET_NEXT_VARIABLE_NAME)(IN OUT UINTN *VariableNameSize, IN OUT CHAR16 *VariableName, IN OUT EFI_GUID *VendorGuid)
Enumerates the current variable names.
Definition: UefiSpec.h:748
EFI_STATUS(EFIAPI * EFI_IMAGE_LOAD)(IN BOOLEAN BootPolicy, IN EFI_HANDLE ParentImageHandle, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN VOID *SourceBuffer OPTIONAL, IN UINTN SourceSize, OUT EFI_HANDLE *ImageHandle)
Loads an EFI image into memory.
Definition: UefiSpec.h:952
EFI_CLOSE_PROTOCOL CloseProtocol
Definition: UefiSpec.h:2000
EFI_STATUS(EFIAPI * EFI_GET_TIME)(OUT EFI_TIME *Time, OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL)
Returns the current time and date information, and the time-keeping capabilities of the hardware plat...
Definition: UefiSpec.h:848
EFI_CREATE_EVENT_EX CreateEventEx
Definition: UefiSpec.h:2022
unsigned char UINT8
UINT64 EFI_PHYSICAL_ADDRESS
64-bit physical memory address.
Definition: UefiBaseType.h:52
EFI_STATUS(EFIAPI * EFI_REINSTALL_PROTOCOL_INTERFACE)(IN EFI_HANDLE Handle, IN EFI_GUID *Protocol, IN VOID *OldInterface, IN VOID *NewInterface)
Reinstalls a protocol interface on a device handle.
Definition: UefiSpec.h:1280
EFI_STATUS(EFIAPI * EFI_UNINSTALL_PROTOCOL_INTERFACE)(IN EFI_HANDLE Handle, IN EFI_GUID *Protocol, IN VOID *Interface)
Removes a protocol interface from a device handle.
Definition: UefiSpec.h:1306
The SIMPLE_TEXT_OUTPUT protocol is used to control text-based output devices.
UINT64 NumberOfPages
NumberOfPagesNumber of 4 KiB pages in the memory region.
Definition: UefiSpec.h:180
EFI_PHYSICAL_ADDRESS DataBlock
Physical address of the data block.
Definition: UefiSpec.h:1676
UINT16_t Size
Size of structure.
Definition: pxe_api.h:58
EFI_TABLE_HEADER Hdr
The table header for the EFI System Table.
Definition: UefiSpec.h:2047
EFI_STATUS(EFIAPI * EFI_EXIT)(IN EFI_HANDLE ImageHandle, IN EFI_STATUS ExitStatus, IN UINTN ExitDataSize, IN CHAR16 *ExitData OPTIONAL)
Terminates a loaded EFI image and returns control to boot services.
Definition: UefiSpec.h:1005
EFI_STATUS(EFIAPI * EFI_CREATE_EVENT)(IN UINT32 Type, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL, IN VOID *NotifyContext OPTIONAL, OUT EFI_EVENT *Event)
Creates an event.
Definition: UefiSpec.h:498
UINT32 HeaderSize
The size of the capsule header.
Definition: UefiSpec.h:1700
UINT32 CapsuleImageSize
Size in bytes of the capsule (including capsule header).
Definition: UefiSpec.h:1710
An event's timer settings is to be cancelled and not trigger time is to be set/.
Definition: UefiSpec.h:543
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * ConOut
A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface that is associated with ConsoleOutHandle.
Definition: UefiSpec.h:2079
VOID(EFIAPI * EFI_SET_MEM)(IN VOID *Buffer, IN UINTN Size, IN UINT8 Value)
The SetMem() function fills a buffer with a specified value.
Definition: UefiSpec.h:1192
#define OUT
Definition: mlx_utils.h:29
EFI_STATUS(EFIAPI * EFI_OPEN_PROTOCOL)(IN EFI_HANDLE Handle, IN EFI_GUID *Protocol, OUT VOID **Interface OPTIONAL, IN EFI_HANDLE AgentHandle, IN EFI_HANDLE ControllerHandle, IN UINT32 Attributes)
Queries a handle to determine if it supports a specified protocol.
Definition: UefiSpec.h:1389
EFI_STATUS(EFIAPI * EFI_SET_WAKEUP_TIME)(IN BOOLEAN Enable, IN EFI_TIME *Time OPTIONAL)
Sets the system wakeup alarm clock time.
Definition: UefiSpec.h:915
EFI_MEMORY_TYPE
Enumeration of memory types introduced in UEFI.
EFI_STATUS(EFIAPI * EFI_QUERY_VARIABLE_INFO)(IN UINT32 Attributes, OUT UINT64 *MaximumVariableStorageSize, OUT UINT64 *RemainingVariableStorageSize, OUT UINT64 *MaximumVariableSize)
Returns information about the EFI variables.
Definition: UefiSpec.h:1833
EFI_SET_VARIABLE SetVariable
Definition: UefiSpec.h:1904
UINT32 OpenCount
Definition: UefiSpec.h:1435
Allocate pages at a specified address.
Definition: UefiSpec.h:44
EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface
Definition: UefiSpec.h:1964
UINT32 Attributes
Definition: UefiSpec.h:1434
EFI_CREATE_EVENT CreateEvent
Definition: UefiSpec.h:1954
EFI_SIMPLE_TEXT_INPUT_PROTOCOL * ConIn
A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL interface that is associated with ConsoleInHandle.
Definition: UefiSpec.h:2068
EFI_HANDLE_PROTOCOL HandleProtocol
Definition: UefiSpec.h:1967
EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify
Definition: UefiSpec.h:1969
EFI_COPY_MEM CopyMem
Definition: UefiSpec.h:2020
EFI_STATUS(EFIAPI * EFI_LOCATE_PROTOCOL)(IN EFI_GUID *Protocol, IN VOID *Registration OPTIONAL, OUT VOID **Interface)
Returns the first protocol instance that matches the given protocol.
Definition: UefiSpec.h:1657
EFI_STATUS(EFIAPI * EFI_IMAGE_ENTRY_POINT)(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
This is the declaration of an EFI image entry point.
Definition: UefiSpec.h:2123
EFI_GET_VARIABLE GetVariable
Definition: UefiSpec.h:1902
UINT32 Resolution
Provides the reporting resolution of the real-time clock device in counts per second.
Definition: UefiSpec.h:812
BOOLEAN SetsToZero
A TRUE indicates that a time set operation clears the device's time below the Resolution reporting le...
Definition: UefiSpec.h:827
EFI_GUID CapsuleGuid
A GUID that defines the contents of a capsule.
Definition: UefiSpec.h:1694
Maximum enumeration value that may be used for bounds checking.
Definition: UefiSpec.h:48
unsigned short UINT16
EFI Guid Partition Table Format Definition.
This file defines the encoding for the VFR (Visual Form Representation) language.
EFI_SIGNAL_EVENT SignalEvent
Definition: UefiSpec.h:1957
EFI_PHYSICAL_ADDRESS PhysicalStart
Physical address of the first byte in the memory region.
Definition: UefiSpec.h:167
EFI_HANDLE StandardErrorHandle
The handle for the active standard error console device.
Definition: UefiSpec.h:2085
EFI Runtime Services Table.
Definition: UefiSpec.h:1879
VOID(EFIAPI * EFI_COPY_MEM)(IN VOID *Destination, IN VOID *Source, IN UINTN Length)
Copies the contents of one buffer to another buffer.
Definition: UefiSpec.h:1176
EFI_RESET_SYSTEM ResetSystem
Definition: UefiSpec.h:1910
Allocate any available range of pages whose uppermost address is less than or equal to a specified ma...
Definition: UefiSpec.h:40
EFI_STATUS(EFIAPI * EFI_IMAGE_UNLOAD)(IN EFI_HANDLE ImageHandle)
Unloads an image.
Definition: UefiSpec.h:1023
#define EFIAPI
EFI Boot Services Table.
Definition: UefiSpec.h:1930
EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount
Definition: UefiSpec.h:1986
Simple Text Input Ex protocol from the UEFI 2.0 specification.
EFI_STATUS(EFIAPI * EFI_LOCATE_HANDLE_BUFFER)(IN EFI_LOCATE_SEARCH_TYPE SearchType, IN EFI_GUID *Protocol OPTIONAL, IN VOID *SearchKey OPTIONAL, OUT UINTN *NoHandles, OUT EFI_HANDLE **Buffer)
Returns an array of handles that support the requested protocol in a buffer allocated from pool.
Definition: UefiSpec.h:1630
Indicates that the supplied protocol interface is supplied in native form.
Definition: UefiSpec.h:1205
UINT8_t Protocol
Protocol.
Definition: pxe_api.h:64
EFI_STATUS(EFIAPI * EFI_SET_WATCHDOG_TIMER)(IN UINTN Timeout, IN UINT64 WatchdogCode, IN UINTN DataSize, IN CHAR16 *WatchdogData OPTIONAL)
Sets the system's watchdog timer.
Definition: UefiSpec.h:1077
SEGOFF16_t Buffer
Buffer address.
Definition: pxe_api.h:65
This includes some definitions introduced in UEFI that will be used in both PEI and DXE phases.
Simple Text Out protocol from the UEFI 2.0 specification.
EFI_STATUS(EFIAPI * EFI_HANDLE_PROTOCOL)(IN EFI_HANDLE Handle, IN EFI_GUID *Protocol, OUT VOID **Interface)
Queries a handle to determine if it supports a specified protocol.
Definition: UefiSpec.h:1347
EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces
Definition: UefiSpec.h:2010
EFI_CONNECT_CONTROLLER ConnectController
Definition: UefiSpec.h:1993
EFI_GET_TIME GetTime
Definition: UefiSpec.h:1888
UINT32 Revision
Indicates the revision of the EFI_KEY_OPTION structure.
Definition: UefiSpec.h:2201
EFI_STATUS(EFIAPI * EFI_REGISTER_PROTOCOL_NOTIFY)(IN EFI_GUID *Protocol, IN EFI_EVENT Event, OUT VOID **Registration)
Creates an event that is to be signaled whenever an interface is installed for a specified protocol.
Definition: UefiSpec.h:1508
EFI_IMAGE_START StartImage
Definition: UefiSpec.h:1978
EFI_STATUS(EFIAPI * EFI_UPDATE_CAPSULE)(IN EFI_CAPSULE_HEADER **CapsuleHeaderArray, IN UINTN CapsuleCount, IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL)
Passes capsules to the firmware with both virtual and physical mapping.
Definition: UefiSpec.h:1768
UINT64 UINTN
Unsigned value of native width.
EFI System Table.
Definition: UefiSpec.h:2043
EFI_STATUS(EFIAPI * EFI_FREE_POOL)(IN VOID *Buffer)
Returns pool memory to the system.
Definition: UefiSpec.h:314
EFI_VIRTUAL_ADDRESS VirtualStart
Virtual address of the first byte in the memory region.
Definition: UefiSpec.h:173
UINT32 Type
Type of the memory region.
Definition: UefiSpec.h:161
unsigned long Address
Definition: etherboot.h:21
#define VOID
Undeclared type.
Definition: Base.h:271
EFI_HANDLE ConsoleOutHandle
The handle for the active console output device.
Definition: UefiSpec.h:2074
unsigned long long UINT64
Definition: ProcessorBind.h:96
EFI_WAIT_FOR_EVENT WaitForEvent
Definition: UefiSpec.h:1956
EFI_FREE_POOL FreePool
Definition: UefiSpec.h:1949
EFI_HANDLE ControllerHandle
Definition: efi_bofm.c:109
EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation
Definition: UefiSpec.h:2001
EFI Capsule Header.
Definition: UefiSpec.h:1690
EFI Time Abstraction: Year: 1900 - 9999 Month: 1 - 12 Day: 1 - 31 Hour: 0 - 23 Minute: 0 - 59 Second:...
Definition: UefiBaseType.h:70
EFI_STATUS(EFIAPI * EFI_CLOSE_EVENT)(IN EFI_EVENT Event)
Closes an event.
Definition: UefiSpec.h:624
#define IN
Definition: mlx_utils.h:28
EFI Key Option.
Definition: UefiSpec.h:2241
EFI_ALLOCATE_TYPE
Enumeration of EFI memory allocation types.
Definition: UefiSpec.h:31
Simple Text Input protocol from the UEFI 2.0 specification.
EFI_GET_MEMORY_MAP GetMemoryMap
Definition: UefiSpec.h:1947
EFI_ALLOCATE_PAGES AllocatePages
Definition: UefiSpec.h:1945
EFI_STATUS(EFIAPI * EFI_IMAGE_START)(IN EFI_HANDLE ImageHandle, OUT UINTN *ExitDataSize, OUT CHAR16 **ExitData OPTIONAL)
Transfers control to a loaded image's entry point.
Definition: UefiSpec.h:977
EFI_SET_WAKEUP_TIME SetWakeupTime
Definition: UefiSpec.h:1891
EFI_RUNTIME_SERVICES * RuntimeServices
A pointer to the EFI Runtime Services Table.
Definition: UefiSpec.h:2094
UINTN EFI_TPL
Task priority level.
Definition: UefiBaseType.h:43
EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle
Definition: UefiSpec.h:2006
EFI_STATUS(EFIAPI * EFI_SET_VIRTUAL_ADDRESS_MAP)(IN UINTN MemoryMapSize, IN UINTN DescriptorSize, IN UINT32 DescriptorVersion, IN EFI_MEMORY_DESCRIPTOR *VirtualMap)
Changes the runtime addressing mode of EFI firmware from physical to virtual.
Definition: UefiSpec.h:342
#define CONST
Datum is read-only.
Definition: Base.h:261
EFI_STATUS(EFIAPI * EFI_CHECK_EVENT)(IN EFI_EVENT Event)
Checks whether an event is in the signaled state.
Definition: UefiSpec.h:640
EFI_STATUS(EFIAPI * EFI_QUERY_CAPSULE_CAPABILITIES)(IN EFI_CAPSULE_HEADER **CapsuleHeaderArray, IN UINTN CapsuleCount, OUT UINT64 *MaximumCapsuleSize, OUT EFI_RESET_TYPE *ResetType)
Returns if the capsule can be supported via UpdateCapsule().
Definition: UefiSpec.h:1802
EFI_STATUS(EFIAPI * EFI_ALLOCATE_POOL)(IN EFI_MEMORY_TYPE PoolType, IN UINTN Size, OUT VOID **Buffer)
Allocates pool memory.
Definition: UefiSpec.h:297
UINT32 BootOptionCrc
The CRC-32 which should match the CRC-32 of the entire EFI_LOAD_OPTION to which BootOption refers.
Definition: UefiSpec.h:2251
EFI_TIMER_DELAY
Timer delay types.
Definition: UefiSpec.h:539
EFI Capsule Block Descriptor.
Definition: UefiSpec.h:1666
EFI_CHECK_EVENT CheckEvent
Definition: UefiSpec.h:1959
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:31
EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName
Definition: UefiSpec.h:1903
UINT64 Length
Length in bytes of the data pointed to by DataBlock/ContinuationPointer.
Definition: UefiSpec.h:1670
The EFI System Table entry must point to an array of capsules that contain the same CapsuleGuid value...
Definition: UefiSpec.h:1718
UINTN NumberOfTableEntries
The number of system configuration tables in the buffer ConfigurationTable.
Definition: UefiSpec.h:2102
Allocate any available range of pages that satisfies the request.
Definition: UefiSpec.h:35
Contains a set of GUID/pointer pairs comprised of the ConfigurationTable field in the EFI System Tabl...
Definition: UefiSpec.h:2029
EFI_STATUS(EFIAPI * EFI_INSTALL_CONFIGURATION_TABLE)(IN EFI_GUID *Guid, IN VOID *Table)
Adds, updates, or removes a configuration table entry from the EFI System Table.
Definition: UefiSpec.h:1604
Data structure that precedes all of the standard EFI table types.
Retrieve the set of handles from the handle database that support a specified protocol.
Definition: UefiSpec.h:1530
UINT16 BootOption
The Boot#### option which will be invoked if this key is pressed and the boot option is active (LOAD_...
Definition: UefiSpec.h:2256
EFI_OPEN_PROTOCOL OpenProtocol
Definition: UefiSpec.h:1999
EFI_PHYSICAL_ADDRESS ContinuationPointer
Physical address of another block of EFI_CAPSULE_BLOCK_DESCRIPTOR structures.
Definition: UefiSpec.h:1683
UINT64 Attribute
Attributes of the memory region that describe the bit mask of capabilities for that memory region,...
Definition: UefiSpec.h:186
EFI_LOCATE_SEARCH_TYPE
Enumeration of EFI Locate Search Types.
Definition: UefiSpec.h:1517
EFI_INTERFACE_TYPE
Enumeration of EFI Interface Types.
Definition: UefiSpec.h:1201
EFI_STATUS(EFIAPI * EFI_EXIT_BOOT_SERVICES)(IN EFI_HANDLE ImageHandle, IN UINTN MapKey)
Terminates all boot services.
Definition: UefiSpec.h:1039
EFI_UPDATE_CAPSULE UpdateCapsule
Definition: UefiSpec.h:1915
EFI_RESTORE_TPL RestoreTPL
Definition: UefiSpec.h:1940
EFI_STATUS(EFIAPI * EFI_GET_VARIABLE)(IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, OUT UINT32 *Attributes OPTIONAL, IN OUT UINTN *DataSize, OUT VOID *Data OPTIONAL)
Returns the value of a variable.
Definition: UefiSpec.h:708
EFI_STATUS(EFIAPI * EFI_CONVERT_POINTER)(IN UINTN DebugDisposition, IN OUT VOID **Address)
Determines the new virtual address that is to be used on subsequent memory accesses.
Definition: UefiSpec.h:440
UINT32 SysReqPressed
The SysReq key must be pressed (1) or must not be pressed (0).
Definition: UefiSpec.h:2225
UINT32 MenuPressed
The Menu key must be pressed (1) or must not be pressed (0).
Definition: UefiSpec.h:2221
EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap
Definition: UefiSpec.h:1896
EFI_FREE_PAGES FreePages
Definition: UefiSpec.h:1946
EFI_STATUS(EFIAPI * EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES)(IN OUT EFI_HANDLE *Handle,...)
Installs one or more protocol interfaces into the boot services environment.
Definition: UefiSpec.h:1255
UINT32 AltPressed
Either the left or right Alt keys must be pressed (1) or must not be pressed (0).
Definition: UefiSpec.h:2213
VOID(EFIAPI * EFI_RESET_SYSTEM)(IN EFI_RESET_TYPE ResetType, IN EFI_STATUS ResetStatus, IN UINTN DataSize, IN VOID *ResetData OPTIONAL)
Resets the entire platform.
Definition: UefiSpec.h:1101
EFI_CALCULATE_CRC32 CalculateCrc32
Definition: UefiSpec.h:2015
UINT32 LogoPressed
Either the left or right Logo keys must be pressed (1) or must not be pressed (0).
Definition: UefiSpec.h:2217
EFI_STATUS(EFIAPI * EFI_PROTOCOLS_PER_HANDLE)(IN EFI_HANDLE Handle, OUT EFI_GUID ***ProtocolBuffer, OUT UINTN *ProtocolBufferCount)
Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated f...
Definition: UefiSpec.h:1485
UINT32 Accuracy
Provides the timekeeping accuracy of the real-time clock in an error rate of 1E-6 parts per million.
Definition: UefiSpec.h:819
EFI_STATUS(EFIAPI * EFI_CONNECT_CONTROLLER)(IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE *DriverImageHandle OPTIONAL, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL, IN BOOLEAN Recursive)
Connects one or more drivers to a controller.
Definition: UefiSpec.h:376
EFI_STATUS(EFIAPI * EFI_SET_VARIABLE)(IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, IN UINT32 Attributes, IN UINTN DataSize, IN VOID *Data)
Sets the value of a variable.
Definition: UefiSpec.h:793
EFI_STATUS(EFIAPI * EFI_CREATE_EVENT_EX)(IN UINT32 Type, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL, IN CONST VOID *NotifyContext OPTIONAL, IN CONST EFI_GUID *EventGroup OPTIONAL, OUT EFI_EVENT *Event)
Creates an event in a group.
Definition: UefiSpec.h:527
UINT64 EFI_VIRTUAL_ADDRESS
64-bit virtual memory address.
Definition: UefiBaseType.h:57
Definition: efi.h:59
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * StdErr
A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface that is associated with StandardErrorHandl...
Definition: UefiSpec.h:2090
EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer
Definition: UefiSpec.h:2007
EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable
Definition: UefiSpec.h:1972
EFI_LOCATE_DEVICE_PATH LocateDevicePath
Definition: UefiSpec.h:1971
EFI_ALLOCATE_POOL AllocatePool
Definition: UefiSpec.h:1948
EFI_STATUS(EFIAPI * EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES)(IN EFI_HANDLE Handle,...)
Removes one or more protocol interfaces into the boot services environment.
Definition: UefiSpec.h:1325
EFI_CONFIGURATION_TABLE * ConfigurationTable
A pointer to the system configuration tables.
Definition: UefiSpec.h:2107
EFI_STATUS(EFIAPI * EFI_GET_NEXT_MONOTONIC_COUNT)(OUT UINT64 *Count)
Returns a monotonically increasing count for the platform.
Definition: UefiSpec.h:1120
VOID * VendorTable
A pointer to the table associated with VendorGuid.
Definition: UefiSpec.h:2037
This provides the capabilities of the real time clock device as exposed through the EFI interfaces.
Definition: UefiSpec.h:805
EFI_DISCONNECT_CONTROLLER DisconnectController
Definition: UefiSpec.h:1994