2 Include file that supportes UEFI.
4 This include file must only contain things defined in the UEFI 2.0 specification.
5 If a code construct is defined in the UEFI 2.0 specification it must be included
8 Copyright (c) 2006, Intel Corporation
9 All rights reserved. This program and the accompanying materials
10 are licensed and made available under the terms and conditions of the BSD License
11 which accompanies this distribution. The full text of the license may be found at
12 http://opensource.org/licenses/bsd-license.php
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 Module Name: UefiSpec.h
21 #ifndef __UEFI_SPEC_H__
22 #define __UEFI_SPEC_H__
24 #include <Common/MultiPhase.h>
27 // EFI Data Types derived from other EFI data types.
29 #define NULL_HANDLE ((VOID *) 0)
31 typedef VOID
*EFI_EVENT
;
32 typedef UINTN EFI_TPL
;
65 // possible caching types for the memory range
67 #define EFI_MEMORY_UC 0x0000000000000001ULL
68 #define EFI_MEMORY_WC 0x0000000000000002ULL
69 #define EFI_MEMORY_WT 0x0000000000000004ULL
70 #define EFI_MEMORY_WB 0x0000000000000008ULL
71 #define EFI_MEMORY_UCE 0x0000000000000010ULL
74 // physical memory protection on range
76 #define EFI_MEMORY_WP 0x0000000000001000ULL
77 #define EFI_MEMORY_RP 0x0000000000002000ULL
78 #define EFI_MEMORY_XP 0x0000000000004000ULL
81 // range requires a runtime mapping
83 #define EFI_MEMORY_RUNTIME 0x8000000000000000ULL
85 typedef UINT64 EFI_VIRTUAL_ADDRESS
;
87 #define EFI_MEMORY_DESCRIPTOR_VERSION 1
91 EFI_PHYSICAL_ADDRESS PhysicalStart
;
92 EFI_VIRTUAL_ADDRESS VirtualStart
;
95 } EFI_MEMORY_DESCRIPTOR
;
98 // EFI_FIELD_OFFSET - returns the byte offset to a field within a structure
100 #define EFI_FIELD_OFFSET(TYPE,Field) ((UINTN)(&(((TYPE *) 0)->Field)))
102 #include <Protocol/DevicePath.h>
103 #include <Protocol/SimpleTextIn.h>
104 #include <Protocol/SimpleTextOut.h>
107 // Declare forward referenced data structures
109 typedef struct _EFI_SYSTEM_TABLE EFI_SYSTEM_TABLE
;
112 Allocates memory pages from the system.
114 @param Type The type of allocation to perform.
115 @param MemoryType The type of memory to allocate.
116 @param Pages The number of contiguous 4 KB pages to allocate.
117 @param Memory Pointer to a physical address. On input, the way in which the address is
118 used depends on the value of Type.
120 @retval EFI_SUCCESS The requested pages were allocated.
121 @retval EFI_INVALID_PARAMETER 1) Type is not AllocateAnyPages or
122 AllocateMaxAddress or AllocateAddress.
123 2) MemoryType is in the range
124 EfiMaxMemoryType..0x7FFFFFFF.
125 @retval EFI_OUT_OF_RESOURCES The pages could not be allocated.
126 @retval EFI_NOT_FOUND The requested pages could not be found.
131 (EFIAPI
*EFI_ALLOCATE_PAGES
) (
132 IN EFI_ALLOCATE_TYPE Type
,
133 IN EFI_MEMORY_TYPE MemoryType
,
135 IN OUT EFI_PHYSICAL_ADDRESS
*Memory
141 @param Memory The base physical address of the pages to be freed.
142 @param Pages The number of contiguous 4 KB pages to free.
144 @retval EFI_SUCCESS The requested pages were freed.
145 @retval EFI_INVALID_PARAMETER Memory is not a page-aligned address or Pages is invalid.
146 @retval EFI_NOT_FOUND The requested memory pages were not allocated with
152 (EFIAPI
*EFI_FREE_PAGES
) (
153 IN EFI_PHYSICAL_ADDRESS Memory
,
158 Returns the current memory map.
160 @param MemoryMapSize A pointer to the size, in bytes, of the MemoryMap buffer.
161 @param MemoryMap A pointer to the buffer in which firmware places the current memory
163 @param MapKey A pointer to the location in which firmware returns the key for the
165 @param DescriptorSize A pointer to the location in which firmware returns the size, in bytes, of
166 an individual EFI_MEMORY_DESCRIPTOR.
167 @param DescriptorVersion A pointer to the location in which firmware returns the version number
168 associated with the EFI_MEMORY_DESCRIPTOR.
170 @retval EFI_SUCCESS The memory map was returned in the MemoryMap buffer.
171 @retval EFI_BUFFER_TOO_SMALL The MemoryMap buffer was too small. The current buffer size
172 needed to hold the memory map is returned in MemoryMapSize.
173 @retval EFI_INVALID_PARAMETER 1) MemoryMapSize is NULL.
174 2) The MemoryMap buffer is not too small and MemoryMap is
180 (EFIAPI
*EFI_GET_MEMORY_MAP
) (
181 IN OUT UINTN
*MemoryMapSize
,
182 IN OUT EFI_MEMORY_DESCRIPTOR
*MemoryMap
,
184 OUT UINTN
*DescriptorSize
,
185 OUT UINT32
*DescriptorVersion
188 #define NextMemoryDescriptor(_Ptr, _Size) ((EFI_MEMORY_DESCRIPTOR *) (((UINT8 *) (_Ptr)) + (_Size)))
189 #define NEXT_MEMORY_DESCRIPTOR(_Ptr, _Size) NextMemoryDescriptor (_Ptr, _Size)
192 Allocates pool memory.
194 @param PoolType The type of pool to allocate.
195 @param Size The number of bytes to allocate from the pool.
196 @param Buffer A pointer to a pointer to the allocated buffer if the call succeeds;
199 @retval EFI_SUCCESS The requested number of bytes was allocated.
200 @retval EFI_OUT_OF_RESOURCES The pool requested could not be allocated.
201 @retval EFI_INVALID_PARAMETER PoolType was invalid.
206 (EFIAPI
*EFI_ALLOCATE_POOL
) (
207 IN EFI_MEMORY_TYPE PoolType
,
213 Returns pool memory to the system.
215 @param Buffer Pointer to the buffer to free.
217 @retval EFI_SUCCESS The memory was returned to the system.
218 @retval EFI_INVALID_PARAMETER Buffer was invalid.
223 (EFIAPI
*EFI_FREE_POOL
) (
228 Changes the runtime addressing mode of EFI firmware from physical to virtual.
230 @param MemoryMapSize The size in bytes of VirtualMap.
231 @param DescriptorSize The size in bytes of an entry in the VirtualMap.
232 @param DescriptorVersion The version of the structure entries in VirtualMap.
233 @param VirtualMap An array of memory descriptors which contain new virtual
234 address mapping information for all runtime ranges.
236 @retval EFI_SUCCESS The virtual address map has been applied.
237 @retval EFI_UNSUPPORTED EFI firmware is not at runtime, or the EFI firmware is already in
238 virtual address mapped mode.
239 @retval EFI_INVALID_PARAMETER DescriptorSize or DescriptorVersion is invalid.
240 @retval EFI_NO_MAPPING A virtual address was not supplied for a range in the memory
241 map that requires a mapping.
242 @retval EFI_NOT_FOUND A virtual address was supplied for an address that is not found
248 (EFIAPI
*EFI_SET_VIRTUAL_ADDRESS_MAP
) (
249 IN UINTN MemoryMapSize
,
250 IN UINTN DescriptorSize
,
251 IN UINT32 DescriptorVersion
,
252 IN EFI_MEMORY_DESCRIPTOR
*VirtualMap
256 Connects one or more drivers to a controller.
258 @param ControllerHandle The handle of the controller to which driver(s) are to be connected.
259 @param DriverImageHandle A pointer to an ordered list handles that support the
260 EFI_DRIVER_BINDING_PROTOCOL.
261 @param RemainingDevicePath A pointer to the device path that specifies a child of the
262 controller specified by ControllerHandle.
263 @param Recursive If TRUE, then ConnectController() is called recursively
264 until the entire tree of controllers below the controller specified
265 by ControllerHandle have been created. If FALSE, then
266 the tree of controllers is only expanded one level.
268 @retval EFI_SUCCESS 1) One or more drivers were connected to ControllerHandle.
269 2) No drivers were connected to ControllerHandle, but
270 RemainingDevicePath is not NULL, and it is an End Device
272 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
273 @retval EFI_NOT_FOUND 1) There are no EFI_DRIVER_BINDING_PROTOCOL instances
274 present in the system.
275 2) No drivers were connected to ControllerHandle.
280 (EFIAPI
*EFI_CONNECT_CONTROLLER
) (
281 IN EFI_HANDLE ControllerHandle
,
282 IN EFI_HANDLE
*DriverImageHandle
, OPTIONAL
283 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
, OPTIONAL
288 Disconnects one or more drivers from a controller.
290 @param ControllerHandle The handle of the controller from which driver(s) are to be disconnected.
291 @param DriverImageHandle The driver to disconnect from ControllerHandle.
292 @param ChildHandle The handle of the child to destroy.
294 @retval EFI_SUCCESS 1) One or more drivers were disconnected from the controller.
295 2) On entry, no drivers are managing ControllerHandle.
296 3) DriverImageHandle is not NULL, and on entry
297 DriverImageHandle is not managing ControllerHandle.
299 @retval EFI_INVALID_PARAMETER One ore more parameters are invalid.
300 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to disconnect any drivers from
302 @retval EFI_DEVICE_ERROR The controller could not be disconnected because of a device error.
307 (EFIAPI
*EFI_DISCONNECT_CONTROLLER
) (
308 IN EFI_HANDLE ControllerHandle
,
309 IN EFI_HANDLE DriverImageHandle
, OPTIONAL
310 IN EFI_HANDLE ChildHandle OPTIONAL
314 // ConvertPointer DebugDisposition type.
316 #define EFI_OPTIONAL_PTR 0x00000001
317 #define EFI_OPTIONAL_POINTER EFI_OPTIONAL_PTR
320 Determines the new virtual address that is to be used on subsequent memory accesses.
322 @param DebugDisposition Supplies type information for the pointer being converted.
323 @param Address A pointer to a pointer that is to be fixed to be the value needed
324 for the new virtual address mappings being applied.
326 @retval EFI_SUCCESS The pointer pointed to by Address was modified.
327 @retval EFI_INVALID_PARAMETER 1) Address is NULL.
328 2) *Address is NULL and DebugDisposition does
329 not have the EFI_OPTIONAL_PTR bit set.
330 @retval EFI_NOT_FOUND The pointer pointed to by Address was not found to be part
331 of the current memory map. This is normally fatal.
336 (EFIAPI
*EFI_CONVERT_POINTER
) (
337 IN UINTN DebugDisposition
,
338 IN OUT VOID
**Address
342 // EFI Event Types (name defined in spec)
344 #define EVENT_TIMER 0x80000000
345 #define EVENT_RUNTIME 0x40000000
346 #define EVENT_RUNTIME_CONTEXT 0x20000000
348 #define EVENT_NOTIFY_WAIT 0x00000100
349 #define EVENT_NOTIFY_SIGNAL 0x00000200
351 #define EVENT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201
352 #define EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202
354 #if ((EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))
356 // Prior to UEFI 2.0 Tiano extended these enums. This was replaced by
357 // CreateEventEx() Event Groups in UEFI 2.0
359 #define EFI_EVENT_NOTIFY_SIGNAL_ALL 0x00000400
361 #define EFI_EVENT_SIGNAL_READY_TO_BOOT 0x00000203
362 #define EFI_EVENT_SIGNAL_LEGACY_BOOT 0x00000204
367 // EFI Event Types (name following coding style)
369 #define EFI_EVENT_TIMER EVENT_TIMER
370 #define EFI_EVENT_RUNTIME EVENT_RUNTIME
371 #define EFI_EVENT_RUNTIME_CONTEXT EVENT_RUNTIME_CONTEXT
373 #define EFI_EVENT_NOTIFY_WAIT EVENT_NOTIFY_WAIT
374 #define EFI_EVENT_NOTIFY_SIGNAL EVENT_NOTIFY_SIGNAL
376 #define EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES EVENT_SIGNAL_EXIT_BOOT_SERVICES
377 #define EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE
381 Invoke a notification event
383 @param Event Event whose notification function is being invoked.
384 @param Context Pointer to the notification function¡¯s context,
385 which is implementation-dependent.
390 (EFIAPI
*EFI_EVENT_NOTIFY
) (
398 @param Type The type of event to create and its mode and attributes.
399 @param NotifyTpl Pointer to the notification function¡¯s context.
400 @param NotifyFunction Pointer to the event¡¯s notification function, if any.
401 @param NotifyContext Pointer to the notification function¡¯s context; corresponds to parameter
402 Context in the notification function.
403 @param Event Pointer to the newly created event if the call succeeds; undefined
406 @retval EFI_SUCCESS The event structure was created.
407 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
408 @retval EFI_OUT_OF_RESOURCES The event could not be allocated.
413 (EFIAPI
*EFI_CREATE_EVENT
) (
415 IN EFI_TPL NotifyTpl
,
416 IN EFI_EVENT_NOTIFY NotifyFunction
,
417 IN VOID
*NotifyContext
,
422 Creates an event in a group.
424 @param Type The type of event to create and its mode and attributes.
425 @param NotifyTpl Pointer to the notification function¡¯s context.
426 @param NotifyFunction Pointer to the event¡¯s notification function, if any.
427 @param NotifyContext Pointer to the notification function¡¯s context; corresponds to parameter
428 Context in the notification function.
429 @param EventGroup Pointer to the unique identifier of the group to which this event belongs.
430 @param Event Pointer to the newly created event if the call succeeds; undefined
433 @retval EFI_SUCCESS The event structure was created.
434 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
435 @retval EFI_OUT_OF_RESOURCES The event could not be allocated.
440 (EFIAPI
*EFI_CREATE_EVENT_EX
) (
442 IN EFI_TPL NotifyTpl OPTIONAL
,
443 IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL
,
444 IN CONST VOID
*NotifyContext OPTIONAL
,
445 IN CONST EFI_GUID
*EventGroup OPTIONAL
,
456 Sets the type of timer and the trigger time for a timer event.
458 @param Event The timer event that is to be signaled at the specified time.
459 @param Type The type of time that is specified in TriggerTime.
460 @param TriggerTime The number of 100ns units until the timer expires.
462 @retval EFI_SUCCESS The event has been set to be signaled at the requested time.
463 @retval EFI_INVALID_PARAMETER Event or Type is not valid.
468 (EFIAPI
*EFI_SET_TIMER
) (
470 IN EFI_TIMER_DELAY Type
,
471 IN UINT64 TriggerTime
477 @param Event The event to signal.
479 @retval EFI_SUCCESS The event has been signaled.
484 (EFIAPI
*EFI_SIGNAL_EVENT
) (
489 Stops execution until an event is signaled.
491 @param NumberOfEvents The number of events in the Event array.
492 @param Event An array of EFI_EVENT.
493 @param Index Pointer to the index of the event which satisfied the wait condition.
495 @retval EFI_SUCCESS The event indicated by Index was signaled.
496 @retval EFI_INVALID_PARAMETER 1) NumberOfEvents is 0.
497 2) The event indicated by Index is of type
499 @retval EFI_UNSUPPORTED The current TPL is not TPL_APPLICATION.
504 (EFIAPI
*EFI_WAIT_FOR_EVENT
) (
505 IN UINTN NumberOfEvents
,
513 @param Event The event to close.
515 @retval EFI_SUCCESS The event has been closed.
520 (EFIAPI
*EFI_CLOSE_EVENT
) (
525 Checks whether an event is in the signaled state.
527 @param Event The event to check.
529 @retval EFI_SUCCESS The event is in the signaled state.
530 @retval EFI_NOT_READY The event is not in the signaled state.
531 @retval EFI_INVALID_PARAMETER Event is of type EVT_NOTIFY_SIGNAL.
536 (EFIAPI
*EFI_CHECK_EVENT
) (
541 // Task priority level (name defined in spec).
543 #define TPL_APPLICATION 4
544 #define TPL_CALLBACK 8
545 #define TPL_NOTIFY 16
546 #define TPL_HIGH_LEVEL 31
549 // Task priority level (name following coding style).
551 #define EFI_TPL_APPLICATION TPL_APPLICATION
552 #define EFI_TPL_CALLBACK TPL_CALLBACK
553 #define EFI_TPL_NOTIFY TPL_NOTIFY
554 #define EFI_TPL_HIGH_LEVEL TPL_HIGH_LEVEL
557 Raises a task¡¯s priority level and returns its previous level.
559 @param NewTpl The new task priority level.
561 @retval Previous task priority level
566 (EFIAPI
*EFI_RAISE_TPL
) (
571 Restores a task¡¯s priority level to its previous value.
573 @param OldTpl The previous task priority level to restore
578 (EFIAPI
*EFI_RESTORE_TPL
) (
583 // Variable attributes
585 #define EFI_VARIABLE_NON_VOLATILE 0x00000001
586 #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
587 #define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004
590 Returns the value of a variable.
592 @param VariableName A Null-terminated Unicode string that is the name of the
593 vendor¡¯s variable.
594 @param VendorGuid A unique identifier for the vendor.
595 @param Attributes If not NULL, a pointer to the memory location to return the
596 attributes bitmask for the variable.
597 @param DataSize On input, the size in bytes of the return Data buffer.
598 On output the size of data returned in Data.
599 @param Data The buffer to return the contents of the variable.
601 @retval EFI_SUCCESS The function completed successfully.
602 @retval EFI_NOT_FOUND The variable was not found.
603 @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the result.
604 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
605 @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
610 (EFIAPI
*EFI_GET_VARIABLE
) (
611 IN CHAR16
*VariableName
,
612 IN EFI_GUID
*VendorGuid
,
613 OUT UINT32
*Attributes
, OPTIONAL
614 IN OUT UINTN
*DataSize
,
619 Enumerates the current variable names.
621 @param VariableNameSize The size of the VariableName buffer.
622 @param VariableName On input, supplies the last VariableName that was returned
623 by GetNextVariableName(). On output, returns the Nullterminated
624 Unicode string of the current variable.
625 @param VendorGuid On input, supplies the last VendorGuid that was returned by
626 GetNextVariableName(). On output, returns the
627 VendorGuid of the current variable.
629 @retval EFI_SUCCESS The function completed successfully.
630 @retval EFI_NOT_FOUND The next variable was not found.
631 @retval EFI_BUFFER_TOO_SMALL The VariableNameSize is too small for the result.
632 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
633 @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
638 (EFIAPI
*EFI_GET_NEXT_VARIABLE_NAME
) (
639 IN OUT UINTN
*VariableNameSize
,
640 IN OUT CHAR16
*VariableName
,
641 IN OUT EFI_GUID
*VendorGuid
645 Sets the value of a variable.
647 @param VariableName A Null-terminated Unicode string that is the name of the
648 vendor¡¯s variable.
649 @param VendorGuid A unique identifier for the vendor.
650 @param Attributes Attributes bitmask to set for the variable.
651 @param DataSize The size in bytes of the Data buffer.
652 @param Data The contents for the variable.
654 @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as
655 defined by the Attributes.
656 @retval EFI_WRITE_PROTECTED The variable in question is read-only.
657 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.
658 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
659 @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
664 (EFIAPI
*EFI_SET_VARIABLE
) (
665 IN CHAR16
*VariableName
,
666 IN EFI_GUID
*VendorGuid
,
667 IN UINT32 Attributes
,
679 } EFI_TIME_CAPABILITIES
;
682 Returns the current time and date information, and the time-keeping capabilities
683 of the hardware platform.
685 @param Time A pointer to storage to receive a snapshot of the current time.
686 @param Capabilities An optional pointer to a buffer to receive the real time clock
687 device¡¯s capabilities.
689 @retval EFI_SUCCESS The operation completed successfully.
690 @retval EFI_INVALID_PARAMETER Time is NULL.
691 @retval EFI_DEVICE_ERROR The time could not be retrieved due to hardware error.
696 (EFIAPI
*EFI_GET_TIME
) (
698 OUT EFI_TIME_CAPABILITIES
*Capabilities OPTIONAL
702 Sets the current local time and date information.
704 @param Time A pointer to the current time.
706 @retval EFI_SUCCESS The operation completed successfully.
707 @retval EFI_INVALID_PARAMETER A time field is out of range.
708 @retval EFI_DEVICE_ERROR The time could not be set due due to hardware error.
713 (EFIAPI
*EFI_SET_TIME
) (
718 Returns the current wakeup alarm clock setting.
720 @param Enabled Indicates if the alarm is currently enabled or disabled.
721 @param Pending Indicates if the alarm signal is pending and requires acknowledgement.
722 @param Time The current alarm setting.
724 @retval EFI_SUCCESS The alarm settings were returned.
725 @retval EFI_INVALID_PARAMETER Any parameter is NULL.
726 @retval EFI_DEVICE_ERROR The wakeup time could not be retrieved due to a hardware error.
731 (EFIAPI
*EFI_GET_WAKEUP_TIME
) (
732 OUT BOOLEAN
*Enabled
,
733 OUT BOOLEAN
*Pending
,
738 Sets the system wakeup alarm clock time.
740 @param Enabled Enable or disable the wakeup alarm.
741 @param Time If Enable is TRUE, the time to set the wakeup alarm for.
743 @retval EFI_SUCCESS If Enable is TRUE, then the wakeup alarm was enabled. If
744 Enable is FALSE, then the wakeup alarm was disabled.
745 @retval EFI_INVALID_PARAMETER A time field is out of range.
746 @retval EFI_DEVICE_ERROR The wakeup time could not be set due to a hardware error.
747 @retval EFI_UNSUPPORTED A wakeup timer is not supported on this platform.
752 (EFIAPI
*EFI_SET_WAKEUP_TIME
) (
754 IN EFI_TIME
*Time OPTIONAL
758 This is the declaration of an EFI image entry point. This can be the entry point to an application
759 written to this specification, an EFI boot service driver, or an EFI runtime driver.
761 @param ImageHandle Handle that identifies the loaded image.
762 @param SystemTable System Table for this image.
764 @retval EFI_SUCCESS The operation completed successfully.
769 (EFIAPI
*EFI_IMAGE_ENTRY_POINT
) (
770 IN EFI_HANDLE ImageHandle
,
771 IN EFI_SYSTEM_TABLE
*SystemTable
775 Loads an EFI image into memory.
777 @param BootPolicy If TRUE, indicates that the request originates from the boot
778 manager, and that the boot manager is attempting to load
779 FilePath as a boot selection. Ignored if SourceBuffer is
781 @param ParentImageHandle The caller¡¯s image handle.
782 @param FilePath The DeviceHandle specific file path from which the image is
784 @param SourceBuffer If not NULL, a pointer to the memory location containing a copy
785 of the image to be loaded.
786 @param SourceSize The size in bytes of SourceBuffer.
787 @param ImageHandle Pointer to the returned image handle that is created when the
788 image is successfully loaded.
790 @retval EFI_SUCCESS Image was loaded into memory correctly.
791 @retval EFI_NOT_FOUND Both SourceBuffer and FilePath are NULL.
792 @retval EFI_INVALID_PARAMETER One or more parametes are invalid.
793 @retval EFI_UNSUPPORTED The image type is not supported.
794 @retval EFI_OUT_OF_RESOURCES Image was not loaded due to insufficient resources.
795 @retval EFI_LOAD_ERROR Image was not loaded because the image format was corrupt or not
797 @retval EFI_DEVICE_ERROR Image was not loaded because the device returned a read error.
802 (EFIAPI
*EFI_IMAGE_LOAD
) (
803 IN BOOLEAN BootPolicy
,
804 IN EFI_HANDLE ParentImageHandle
,
805 IN EFI_DEVICE_PATH_PROTOCOL
*FilePath
,
806 IN VOID
*SourceBuffer OPTIONAL
,
808 OUT EFI_HANDLE
*ImageHandle
812 Transfers control to a loaded image¡¯s entry point.
814 @param ImageHandle Handle of image to be started.
815 @param ExitDataSize Pointer to the size, in bytes, of ExitData.
816 @param ExitData Pointer to a pointer to a data buffer that includes a Null-terminated
817 Unicode string, optionally followed by additional binary data.
819 @retval EFI_INVALID_PARAMETER ImageHandle is either an invalid image handle or the image
820 has already been initialized with StartImage
821 @retval Exit code from image Exit code from image
826 (EFIAPI
*EFI_IMAGE_START
) (
827 IN EFI_HANDLE ImageHandle
,
828 OUT UINTN
*ExitDataSize
,
829 OUT CHAR16
**ExitData OPTIONAL
833 Terminates a loaded EFI image and returns control to boot services.
835 @param ImageHandle Handle that identifies the image.
836 @param ExitStatus The image¡¯s exit code.
837 @param ExitDataSize The size, in bytes, of ExitData.
838 @param ExitData Pointer to a data buffer that includes a Null-terminated Unicode string,
839 optionally followed by additional binary data.
841 @retval EFI_SUCCESS The image specified by ImageHandle was unloaded.
842 @retval EFI_INVALID_PARAMETER The image specified by ImageHandle has been loaded and
843 started with LoadImage() and StartImage(), but the
844 image is not the currently executing image.
850 IN EFI_HANDLE ImageHandle
,
851 IN EFI_STATUS ExitStatus
,
852 IN UINTN ExitDataSize
,
853 IN CHAR16
*ExitData OPTIONAL
859 @param ImageHandle Handle that identifies the image to be unloaded.
861 @retval EFI_SUCCESS The image has been unloaded.
862 @retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.
863 @retval EFI_UNSUPPORTED The image has been started, and does not support unload.
864 @retval Exit code from the image's unload handler
869 (EFIAPI
*EFI_IMAGE_UNLOAD
) (
870 IN EFI_HANDLE ImageHandle
874 Terminates all boot services.
876 @param ImageHandle Handle that identifies the exiting image.
877 @param MapKey Key to the latest memory map.
879 @retval EFI_SUCCESS Boot services have been terminated.
880 @retval EFI_INVALID_PARAMETER MapKey is incorrect.
885 (EFIAPI
*EFI_EXIT_BOOT_SERVICES
) (
886 IN EFI_HANDLE ImageHandle
,
891 Induces a fine-grained stall.
893 @param Microseconds The number of microseconds to stall execution.
895 @retval EFI_SUCCESS Execution was stalled at least the requested number of
901 (EFIAPI
*EFI_STALL
) (
902 IN UINTN Microseconds
906 Sets the system¡¯s watchdog timer.
908 @param Timeout The number of seconds to set the watchdog timer to.
909 @param WatchdogCode The numeric code to log on a watchdog timer timeout event.
910 @param DataSize The size, in bytes, of WatchdogData.
911 @param WatchdogData A data buffer that includes a Null-terminated Unicode string, optionally
912 followed by additional binary data.
914 @retval EFI_SUCCESS The timeout has been set.
915 @retval EFI_INVALID_PARAMETER The supplied WatchdogCode is invalid.
916 @retval EFI_UNSUPPORTED The system does not have a watchdog timer.
917 @retval EFI_DEVICE_ERROR The watch dog timer could not be programmed due to a hardware
923 (EFIAPI
*EFI_SET_WATCHDOG_TIMER
) (
925 IN UINT64 WatchdogCode
,
927 IN CHAR16
*WatchdogData OPTIONAL
934 #if ((EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))
936 // Tiano extension for capsules that was removed after UEFI 2.0 came out
943 Resets the entire platform.
945 @param ResetType The type of reset to perform.
946 @param ResetStatus The status code for the reset.
947 @param DataSize The size, in bytes, of WatchdogData.
948 @param ResetData For a ResetType of EfiResetCold, EfiResetWarm, or
949 EfiResetShutdown the data buffer starts with a Null-terminated
950 Unicode string, optionally followed by additional binary data.
955 (EFIAPI
*EFI_RESET_SYSTEM
) (
956 IN EFI_RESET_TYPE ResetType
,
957 IN EFI_STATUS ResetStatus
,
959 IN CHAR16
*ResetData OPTIONAL
963 Returns a monotonically increasing count for the platform.
965 @param Count Pointer to returned value.
967 @retval EFI_SUCCESS The next monotonic count was returned.
968 @retval EFI_INVALID_PARAMETER Count is NULL.
969 @retval EFI_DEVICE_ERROR The device is not functioning properly.
974 (EFIAPI
*EFI_GET_NEXT_MONOTONIC_COUNT
) (
979 Returns the next high 32 bits of the platform¡¯s monotonic counter.
981 @param HighCount Pointer to returned value.
983 @retval EFI_SUCCESS The next high monotonic count was returned.
984 @retval EFI_INVALID_PARAMETER HighCount is NULL.
985 @retval EFI_DEVICE_ERROR The device is not functioning properly.
990 (EFIAPI
*EFI_GET_NEXT_HIGH_MONO_COUNT
) (
991 OUT UINT32
*HighCount
995 Computes and returns a 32-bit CRC for a data buffer.
997 @param Data A pointer to the buffer on which the 32-bit CRC is to be computed.
998 @param DataSize The number of bytes in the buffer Data.
999 @param Crc32 The 32-bit CRC that was computed for the data buffer specified by Data
1002 @retval EFI_SUCCESS The 32-bit CRC was computed for the data buffer and returned in
1004 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1009 (EFIAPI
*EFI_CALCULATE_CRC32
) (
1016 Copies the contents of one buffer to another buffer.
1018 @param Destination Pointer to the destination buffer of the memory copy.
1019 @param Source Pointer to the source buffer of the memory copy.
1020 @param Length Number of bytes to copy from Source to Destination.
1025 (EFIAPI
*EFI_COPY_MEM
) (
1026 IN VOID
*Destination
,
1032 The SetMem() function fills a buffer with a specified value.
1034 @param Buffer Pointer to the buffer to fill.
1035 @param Size Number of bytes in Buffer to fill.
1036 @param Value Value to fill Buffer with.
1041 (EFIAPI
*EFI_SET_MEM
) (
1048 // Protocol handler functions
1051 EFI_NATIVE_INTERFACE
1052 } EFI_INTERFACE_TYPE
;
1055 Installs a protocol interface on a device handle. If the handle does not exist, it is created and added
1056 to the list of handles in the system. InstallMultipleProtocolInterfaces() performs
1057 more error checking than InstallProtocolInterface(), so it is recommended that
1058 InstallMultipleProtocolInterfaces() be used in place of
1059 InstallProtocolInterface()
1061 @param Handle A pointer to the EFI_HANDLE on which the interface is to be installed.
1062 @param Protocol The numeric ID of the protocol interface.
1063 @param InterfaceType Indicates whether Interface is supplied in native form.
1064 @param Interface A pointer to the protocol interface.
1066 @retval EFI_SUCCESS The protocol interface was installed.
1067 @retval EFI_OUT_OF_RESOURCES Space for a new handle could not be allocated.
1068 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1073 (EFIAPI
*EFI_INSTALL_PROTOCOL_INTERFACE
) (
1074 IN OUT EFI_HANDLE
*Handle
,
1075 IN EFI_GUID
*Protocol
,
1076 IN EFI_INTERFACE_TYPE InterfaceType
,
1081 Installs one or more protocol interfaces into the boot services environment.
1083 @param Handle The handle to install the new protocol interfaces on, or NULL if a new
1084 handle is to be allocated.
1085 @param ... A variable argument list containing pairs of protocol GUIDs and protocol
1088 @retval EFI_SUCCESS All the protocol interface was installed.
1089 @retval EFI_OUT_OF_RESOURCES There was not enough memory in pool to install all the protocols.
1090 @retval EFI_ALREADY_STARTED A Device Path Protocol instance was passed in that is already present in
1091 the handle database.
1096 (EFIAPI
*EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES
) (
1097 IN OUT EFI_HANDLE
*Handle
,
1102 Reinstalls a protocol interface on a device handle.
1104 @param Handle Handle on which the interface is to be reinstalled.
1105 @param Protocol The numeric ID of the interface.
1106 @param OldInterface A pointer to the old interface. NULL can be used if a structure is not
1107 associated with Protocol.
1108 @param NewInterface A pointer to the new interface.
1110 @retval EFI_SUCCESS The protocol interface was reinstalled.
1111 @retval EFI_NOT_FOUND The OldInterface on the handle was not found.
1112 @retval EFI_ACCESS_DENIED The protocol interface could not be reinstalled,
1113 because OldInterface is still being used by a
1114 driver that will not release it.
1115 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1120 (EFIAPI
*EFI_REINSTALL_PROTOCOL_INTERFACE
) (
1121 IN EFI_HANDLE Handle
,
1122 IN EFI_GUID
*Protocol
,
1123 IN VOID
*OldInterface
,
1124 IN VOID
*NewInterface
1128 Removes a protocol interface from a device handle. It is recommended that
1129 UninstallMultipleProtocolInterfaces() be used in place of
1130 UninstallProtocolInterface().
1132 @param Handle The handle on which the interface was installed.
1133 @param Protocol The numeric ID of the interface.
1134 @param Interface A pointer to the interface.
1136 @retval EFI_SUCCESS The interface was removed.
1137 @retval EFI_NOT_FOUND The interface was not found.
1138 @retval EFI_ACCESS_DENIED The interface was not removed because the interface
1139 is still being used by a driver.
1140 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1145 (EFIAPI
*EFI_UNINSTALL_PROTOCOL_INTERFACE
) (
1146 IN EFI_HANDLE Handle
,
1147 IN EFI_GUID
*Protocol
,
1152 Removes one or more protocol interfaces into the boot services environment.
1154 @param Handle The handle to remove the protocol interfaces from.
1155 @param ... A variable argument list containing pairs of protocol GUIDs and
1156 protocol interfaces.
1158 @retval EFI_SUCCESS All the protocol interfaces were removed.
1159 @retval EFI_INVALID_PARAMETER One of the protocol interfaces was not previously installed on Handle.
1164 (EFIAPI
*EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES
) (
1165 IN EFI_HANDLE Handle
,
1170 Queries a handle to determine if it supports a specified protocol.
1172 @param Handle The handle being queried.
1173 @param Protocol The published unique identifier of the protocol.
1174 @param Interface Supplies the address where a pointer to the corresponding Protocol
1175 Interface is returned.
1176 @retval EFI_SUCCESS The interface information for the specified protocol was returned.
1177 @retval EFI_UNSUPPORTED The device does not support the specified protocol.
1178 @retval EFI_INVALID_PARAMETER One of the protocol interfaces was not previously installed on Handle.
1183 (EFIAPI
*EFI_HANDLE_PROTOCOL
) (
1184 IN EFI_HANDLE Handle
,
1185 IN EFI_GUID
*Protocol
,
1186 OUT VOID
**Interface
1189 #define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001
1190 #define EFI_OPEN_PROTOCOL_GET_PROTOCOL 0x00000002
1191 #define EFI_OPEN_PROTOCOL_TEST_PROTOCOL 0x00000004
1192 #define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008
1193 #define EFI_OPEN_PROTOCOL_BY_DRIVER 0x00000010
1194 #define EFI_OPEN_PROTOCOL_EXCLUSIVE 0x00000020
1197 Queries a handle to determine if it supports a specified protocol. If the protocol is supported by the
1198 handle, it opens the protocol on behalf of the calling agent.
1200 @param Handle The handle for the protocol interface that is being opened.
1201 @param Protocol The published unique identifier of the protocol.
1202 @param Interface Supplies the address where a pointer to the corresponding Protocol
1203 Interface is returned.
1204 @param AgentHandle The handle of the agent that is opening the protocol interface
1205 specified by Protocol and Interface.
1206 @param ControllerHandle If the agent that is opening a protocol is a driver that follows the
1207 UEFI Driver Model, then this parameter is the controller handle
1208 that requires the protocol interface. If the agent does not follow
1209 the UEFI Driver Model, then this parameter is optional and may
1211 @param Attributes The open mode of the protocol interface specified by Handle
1214 @retval EFI_SUCCESS An item was added to the open list for the protocol interface, and the
1215 protocol interface was returned in Interface.
1216 @retval EFI_UNSUPPORTED Handle does not support Protocol.
1217 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1218 @retval EFI_ACCESS_DENIED Required attributes can't be supported in current environment.
1219 @retval EFI_ALREADY_STARTED Item on the open list already has requierd attributes whose agent
1220 handle is the same as AgentHandle.
1225 (EFIAPI
*EFI_OPEN_PROTOCOL
) (
1226 IN EFI_HANDLE Handle
,
1227 IN EFI_GUID
*Protocol
,
1228 OUT VOID
**Interface
,
1229 IN EFI_HANDLE AgentHandle
,
1230 IN EFI_HANDLE ControllerHandle
, OPTIONAL
1231 IN UINT32 Attributes
1236 Closes a protocol on a handle that was opened using OpenProtocol().
1238 @param Handle The handle for the protocol interface that was previously opened
1239 with OpenProtocol(), and is now being closed.
1240 @param Protocol The published unique identifier of the protocol.
1241 @param Interface Supplies the address where a pointer to the corresponding Protocol
1242 Interface is returned.
1243 @param AgentHandle The handle of the agent that is closing the protocol interface.
1244 @param ControllerHandle If the agent that opened a protocol is a driver that follows the
1245 UEFI Driver Model, then this parameter is the controller handle
1246 that required the protocol interface.
1248 @retval EFI_SUCCESS The protocol instance was closed.
1249 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1250 @retval EFI_NOT_FOUND 1) Handle does not support the protocol specified by Protocol.
1251 2) The protocol interface specified by Handle and Protocol is not
1252 currently open by AgentHandle and ControllerHandle.
1257 (EFIAPI
*EFI_CLOSE_PROTOCOL
) (
1258 IN EFI_HANDLE Handle
,
1259 IN EFI_GUID
*Protocol
,
1260 IN EFI_HANDLE AgentHandle
,
1261 IN EFI_HANDLE ControllerHandle
1265 EFI_HANDLE AgentHandle
;
1266 EFI_HANDLE ControllerHandle
;
1269 } EFI_OPEN_PROTOCOL_INFORMATION_ENTRY
;
1272 Retrieves the list of agents that currently have a protocol interface opened.
1274 @param Handle The handle for the protocol interface that is being queried.
1275 @param Protocol The published unique identifier of the protocol.
1276 @param EntryBuffer A pointer to a buffer of open protocol information in the form of
1277 EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.
1278 @param EntryCount A pointer to the number of entries in EntryBuffer.
1280 @retval EFI_SUCCESS The open protocol information was returned in EntryBuffer, and the
1281 number of entries was returned EntryCount.
1282 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to allocate EntryBuffer.
1283 @retval EFI_NOT_FOUND Handle does not support the protocol specified by Protocol.
1288 (EFIAPI
*EFI_OPEN_PROTOCOL_INFORMATION
) (
1289 IN EFI_HANDLE Handle
,
1290 IN EFI_GUID
*Protocol
,
1291 IN EFI_OPEN_PROTOCOL_INFORMATION_ENTRY
**EntryBuffer
,
1292 OUT UINTN
*EntryCount
1296 Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated
1299 @param Handle The handle from which to retrieve the list of protocol interface
1301 @param ProtocolBuffer A pointer to the list of protocol interface GUID pointers that are
1302 installed on Handle.
1303 @param ProtocolBufferCount A pointer to the number of GUID pointers present in
1306 @retval EFI_SUCCESS The list of protocol interface GUIDs installed on Handle was returned in
1307 ProtocolBuffer. The number of protocol interface GUIDs was
1308 returned in ProtocolBufferCount.
1309 @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the results.
1310 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1315 (EFIAPI
*EFI_PROTOCOLS_PER_HANDLE
) (
1316 IN EFI_HANDLE Handle
,
1317 OUT EFI_GUID
***ProtocolBuffer
,
1318 OUT UINTN
*ProtocolBufferCount
1322 Creates an event that is to be signaled whenever an interface is installed for a specified protocol.
1324 @param Protocol The numeric ID of the protocol for which the event is to be registered.
1325 @param Event Event that is to be signaled whenever a protocol interface is registered
1327 @param Registration A pointer to a memory location to receive the registration value.
1329 @retval EFI_SUCCESS The notification event has been registered.
1330 @retval EFI_OUT_OF_RESOURCES Space for the notification event could not be allocated.
1331 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1336 (EFIAPI
*EFI_REGISTER_PROTOCOL_NOTIFY
) (
1337 IN EFI_GUID
*Protocol
,
1339 OUT VOID
**Registration
1346 } EFI_LOCATE_SEARCH_TYPE
;
1349 Returns an array of handles that support a specified protocol.
1351 @param SearchType Specifies which handle(s) are to be returned.
1352 @param Protocol Specifies the protocol to search by.
1353 @param SearchKey Specifies the search key.
1354 @param BufferSize On input, the size in bytes of Buffer. On output, the size in bytes of
1355 the array returned in Buffer (if the buffer was large enough) or the
1356 size, in bytes, of the buffer needed to obtain the array (if the buffer was
1358 @param Buffer The buffer in which the array is returned.
1360 @retval EFI_SUCCESS The array of handles was returned.
1361 @retval EFI_NOT_FOUND No handles match the search.
1362 @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small for the result.
1363 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1368 (EFIAPI
*EFI_LOCATE_HANDLE
) (
1369 IN EFI_LOCATE_SEARCH_TYPE SearchType
,
1370 IN EFI_GUID
*Protocol
, OPTIONAL
1371 IN VOID
*SearchKey
, OPTIONAL
1372 IN OUT UINTN
*BufferSize
,
1373 OUT EFI_HANDLE
*Buffer
1377 Locates the handle to a device on the device path that supports the specified protocol.
1379 @param Protocol Specifies the protocol to search for.
1380 @param DevicePath On input, a pointer to a pointer to the device path. On output, the device
1381 path pointer is modified to point to the remaining part of the device
1383 @param Device A pointer to the returned device handle.
1385 @retval EFI_SUCCESS The resulting handle was returned.
1386 @retval EFI_NOT_FOUND No handles match the search.
1387 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1392 (EFIAPI
*EFI_LOCATE_DEVICE_PATH
) (
1393 IN EFI_GUID
*Protocol
,
1394 IN OUT EFI_DEVICE_PATH_PROTOCOL
**DevicePath
,
1395 OUT EFI_HANDLE
*Device
1399 Adds, updates, or removes a configuration table entry from the EFI System Table.
1401 @param Guid A pointer to the GUID for the entry to add, update, or remove.
1402 @param Table A pointer to the configuration table for the entry to add, update, or
1403 remove. May be NULL.
1405 @retval EFI_SUCCESS The (Guid, Table) pair was added, updated, or removed.
1406 @retval EFI_NOT_FOUND An attempt was made to delete a nonexistent entry.
1407 @retval EFI_INVALID_PARAMETER Guid is not valid.
1408 @retval EFI_OUT_OF_RESOURCES There is not enough memory available to complete the operation.
1413 (EFIAPI
*EFI_INSTALL_CONFIGURATION_TABLE
) (
1421 @retval EFI_SUCCESS The operation has been completed successfully.
1426 (EFIAPI
*EFI_RESERVED_SERVICE
) (
1431 Returns an array of handles that support the requested protocol in a buffer allocated from pool.
1433 @param SearchType Specifies which handle(s) are to be returned.
1434 @param Protocol Specifies the protocol to search by.
1435 @param SearchKey Supplies the search key depending on the SearchType.
1436 @param NoHandles The number of handles returned in Buffer.
1437 @param Buffer A pointer to the buffer to return the requested array of handles that
1440 @retval EFI_SUCCESS The array of handles was returned in Buffer, and the number of
1441 handles in Buffer was returned in NoHandles.
1442 @retval EFI_NOT_FOUND No handles match the search.
1443 @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the matching results.
1444 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1449 (EFIAPI
*EFI_LOCATE_HANDLE_BUFFER
) (
1450 IN EFI_LOCATE_SEARCH_TYPE SearchType
,
1451 IN EFI_GUID
*Protocol
, OPTIONAL
1452 IN VOID
*SearchKey
, OPTIONAL
1453 IN OUT UINTN
*NoHandles
,
1454 OUT EFI_HANDLE
**Buffer
1458 Returns the first protocol instance that matches the given protocol.
1460 @param Protocol Provides the protocol to search for.
1461 @param Registration Optional registration key returned from
1462 RegisterProtocolNotify().
1463 @param Interface On return, a pointer to the first interface that matches Protocol and
1466 @retval EFI_SUCCESS A protocol instance matching Protocol was found and returned in
1468 @retval EFI_NOT_FOUND No protocol instances were found that match Protocol and
1470 @retval EFI_INVALID_PARAMETER Interface is NULL.
1475 (EFIAPI
*EFI_LOCATE_PROTOCOL
) (
1476 IN EFI_GUID
*Protocol
,
1477 IN VOID
*Registration
, OPTIONAL
1478 OUT VOID
**Interface
1484 EFI_PHYSICAL_ADDRESS DataBlock
;
1485 EFI_PHYSICAL_ADDRESS ContinuationPointer
;
1487 } UEFI_CAPSULE_BLOCK_DESCRIPTOR
;
1490 EFI_GUID CapsuleGuid
;
1493 UINT32 CapsuleImageSize
;
1494 } UEFI_CAPSULE_HEADER
;
1496 #define CAPSULE_FLAGS_PERSIST_ACROSS_RESET 0x00010000
1497 #define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE 0x00020000
1500 Passes capsules to the firmware with both virtual and physical mapping. Depending on the intended
1501 consumption, the firmware may process the capsule immediately. If the payload should persist
1502 across a system reset, the reset value returned from EFI_QueryCapsuleCapabilities must
1503 be passed into ResetSystem() and will cause the capsule to be processed by the firmware as
1504 part of the reset process.
1506 @param CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules
1507 being passed into update capsule.
1508 @param CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in
1510 @param ScatterGatherList Physical pointer to a set of
1511 EFI_CAPSULE_BLOCK_DESCRIPTOR that describes the
1512 location in physical memory of a set of capsules.
1514 @retval EFI_SUCCESS Valid capsule was passed. If
1515 CAPSULE_FLAGS_PERSIT_ACROSS_RESET is not set, the
1516 capsule has been successfully processed by the firmware.
1517 @retval EFI_DEVICE_ERROR The capsule update was started, but failed due to a device error.
1518 @retval EFI_INVALID_PARAMETER CapsuleSize is NULL.
1523 (EFIAPI
*EFI_UPDATE_CAPSULE
) (
1524 IN UEFI_CAPSULE_HEADER
**CapsuleHeaderArray
,
1525 IN UINTN CapsuleCount
,
1526 IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL
1530 Returns if the capsule can be supported via UpdateCapsule().
1532 @param CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules
1533 being passed into update capsule.
1534 @param CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in
1536 @param MaxiumCapsuleSize On output the maximum size that UpdateCapsule() can
1537 support as an argument to UpdateCapsule() via
1538 CapsuleHeaderArray and ScatterGatherList.
1539 @param ResetType Returns the type of reset required for the capsule update.
1541 @retval EFI_SUCCESS Valid answer returned.
1542 @retval EFI_UNSUPPORTED The capsule type is not supported on this platform, and
1543 MaximumCapsuleSize and ResetType are undefined.
1544 @retval EFI_INVALID_PARAMETER MaximumCapsuleSize is NULL.
1549 (EFIAPI
*EFI_QUERY_CAPSULE_CAPABILITIES
) (
1550 IN UEFI_CAPSULE_HEADER
**CapsuleHeaderArray
,
1551 IN UINTN CapsuleCount
,
1552 OUT UINT64
*MaximumCapsuleSize
,
1553 OUT EFI_RESET_TYPE
*ResetType
1557 Returns information about the EFI variables.
1559 @param Attributes Attributes bitmask to specify the type of variables on
1560 which to return information.
1561 @param MaximumVariableStorageSize On output the maximum size of the storage space
1562 available for the EFI variables associated with the
1563 attributes specified.
1564 @param RemainingVariableStorageSize Returns the remaining size of the storage space
1565 available for the EFI variables associated with the
1566 attributes specified.
1567 @param MaximumVariableSize Returns the maximum size of the individual EFI
1568 variables associated with the attributes specified.
1570 @retval EFI_SUCCESS Valid answer returned.
1571 @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits was supplied
1572 @retval EFI_UNSUPPORTED The attribute is not supported on this platform, and the
1573 MaximumVariableStorageSize,
1574 RemainingVariableStorageSize, MaximumVariableSize
1580 (EFIAPI
*EFI_QUERY_VARIABLE_INFO
) (
1581 IN UINT32 Attributes
,
1582 OUT UINT64
*MaximumVariableStorageSize
,
1583 OUT UINT64
*RemainingVariableStorageSize
,
1584 OUT UINT64
*MaximumVariableSize
1589 // EFI Runtime Services Table
1591 #define EFI_1_02_SYSTEM_TABLE_REVISION ((1 << 16) | 02)
1592 #define EFI_1_10_SYSTEM_TABLE_REVISION ((1 << 16) | 10)
1593 #define EFI_2_00_SYSTEM_TABLE_REVISION ((2 << 16) | 0)
1595 #define EFI_RUNTIME_SERVICES_SIGNATURE 0x56524553544e5552ULL
1596 #define EFI_RUNTIME_SERVICES_REVISION (EFI_2_00_SYSTEM_TABLE_REVISION)
1598 #if (EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000)
1600 // Include the definition for TIANO_REPORT_STATUS_CODE if this is the version
1601 // of Tiano that extended the EFI specification. If Tiano mode is diabled
1602 // don't include it.
1604 #include <Dxe/ArchProtocol/StatusCode.h>
1609 EFI_TABLE_HEADER Hdr
;
1614 EFI_GET_TIME GetTime
;
1615 EFI_SET_TIME SetTime
;
1616 EFI_GET_WAKEUP_TIME GetWakeupTime
;
1617 EFI_SET_WAKEUP_TIME SetWakeupTime
;
1620 // Virtual memory services
1622 EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap
;
1623 EFI_CONVERT_POINTER ConvertPointer
;
1626 // Variable services
1628 EFI_GET_VARIABLE GetVariable
;
1629 EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName
;
1630 EFI_SET_VARIABLE SetVariable
;
1635 EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount
;
1636 EFI_RESET_SYSTEM ResetSystem
;
1638 #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
1640 // New Boot Services added by UEFI 2.0
1642 EFI_UPDATE_CAPSULE UpdateCapsule
;
1643 EFI_QUERY_CAPSULE_CAPABILITIES QueryCapsuleCapabilities
;
1644 EFI_QUERY_VARIABLE_INFO QueryVariableInfo
;
1645 #elif (EDK_RELEASE_VERSION != 0)
1647 // Tiano extension to EFI 1.10 runtime table
1648 // It was moved to a protocol to not conflict with UEFI 2.0
1649 // If Tiano is disabled this item is not enabled for EFI 1.10
1651 EFI_REPORT_STATUS_CODE ReportStatusCode
;
1653 } EFI_RUNTIME_SERVICES
;
1656 // EFI Boot Services Table
1658 #define EFI_BOOT_SERVICES_SIGNATURE 0x56524553544f4f42ULL
1659 #define EFI_BOOT_SERVICES_REVISION (EFI_2_00_SYSTEM_TABLE_REVISION)
1662 EFI_TABLE_HEADER Hdr
;
1665 // Task priority functions
1667 EFI_RAISE_TPL RaiseTPL
;
1668 EFI_RESTORE_TPL RestoreTPL
;
1673 EFI_ALLOCATE_PAGES AllocatePages
;
1674 EFI_FREE_PAGES FreePages
;
1675 EFI_GET_MEMORY_MAP GetMemoryMap
;
1676 EFI_ALLOCATE_POOL AllocatePool
;
1677 EFI_FREE_POOL FreePool
;
1680 // Event & timer functions
1682 EFI_CREATE_EVENT CreateEvent
;
1683 EFI_SET_TIMER SetTimer
;
1684 EFI_WAIT_FOR_EVENT WaitForEvent
;
1685 EFI_SIGNAL_EVENT SignalEvent
;
1686 EFI_CLOSE_EVENT CloseEvent
;
1687 EFI_CHECK_EVENT CheckEvent
;
1690 // Protocol handler functions
1692 EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface
;
1693 EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface
;
1694 EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface
;
1695 EFI_HANDLE_PROTOCOL HandleProtocol
;
1697 EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify
;
1698 EFI_LOCATE_HANDLE LocateHandle
;
1699 EFI_LOCATE_DEVICE_PATH LocateDevicePath
;
1700 EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable
;
1705 EFI_IMAGE_LOAD LoadImage
;
1706 EFI_IMAGE_START StartImage
;
1708 EFI_IMAGE_UNLOAD UnloadImage
;
1709 EFI_EXIT_BOOT_SERVICES ExitBootServices
;
1714 EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount
;
1716 EFI_SET_WATCHDOG_TIMER SetWatchdogTimer
;
1719 // ////////////////////////////////////////////////////
1721 //////////////////////////////////////////////////////
1723 // DriverSupport Services
1725 EFI_CONNECT_CONTROLLER ConnectController
;
1726 EFI_DISCONNECT_CONTROLLER DisconnectController
;
1729 // Added Open and Close protocol for the new driver model
1731 EFI_OPEN_PROTOCOL OpenProtocol
;
1732 EFI_CLOSE_PROTOCOL CloseProtocol
;
1733 EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation
;
1736 // Added new services to EFI 1.1 as Lib to reduce code size.
1738 EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle
;
1739 EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer
;
1740 EFI_LOCATE_PROTOCOL LocateProtocol
;
1742 EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces
;
1743 EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces
;
1748 EFI_CALCULATE_CRC32 CalculateCrc32
;
1751 // Memory Utility Services
1753 EFI_COPY_MEM CopyMem
;
1756 #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
1758 // UEFI 2.0 Extension to the table
1760 EFI_CREATE_EVENT_EX CreateEventEx
;
1762 } EFI_BOOT_SERVICES
;
1765 // EFI Configuration Table
1768 EFI_GUID VendorGuid
;
1770 } EFI_CONFIGURATION_TABLE
;
1775 #define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249ULL
1776 #define EFI_SYSTEM_TABLE_REVISION (EFI_2_00_SYSTEM_TABLE_REVISION)
1778 struct _EFI_SYSTEM_TABLE
{
1779 EFI_TABLE_HEADER Hdr
;
1781 CHAR16
*FirmwareVendor
;
1782 UINT32 FirmwareRevision
;
1784 EFI_HANDLE ConsoleInHandle
;
1785 EFI_SIMPLE_TEXT_IN_PROTOCOL
*ConIn
;
1787 EFI_HANDLE ConsoleOutHandle
;
1788 EFI_SIMPLE_TEXT_OUT_PROTOCOL
*ConOut
;
1790 EFI_HANDLE StandardErrorHandle
;
1791 EFI_SIMPLE_TEXT_OUT_PROTOCOL
*StdErr
;
1793 EFI_RUNTIME_SERVICES
*RuntimeServices
;
1794 EFI_BOOT_SERVICES
*BootServices
;
1796 UINTN NumberOfTableEntries
;
1797 EFI_CONFIGURATION_TABLE
*ConfigurationTable
;
1802 // Device Path information
1808 // Hardware Device Paths
1810 #define HARDWARE_DEVICE_PATH 0x01
1812 #define HW_PCI_DP 0x01
1814 EFI_DEVICE_PATH_PROTOCOL Header
;
1819 #define HW_PCCARD_DP 0x02
1821 EFI_DEVICE_PATH_PROTOCOL Header
;
1822 UINT8 FunctionNumber
;
1823 } PCCARD_DEVICE_PATH
;
1825 #define HW_MEMMAP_DP 0x03
1827 EFI_DEVICE_PATH_PROTOCOL Header
;
1829 EFI_PHYSICAL_ADDRESS StartingAddress
;
1830 EFI_PHYSICAL_ADDRESS EndingAddress
;
1831 } MEMMAP_DEVICE_PATH
;
1833 #define HW_VENDOR_DP 0x04
1835 EFI_DEVICE_PATH_PROTOCOL Header
;
1837 } VENDOR_DEVICE_PATH
;
1839 #define HW_CONTROLLER_DP 0x05
1841 EFI_DEVICE_PATH_PROTOCOL Header
;
1842 #if EDK_RELEASE_VERSION >= 0x00020000
1843 UINT32 ControllerNumber
;
1847 } CONTROLLER_DEVICE_PATH
;
1850 // ACPI Device Paths
1852 #define ACPI_DEVICE_PATH 0x02
1854 #define ACPI_DP 0x01
1856 EFI_DEVICE_PATH_PROTOCOL Header
;
1859 } ACPI_HID_DEVICE_PATH
;
1861 #define ACPI_EXTENDED_DP 0x02
1863 EFI_DEVICE_PATH_PROTOCOL Header
;
1868 // Optional variable length _HIDSTR
1869 // Optional variable length _UIDSTR
1871 } ACPI_EXTENDED_HID_DEVICE_PATH
;
1875 // EISA ID Definition 32-bits
1876 // bits[15:0] - three character compressed ASCII EISA ID.
1877 // bits[31:16] - binary number
1878 // Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'
1880 #define PNP_EISA_ID_CONST 0x41d0
1881 #define EISA_ID(_Name, _Num) ((UINT32) ((_Name) | (_Num) << 16))
1882 #define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
1883 #define EFI_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
1885 #define PNP_EISA_ID_MASK 0xffff
1886 #define EISA_ID_TO_NUM(_Id) ((_Id) >> 16)
1889 #define ACPI_ADR_DP 0x03
1891 EFI_DEVICE_PATH_PROTOCOL Header
;
1893 } ACPI_ADR_DEVICE_PATH
;
1897 // Messaging Device Paths
1899 #define MESSAGING_DEVICE_PATH 0x03
1901 #define MSG_ATAPI_DP 0x01
1903 EFI_DEVICE_PATH_PROTOCOL Header
;
1904 UINT8 PrimarySecondary
;
1907 } ATAPI_DEVICE_PATH
;
1909 #define MSG_SCSI_DP 0x02
1911 EFI_DEVICE_PATH_PROTOCOL Header
;
1916 #define MSG_FIBRECHANNEL_DP 0x03
1918 EFI_DEVICE_PATH_PROTOCOL Header
;
1922 } FIBRECHANNEL_DEVICE_PATH
;
1924 #define MSG_1394_DP 0x04
1926 EFI_DEVICE_PATH_PROTOCOL Header
;
1929 } F1394_DEVICE_PATH
;
1931 #define MSG_USB_DP 0x05
1933 EFI_DEVICE_PATH_PROTOCOL Header
;
1934 UINT8 ParentPortNumber
;
1935 UINT8 InterfaceNumber
;
1938 #define MSG_USB_CLASS_DP 0x0f
1940 EFI_DEVICE_PATH_PROTOCOL Header
;
1944 UINT8 DeviceSubClass
;
1945 UINT8 DeviceProtocol
;
1946 } USB_CLASS_DEVICE_PATH
;
1948 #define MSG_USB_WWID_DP 0x10
1950 EFI_DEVICE_PATH_PROTOCOL Header
;
1951 UINT16 InterfaceNumber
;
1954 // CHAR16 SerialNumber[];
1955 } USB_WWID_DEVICE_PATH
;
1957 #define MSG_DEVICE_LOGICAL_UNIT_DP 0x11
1959 EFI_DEVICE_PATH_PROTOCOL Header
;
1961 } DEVICE_LOGICAL_UNIT_DEVICE_PATH
;
1963 #define MSG_I2O_DP 0x06
1965 EFI_DEVICE_PATH_PROTOCOL Header
;
1969 #define MSG_MAC_ADDR_DP 0x0b
1971 EFI_DEVICE_PATH_PROTOCOL Header
;
1972 EFI_MAC_ADDRESS MacAddress
;
1974 } MAC_ADDR_DEVICE_PATH
;
1976 #define MSG_IPv4_DP 0x0c
1978 EFI_DEVICE_PATH_PROTOCOL Header
;
1979 EFI_IPv4_ADDRESS LocalIpAddress
;
1980 EFI_IPv4_ADDRESS RemoteIpAddress
;
1984 BOOLEAN StaticIpAddress
;
1987 #define MSG_IPv6_DP 0x0d
1989 EFI_DEVICE_PATH_PROTOCOL Header
;
1990 EFI_IPv6_ADDRESS LocalIpAddress
;
1991 EFI_IPv6_ADDRESS RemoteIpAddress
;
1995 BOOLEAN StaticIpAddress
;
1998 #define MSG_INFINIBAND_DP 0x09
2000 EFI_DEVICE_PATH_PROTOCOL Header
;
2001 UINT32 ResourceFlags
;
2004 UINT64 TargetPortId
;
2006 } INFINIBAND_DEVICE_PATH
;
2008 #define INFINIBAND_RESOURCE_FLAG_IOC_SERVICE 0x01
2009 #define INFINIBAND_RESOURCE_FLAG_EXTENDED_BOOT_ENVIRONMENT 0x02
2010 #define INFINIBAND_RESOURCE_FLAG_CONSOLE_PROTOCOL 0x04
2011 #define INFINIBAND_RESOURCE_FLAG_STORAGE_PROTOCOL 0x08
2012 #define INFINIBAND_RESOURCE_FLAG_NETWORK_PROTOCOL 0x10
2014 #define MSG_UART_DP 0x0e
2016 EFI_DEVICE_PATH_PROTOCOL Header
;
2025 // Use VENDOR_DEVICE_PATH struct
2027 #define MSG_VENDOR_DP 0x0a
2029 #define DEVICE_PATH_MESSAGING_PC_ANSI EFI_PC_ANSI_GUID
2030 #define DEVICE_PATH_MESSAGING_VT_100 EFI_VT_100_GUID
2031 #define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID
2032 #define DEVICE_PATH_MESSAGING_VT_UTF8 EFI_VT_UTF8_GUID
2033 #define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID
2036 #define MSG_ISCSI_DP 0x13
2038 EFI_DEVICE_PATH_PROTOCOL Header
;
2039 UINT16 NetworkProtocol
;
2042 UINT16 TargetPortalGroupTag
;
2044 // CHAR8 iSCSI Target Name
2045 } ISCSI_DEVICE_PATH
;
2047 #define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST 0x0000
2048 #define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C 0x0002
2049 #define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST 0x0000
2050 #define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C 0x0008
2051 #define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP 0x0000
2052 #define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON 0x1000
2053 #define ISCSI_LOGIN_OPTION_CHAP_BI 0x0000
2054 #define ISCSI_LOGIN_OPTION_CHAP_UNI 0x2000
2058 // Media Device Path
2060 #define MEDIA_DEVICE_PATH 0x04
2062 #define MEDIA_HARDDRIVE_DP 0x01
2064 EFI_DEVICE_PATH_PROTOCOL Header
;
2065 UINT32 PartitionNumber
;
2066 UINT64 PartitionStart
;
2067 UINT64 PartitionSize
;
2068 UINT8 Signature
[16];
2070 UINT8 SignatureType
;
2071 } HARDDRIVE_DEVICE_PATH
;
2073 #define MBR_TYPE_PCAT 0x01
2074 #define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02
2076 #define SIGNATURE_TYPE_MBR 0x01
2077 #define SIGNATURE_TYPE_GUID 0x02
2079 #define MEDIA_CDROM_DP 0x02
2081 EFI_DEVICE_PATH_PROTOCOL Header
;
2083 UINT64 PartitionStart
;
2084 UINT64 PartitionSize
;
2085 } CDROM_DEVICE_PATH
;
2088 // Use VENDOR_DEVICE_PATH struct
2090 #define MEDIA_VENDOR_DP 0x03
2092 #define MEDIA_FILEPATH_DP 0x04
2094 EFI_DEVICE_PATH_PROTOCOL Header
;
2096 } FILEPATH_DEVICE_PATH
;
2098 #define SIZE_OF_FILEPATH_DEVICE_PATH EFI_FIELD_OFFSET(FILEPATH_DEVICE_PATH,PathName)
2100 #define MEDIA_PROTOCOL_DP 0x05
2102 EFI_DEVICE_PATH_PROTOCOL Header
;
2104 } MEDIA_PROTOCOL_DEVICE_PATH
;
2106 #if ((EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))
2108 // Prior to UEFI 2.0 Tiano extended this enum. UEFI owns device path values
2109 // and we moved to a new GUID'ed device path for Tiano
2112 #define MEDIA_FV_FILEPATH_DP 0x06
2114 EFI_DEVICE_PATH_PROTOCOL Header
;
2116 } MEDIA_FW_VOL_FILEPATH_DEVICE_PATH
;
2121 EFI_DEVICE_PATH_PROTOCOL Header
;
2122 EFI_GUID PiwgSpecificDevicePath
;
2126 #define PIWG_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH_TYPE 0x01
2128 PIWG_DEVICE_PATH Piwg
;
2130 } MEDIA_FW_VOL_FILEPATH_DEVICE_PATH
;
2133 // Place holder for a future extension
2135 #define PIWG_MEDIAFW_VOL_DEVICE_PATH_TYPE 0x02
2137 PIWG_DEVICE_PATH Piwg
;
2138 EFI_GUID VolumeGuid
;
2139 } MEDIA_FW_VOL_DEVICE_PATH
;
2147 #define BBS_DEVICE_PATH 0x05
2148 #define BBS_BBS_DP 0x01
2150 EFI_DEVICE_PATH_PROTOCOL Header
;
2154 } BBS_BBS_DEVICE_PATH
;
2157 // DeviceType definitions - from BBS specification
2159 #define BBS_TYPE_FLOPPY 0x01
2160 #define BBS_TYPE_HARDDRIVE 0x02
2161 #define BBS_TYPE_CDROM 0x03
2162 #define BBS_TYPE_PCMCIA 0x04
2163 #define BBS_TYPE_USB 0x05
2164 #define BBS_TYPE_EMBEDDED_NETWORK 0x06
2165 #define BBS_TYPE_BEV 0x80
2166 #define BBS_TYPE_UNKNOWN 0xFF
2170 // Union of all possible Device Paths and pointers to Device Paths
2174 EFI_DEVICE_PATH_PROTOCOL DevPath
;
2175 PCI_DEVICE_PATH Pci
;
2176 PCCARD_DEVICE_PATH PcCard
;
2177 MEMMAP_DEVICE_PATH MemMap
;
2178 VENDOR_DEVICE_PATH Vendor
;
2180 CONTROLLER_DEVICE_PATH Controller
;
2181 ACPI_HID_DEVICE_PATH Acpi
;
2183 ATAPI_DEVICE_PATH Atapi
;
2184 SCSI_DEVICE_PATH Scsi
;
2185 FIBRECHANNEL_DEVICE_PATH FibreChannel
;
2187 F1394_DEVICE_PATH F1394
;
2188 USB_DEVICE_PATH Usb
;
2189 USB_CLASS_DEVICE_PATH UsbClass
;
2190 I2O_DEVICE_PATH I2O
;
2191 MAC_ADDR_DEVICE_PATH MacAddr
;
2192 IPv4_DEVICE_PATH Ipv4
;
2193 IPv6_DEVICE_PATH Ipv6
;
2194 INFINIBAND_DEVICE_PATH InfiniBand
;
2195 UART_DEVICE_PATH Uart
;
2197 HARDDRIVE_DEVICE_PATH HardDrive
;
2198 CDROM_DEVICE_PATH CD
;
2200 FILEPATH_DEVICE_PATH FilePath
;
2201 MEDIA_PROTOCOL_DEVICE_PATH MediaProtocol
;
2203 BBS_BBS_DEVICE_PATH Bbs
;
2209 EFI_DEVICE_PATH_PROTOCOL
*DevPath
;
2210 PCI_DEVICE_PATH
*Pci
;
2211 PCCARD_DEVICE_PATH
*PcCard
;
2212 MEMMAP_DEVICE_PATH
*MemMap
;
2213 VENDOR_DEVICE_PATH
*Vendor
;
2215 CONTROLLER_DEVICE_PATH
*Controller
;
2216 ACPI_HID_DEVICE_PATH
*Acpi
;
2217 ACPI_EXTENDED_HID_DEVICE_PATH
*ExtendedAcpi
;
2219 ATAPI_DEVICE_PATH
*Atapi
;
2220 SCSI_DEVICE_PATH
*Scsi
;
2221 FIBRECHANNEL_DEVICE_PATH
*FibreChannel
;
2223 F1394_DEVICE_PATH
*F1394
;
2224 USB_DEVICE_PATH
*Usb
;
2225 USB_CLASS_DEVICE_PATH
*UsbClass
;
2226 I2O_DEVICE_PATH
*I2O
;
2227 MAC_ADDR_DEVICE_PATH
*MacAddr
;
2228 IPv4_DEVICE_PATH
*Ipv4
;
2229 IPv6_DEVICE_PATH
*Ipv6
;
2230 INFINIBAND_DEVICE_PATH
*InfiniBand
;
2231 UART_DEVICE_PATH
*Uart
;
2233 HARDDRIVE_DEVICE_PATH
*HardDrive
;
2234 CDROM_DEVICE_PATH
*CD
;
2236 FILEPATH_DEVICE_PATH
*FilePath
;
2237 MEDIA_PROTOCOL_DEVICE_PATH
*MediaProtocol
;
2239 BBS_BBS_DEVICE_PATH
*Bbs
;
2251 // Packet definitions
2256 UINT8 BootpHwAddrLen
;
2257 UINT8 BootpGateHops
;
2259 UINT16 BootpSeconds
;
2261 UINT8 BootpCiAddr
[4];
2262 UINT8 BootpYiAddr
[4];
2263 UINT8 BootpSiAddr
[4];
2264 UINT8 BootpGiAddr
[4];
2265 UINT8 BootpHwAddr
[16];
2266 UINT8 BootpSrvName
[64];
2267 UINT8 BootpBootFile
[128];
2269 UINT8 DhcpOptions
[56];
2270 } EFI_PXE_BASE_CODE_DHCPV4_PACKET
;
2274 EFI_PXE_BASE_CODE_DHCPV4_PACKET Dhcpv4
;
2277 // EFI_PXE_BASE_CODE_DHCPV6_PACKET Dhcpv6;
2279 } EFI_PXE_BASE_CODE_PACKET
;
2281 #include <Uefi/EfiPxe.h>
2284 // EFI Revision information
2286 #define EFI_FIRMWARE_REVISION (EFI_2_00_SYSTEM_TABLE_REVISION)
2288 #include <Common/EfiImage.h>
2289 #include <IndustryStandard/Usb.h>
2292 #define EFI_USB_HC_RESET_GLOBAL 0x0001
2293 #define EFI_USB_HC_RESET_HOST_CONTROLLER 0x0002
2294 #define EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG 0x0004
2295 #define EFI_USB_HC_RESET_HOST_WITH_DEBUG 0x0008
2298 // USB Host Controller state
2302 EfiUsbHcStateOperational
,
2303 EfiUsbHcStateSuspend
,
2304 EfiUsbHcStateMaximum
2309 // EFI File location to boot from on removable media devices
2311 #define EFI_REMOVABLE_MEDIA_FILE_NAME_IA32 L"\\EFI\\BOOT\\BOOTIA32.EFI"
2312 #define EFI_REMOVABLE_MEDIA_FILE_NAME_IA64 L"\\EFI\\BOOT\\BOOTIA64.EFI"
2313 #define EFI_REMOVABLE_MEDIA_FILE_NAME_X64 L"\\EFI\\BOOT\\BOOTX64.EFI"
2314 #define EFI_REMOVABLE_MEDIA_FILE_NAME_EBC L"\\EFI\\BOOT\\BOOTEBC.EFI"
2316 #if defined (MDE_CPU_IA32)
2317 #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_IA32
2318 #elif defined (MDE_CPU_IPF)
2319 #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_IA64
2320 #elif defined (MDE_CPU_X64)
2321 #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_X64
2322 #elif defined (MDE_CPU_EBC)
2323 #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_EBC
2325 #error Unknown Processor Type
2330 // Protocols from EFI 1.10 that got thier names fixed in UEFI 2.0
2332 #include <Protocol/LoadedImage.h>
2333 #include <Protocol/SimpleTextIn.h>
2334 #include <Protocol/SimpleTextOut.h>
2335 #include <Protocol/SerialIo.h>
2336 #include <Protocol/LoadFile.h>
2337 #include <Protocol/SimpleFileSystem.h>
2338 #include <Protocol/DiskIo.h>
2339 #include <Protocol/BlockIo.h>
2340 #include <Protocol/UnicodeCollation.h>
2341 #include <Protocol/SimpleNetwork.h>
2342 #include <Protocol/EfiNetworkInterfaceIdentifier.h>
2343 #include <Protocol/PxeBaseCode.h>
2344 #include <Protocol/PxeBaseCodeCallBack.h>
2347 // EFI 1.10 Protocols
2349 #include <Protocol/Bis.h>
2350 #include <Protocol/BusSpecificDriverOverride.h>
2351 #include <Protocol/ComponentName.h>
2352 #include <Protocol/DebugPort.h>
2353 #include <Protocol/DebugSupport.h>
2354 #include <Protocol/Decompress.h>
2355 #include <Protocol/DriverBinding.h>
2356 #include <Protocol/DriverConfiguration.h>
2357 #include <Protocol/DriverDiagnostics.h>
2358 #include <Protocol/Ebc.h>
2359 #include <Protocol/EfiNetworkInterfaceIdentifier.h>
2360 #include <Protocol/FileInfo.h>
2361 #include <Protocol/FileSystemInfo.h>
2362 #include <Protocol/FileSystemVolumeLabelInfo.h>
2363 #include <Protocol/PciIo.h>
2364 #include <Protocol/PciRootBridgeIo.h>
2365 #include <Protocol/PlatformDriverOverride.h>
2366 #include <Protocol/SimplePointer.h>
2367 #include <Protocol/ScsiPassThru.h>
2368 #include <Protocol/UsbIo.h>
2369 #include <Protocol/UsbHostController.h>
2370 #include <Protocol/UgaDraw.h>
2375 #include <Guid/Acpi.h>
2376 #include <Guid/DebugImageInfoTable.h>
2377 #include <Guid/GlobalVariable.h>
2378 #include <Guid/Gpt.h>
2379 #include <Guid/PcAnsi.h>
2380 #include <Guid/SmBios.h>
2381 #include <Guid/SalSystemTable.h>
2384 #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
2386 // Turn on UEFI 2.0 Protocols and GUIDs
2388 #include <Protocol/AuthenticationInfo.h>
2389 #include <Protocol/DevicePathUtilities.h>
2390 #include <Protocol/DevicePathToText.h>
2391 #include <Protocol/DevicePathFromText.h>
2392 #include <Protocol/GraphicsOutput.h>
2393 #include <Protocol/EdidDiscovered.h>
2394 #include <Protocol/EdidActive.h>
2395 #include <Protocol/EdidOverride.h>
2396 #include <Protocol/ScsiIoExt.h>
2397 #include <Protocol/ScsiPassThruExt.h>
2398 #include <Protocol/IScsiInitatorName.h>
2399 #include <Protocol/Usb2HostController.h>
2400 #include <Protocol/TapeIo.h>
2401 #include <Protocol/ManagedNetwork.h>
2402 #include <Protocol/Arp.h>
2403 #include <Protocol/Dhcp4.h>
2404 #include <Protocol/IP4.h>
2405 #include <Protocol/IP4Config.h>
2406 #include <Protocol/Tcp4.h>
2407 #include <Protocol/Udp4.h>
2408 #include <Protocol/Mtftp4.h>
2409 #include <Protocol/ServiceBinding.h>
2410 #include <Protocol/Hash.h>
2412 #include <Guid/EventGroup.h>