]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Uefi/UefiSpec.h
MdePkg/ProcessorBind: add defines for page allocation granularity
[mirror_edk2.git] / MdePkg / Include / Uefi / UefiSpec.h
index 159d3b9e71fa2f2e771114158783820ad8201fa4..57cb4e804f703e7e21c1cf6ca1b23b3aa65386ab 100644 (file)
 /** @file\r
-  Include file that supportes UEFI.\r
-  \r
-  This include file must only contain things defined in the UEFI 2.0 specification.\r
-  If a code construct is defined in the UEFI 2.0 specification it must be included\r
+  Include file that supports UEFI.\r
+\r
+  This include file must contain things defined in the UEFI 2.6 specification.\r
+  If a code construct is defined in the UEFI 2.6 specification it must be included\r
   by this include file.\r
-  \r
-  Copyright (c) 2006, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-  \r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-  \r
-  Module Name:    UefiSpec.h\r
-  \r
+\r
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under \r
+the terms and conditions of the BSD License that accompanies this distribution.  \r
+The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php.                                          \r
+    \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
 **/\r
 \r
 #ifndef __UEFI_SPEC_H__\r
 #define __UEFI_SPEC_H__\r
 \r
-#include <Common/MultiPhase.h>\r
-\r
-//\r
-// EFI Data Types derived from other EFI data types.\r
-//\r
-#define NULL_HANDLE ((VOID *) 0)\r
-\r
-typedef VOID  *EFI_EVENT;\r
-typedef UINTN EFI_TPL;\r
-\r
-//\r
-// Networking\r
-//\r
-typedef struct {\r
-  UINT8 Addr[4];\r
-} EFI_IPv4_ADDRESS;\r
-\r
-typedef struct {\r
-  UINT8 Addr[16];\r
-} EFI_IPv6_ADDRESS;\r
-\r
-typedef struct {\r
-  UINT8 Addr[32];\r
-} EFI_MAC_ADDRESS;\r
-\r
-typedef union {\r
-  UINT32            Addr[4];\r
-  EFI_IPv4_ADDRESS  v4;\r
-  EFI_IPv6_ADDRESS  v6;\r
-} EFI_IP_ADDRESS;\r
+#include <Uefi/UefiMultiPhase.h>\r
 \r
+#include <Protocol/DevicePath.h>\r
+#include <Protocol/SimpleTextIn.h>\r
+#include <Protocol/SimpleTextInEx.h>\r
+#include <Protocol/SimpleTextOut.h>\r
 \r
+///\r
+/// Enumeration of EFI memory allocation types.\r
+///\r
 typedef enum {\r
+  ///\r
+  /// Allocate any available range of pages that satisfies the request.\r
+  ///\r
   AllocateAnyPages,\r
+  ///\r
+  /// Allocate any available range of pages whose uppermost address is less than \r
+  /// or equal to a specified maximum address.\r
+  ///\r
   AllocateMaxAddress,\r
+  ///\r
+  /// Allocate pages at a specified address.\r
+  ///\r
   AllocateAddress,\r
+  ///\r
+  /// Maximum enumeration value that may be used for bounds checking.\r
+  ///\r
   MaxAllocateType\r
 } EFI_ALLOCATE_TYPE;\r
 \r
-\r
 //\r
-// possible caching types for the memory range\r
+// Bit definitions for EFI_TIME.Daylight\r
 //\r
-#define EFI_MEMORY_UC   0x0000000000000001ULL\r
-#define EFI_MEMORY_WC   0x0000000000000002ULL\r
-#define EFI_MEMORY_WT   0x0000000000000004ULL\r
-#define EFI_MEMORY_WB   0x0000000000000008ULL\r
-#define EFI_MEMORY_UCE  0x0000000000000010ULL\r
+#define EFI_TIME_ADJUST_DAYLIGHT  0x01\r
+#define EFI_TIME_IN_DAYLIGHT      0x02\r
+\r
+///\r
+/// Value definition for EFI_TIME.TimeZone.\r
+///\r
+#define EFI_UNSPECIFIED_TIMEZONE  0x07FF\r
 \r
 //\r
-// physical memory protection on range\r
+// Memory cacheability attributes\r
 //\r
-#define EFI_MEMORY_WP 0x0000000000001000ULL\r
-#define EFI_MEMORY_RP 0x0000000000002000ULL\r
-#define EFI_MEMORY_XP 0x0000000000004000ULL\r
-\r
+#define EFI_MEMORY_UC               0x0000000000000001ULL\r
+#define EFI_MEMORY_WC               0x0000000000000002ULL\r
+#define EFI_MEMORY_WT               0x0000000000000004ULL\r
+#define EFI_MEMORY_WB               0x0000000000000008ULL\r
+#define EFI_MEMORY_UCE              0x0000000000000010ULL\r
 //\r
-// range requires a runtime mapping\r
+// Physical memory protection attributes\r
 //\r
-#define EFI_MEMORY_RUNTIME  0x8000000000000000ULL\r
-\r
-typedef UINT64  EFI_VIRTUAL_ADDRESS;\r
+// Note: UEFI spec 2.5 and following: use EFI_MEMORY_RO as write-protected physical memory\r
+// protection attribute. Also, EFI_MEMORY_WP means cacheability attribute.\r
+//\r
+#define EFI_MEMORY_WP               0x0000000000001000ULL\r
+#define EFI_MEMORY_RP               0x0000000000002000ULL\r
+#define EFI_MEMORY_XP               0x0000000000004000ULL\r
+#define EFI_MEMORY_RO               0x0000000000020000ULL\r
+//\r
+// Physical memory persistence attribute. \r
+// The memory region supports byte-addressable non-volatility.\r
+//\r
+#define EFI_MEMORY_NV               0x0000000000008000ULL\r
+//\r
+// The memory region provides higher reliability relative to other memory in the system.\r
+// If all memory has the same reliability, then this bit is not used.\r
+//\r
+#define EFI_MEMORY_MORE_RELIABLE    0x0000000000010000ULL\r
+//\r
+// Runtime memory attribute\r
+//\r
+#define EFI_MEMORY_RUNTIME          0x8000000000000000ULL\r
 \r
+///\r
+/// Memory descriptor version number.\r
+///\r
 #define EFI_MEMORY_DESCRIPTOR_VERSION 1\r
+\r
+///\r
+/// Definition of an EFI memory descriptor.\r
+///\r
 typedef struct {\r
+  ///\r
+  /// Type of the memory region.  See EFI_MEMORY_TYPE.\r
+  ///\r
   UINT32                Type;\r
-  UINT32                Pad;\r
+  ///\r
+  /// Physical address of the first byte of the memory region.  Must aligned \r
+  /// on a 4 KB boundary.\r
+  ///\r
   EFI_PHYSICAL_ADDRESS  PhysicalStart;\r
+  ///\r
+  /// Virtual address of the first byte of the memory region.  Must aligned \r
+  /// on a 4 KB boundary.\r
+  ///\r
   EFI_VIRTUAL_ADDRESS   VirtualStart;\r
+  ///\r
+  /// Number of 4KB pages in the memory region.\r
+  ///\r
   UINT64                NumberOfPages;\r
+  ///\r
+  /// Attributes of the memory region that describe the bit mask of capabilities\r
+  /// for that memory region, and not necessarily the current settings for that \r
+  /// memory region.\r
+  ///\r
   UINT64                Attribute;\r
 } EFI_MEMORY_DESCRIPTOR;\r
 \r
-//\r
-//  EFI_FIELD_OFFSET - returns the byte offset to a field within a structure\r
-//\r
-#define EFI_FIELD_OFFSET(TYPE,Field) ((UINTN)(&(((TYPE *) 0)->Field)))\r
-\r
-#include <Protocol/DevicePath.h>\r
-#include <Protocol/SimpleTextIn.h>\r
-#include <Protocol/SimpleTextOut.h>\r
-\r
-//\r
-// Declare forward referenced data structures\r
-//\r
-typedef struct _EFI_SYSTEM_TABLE   EFI_SYSTEM_TABLE;\r
-\r
 /**\r
   Allocates memory pages from the system.\r
-  \r
-  @param  Type        The type of allocation to perform.\r
-  @param  MemoryType  The type of memory to allocate.\r
-  @param  Pages       The number of contiguous 4 KB pages to allocate.\r
-  @param  Memory      Pointer to a physical address. On input, the way in which the address is\r
-                      used depends on the value of Type.          \r
-                     \r
+\r
+  @param[in]       Type         The type of allocation to perform.\r
+  @param[in]       MemoryType   The type of memory to allocate.\r
+                                MemoryType values in the range 0x70000000..0x7FFFFFFF\r
+                                are reserved for OEM use. MemoryType values in the range\r
+                                0x80000000..0xFFFFFFFF are reserved for use by UEFI OS loaders\r
+                                that are provided by operating system vendors.\r
+  @param[in]       Pages        The number of contiguous 4 KB pages to allocate.\r
+  @param[in, out]  Memory       The pointer to a physical address. On input, the way in which the address is\r
+                                used depends on the value of Type.\r
+\r
   @retval EFI_SUCCESS           The requested pages were allocated.\r
   @retval EFI_INVALID_PARAMETER 1) Type is not AllocateAnyPages or\r
                                 AllocateMaxAddress or AllocateAddress.\r
                                 2) MemoryType is in the range\r
-                                EfiMaxMemoryType..0x7FFFFFFF.\r
+                                EfiMaxMemoryType..0x6FFFFFFF.\r
+                                3) Memory is NULL.\r
+                                4) MemoryType is EfiPersistentMemory.\r
   @retval EFI_OUT_OF_RESOURCES  The pages could not be allocated.\r
   @retval EFI_NOT_FOUND         The requested pages could not be found.\r
-                     \r
-**/                  \r
-typedef              \r
-EFI_STATUS           \r
-(EFIAPI *EFI_ALLOCATE_PAGES) (\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_ALLOCATE_PAGES)(\r
   IN     EFI_ALLOCATE_TYPE            Type,\r
   IN     EFI_MEMORY_TYPE              MemoryType,\r
   IN     UINTN                        Pages,\r
@@ -137,47 +163,51 @@ EFI_STATUS
 \r
 /**\r
   Frees memory pages.\r
-    \r
-  @param  Memory      The base physical address of the pages to be freed.\r
-  @param  Pages       The number of contiguous 4 KB pages to free.\r
-                               \r
+\r
+  @param[in]  Memory      The base physical address of the pages to be freed.\r
+  @param[in]  Pages       The number of contiguous 4 KB pages to free.\r
+\r
   @retval EFI_SUCCESS           The requested pages were freed.\r
-  @retval EFI_INVALID_PARAMETER Memory is not a page-aligned address or Pages is invalid.    \r
+  @retval EFI_INVALID_PARAMETER Memory is not a page-aligned address or Pages is invalid.\r
   @retval EFI_NOT_FOUND         The requested memory pages were not allocated with\r
                                 AllocatePages().\r
-                     \r
-**/          \r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_FREE_PAGES) (\r
+(EFIAPI *EFI_FREE_PAGES)(\r
   IN  EFI_PHYSICAL_ADDRESS         Memory,\r
   IN  UINTN                        Pages\r
   );\r
 \r
 /**\r
   Returns the current memory map.\r
-    \r
-  @param  MemoryMapSize         A pointer to the size, in bytes, of the MemoryMap buffer.\r
-  @param  MemoryMap             A pointer to the buffer in which firmware places the current memory\r
-                                map.\r
-  @param  MapKey                A pointer to the location in which firmware returns the key for the\r
-                                current memory map.                                                \r
-  @param  DescriptorSize        A pointer to the location in which firmware returns the size, in bytes, of\r
-                                an individual EFI_MEMORY_DESCRIPTOR.                                      \r
-  @param  DescriptorVersion     A pointer to the location in which firmware returns the version number\r
-                                associated with the EFI_MEMORY_DESCRIPTOR. \r
-                                                                 \r
+\r
+  @param[in, out]  MemoryMapSize         A pointer to the size, in bytes, of the MemoryMap buffer.\r
+                                         On input, this is the size of the buffer allocated by the caller.\r
+                                         On output, it is the size of the buffer returned by the firmware if\r
+                                         the buffer was large enough, or the size of the buffer needed to contain\r
+                                         the map if the buffer was too small.\r
+  @param[in, out]  MemoryMap             A pointer to the buffer in which firmware places the current memory\r
+                                         map.\r
+  @param[out]      MapKey                A pointer to the location in which firmware returns the key for the\r
+                                         current memory map.\r
+  @param[out]      DescriptorSize        A pointer to the location in which firmware returns the size, in bytes, of\r
+                                         an individual EFI_MEMORY_DESCRIPTOR.\r
+  @param[out]      DescriptorVersion     A pointer to the location in which firmware returns the version number\r
+                                         associated with the EFI_MEMORY_DESCRIPTOR.\r
+\r
   @retval EFI_SUCCESS           The memory map was returned in the MemoryMap buffer.\r
   @retval EFI_BUFFER_TOO_SMALL  The MemoryMap buffer was too small. The current buffer size\r
                                 needed to hold the memory map is returned in MemoryMapSize.\r
   @retval EFI_INVALID_PARAMETER 1) MemoryMapSize is NULL.\r
                                 2) The MemoryMap buffer is not too small and MemoryMap is\r
-                                   NULL.                                                 \r
-                     \r
-**/          \r
+                                   NULL.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_GET_MEMORY_MAP) (\r
+(EFIAPI *EFI_GET_MEMORY_MAP)(\r
   IN OUT UINTN                       *MemoryMapSize,\r
   IN OUT EFI_MEMORY_DESCRIPTOR       *MemoryMap,\r
   OUT    UINTN                       *MapKey,\r
@@ -185,25 +215,28 @@ EFI_STATUS
   OUT    UINT32                      *DescriptorVersion\r
   );\r
 \r
-#define NextMemoryDescriptor(_Ptr, _Size)   ((EFI_MEMORY_DESCRIPTOR *) (((UINT8 *) (_Ptr)) + (_Size)))\r
-#define NEXT_MEMORY_DESCRIPTOR(_Ptr, _Size) NextMemoryDescriptor (_Ptr, _Size)\r
-\r
 /**\r
   Allocates pool memory.\r
-    \r
-  @param  PoolType              The type of pool to allocate.\r
-  @param  Size                  The number of bytes to allocate from the pool.                                \r
-  @param  Buffer                A pointer to a pointer to the allocated buffer if the call succeeds;\r
-                                undefined otherwise.                                \r
-                                                                 \r
+\r
+  @param[in]   PoolType         The type of pool to allocate.\r
+                                MemoryType values in the range 0x70000000..0x7FFFFFFF\r
+                                are reserved for OEM use. MemoryType values in the range\r
+                                0x80000000..0xFFFFFFFF are reserved for use by UEFI OS loaders\r
+                                that are provided by operating system vendors.\r
+  @param[in]   Size             The number of bytes to allocate from the pool.\r
+  @param[out]  Buffer           A pointer to a pointer to the allocated buffer if the call succeeds;\r
+                                undefined otherwise.\r
+\r
   @retval EFI_SUCCESS           The requested number of bytes was allocated.\r
-  @retval EFI_OUT_OF_RESOURCES  The pool requested could not be allocated.                                \r
-  @retval EFI_INVALID_PARAMETER PoolType was invalid.                                \r
-                     \r
-**/    \r
+  @retval EFI_OUT_OF_RESOURCES  The pool requested could not be allocated.\r
+  @retval EFI_INVALID_PARAMETER Buffer is NULL.\r
+                                PoolType is in the range EfiMaxMemoryType..0x6FFFFFFF.\r
+                                PoolType is EfiPersistentMemory.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_ALLOCATE_POOL) (\r
+(EFIAPI *EFI_ALLOCATE_POOL)(\r
   IN  EFI_MEMORY_TYPE              PoolType,\r
   IN  UINTN                        Size,\r
   OUT VOID                         **Buffer\r
@@ -211,41 +244,41 @@ EFI_STATUS
 \r
 /**\r
   Returns pool memory to the system.\r
-    \r
-  @param  Buffer                Pointer to the buffer to free.                                                             \r
-                                                                 \r
-  @retval EFI_SUCCESS           The memory was returned to the system.  \r
+\r
+  @param[in]  Buffer            The pointer to the buffer to free.\r
+\r
+  @retval EFI_SUCCESS           The memory was returned to the system.\r
   @retval EFI_INVALID_PARAMETER Buffer was invalid.\r
-                     \r
-**/    \r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_FREE_POOL) (\r
+(EFIAPI *EFI_FREE_POOL)(\r
   IN  VOID                         *Buffer\r
   );\r
 \r
 /**\r
   Changes the runtime addressing mode of EFI firmware from physical to virtual.\r
-    \r
-  @param  MemoryMapSize         The size in bytes of VirtualMap.\r
-  @param  DescriptorSize        The size in bytes of an entry in the VirtualMap.\r
-  @param  DescriptorVersion     The version of the structure entries in VirtualMap.\r
-  @param  VirtualMap            An array of memory descriptors which contain new virtual\r
+\r
+  @param[in]  MemoryMapSize     The size in bytes of VirtualMap.\r
+  @param[in]  DescriptorSize    The size in bytes of an entry in the VirtualMap.\r
+  @param[in]  DescriptorVersion The version of the structure entries in VirtualMap.\r
+  @param[in]  VirtualMap        An array of memory descriptors which contain new virtual\r
                                 address mapping information for all runtime ranges.\r
-                                                                 \r
+\r
   @retval EFI_SUCCESS           The virtual address map has been applied.\r
   @retval EFI_UNSUPPORTED       EFI firmware is not at runtime, or the EFI firmware is already in\r
-                                virtual address mapped mode.                                     \r
-  @retval EFI_INVALID_PARAMETER DescriptorSize or DescriptorVersion is invalid.                              \r
+                                virtual address mapped mode.\r
+  @retval EFI_INVALID_PARAMETER DescriptorSize or DescriptorVersion is invalid.\r
   @retval EFI_NO_MAPPING        A virtual address was not supplied for a range in the memory\r
-                                map that requires a mapping.                                \r
+                                map that requires a mapping.\r
   @retval EFI_NOT_FOUND         A virtual address was supplied for an address that is not found\r
-                                in the memory map.                                             \r
-                                \r
-**/                             \r
+                                in the memory map.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_SET_VIRTUAL_ADDRESS_MAP) (\r
+(EFIAPI *EFI_SET_VIRTUAL_ADDRESS_MAP)(\r
   IN  UINTN                        MemoryMapSize,\r
   IN  UINTN                        DescriptorSize,\r
   IN  UINT32                       DescriptorVersion,\r
@@ -254,30 +287,32 @@ EFI_STATUS
 \r
 /**\r
   Connects one or more drivers to a controller.\r
-    \r
-  @param  ControllerHandle      The handle of the controller to which driver(s) are to be connected.\r
-  @param  DriverImageHandle     A pointer to an ordered list handles that support the\r
-                                EFI_DRIVER_BINDING_PROTOCOL.                         \r
-  @param  RemainingDevicePath   A pointer to the device path that specifies a child of the\r
-                                controller specified by ControllerHandle.                 \r
-  @param  Recursive             If TRUE, then ConnectController() is called recursively            \r
-                                until the entire tree of controllers below the controller specified\r
-                                by ControllerHandle have been created. If FALSE, then              \r
-                                the tree of controllers is only expanded one level.                                                                                                               \r
-                                \r
+\r
+  @param[in]  ControllerHandle      The handle of the controller to which driver(s) are to be connected.\r
+  @param[in]  DriverImageHandle     A pointer to an ordered list handles that support the\r
+                                    EFI_DRIVER_BINDING_PROTOCOL.\r
+  @param[in]  RemainingDevicePath   A pointer to the device path that specifies a child of the\r
+                                    controller specified by ControllerHandle.\r
+  @param[in]  Recursive             If TRUE, then ConnectController() is called recursively\r
+                                    until the entire tree of controllers below the controller specified\r
+                                    by ControllerHandle have been created. If FALSE, then\r
+                                    the tree of controllers is only expanded one level.\r
+\r
   @retval EFI_SUCCESS           1) One or more drivers were connected to ControllerHandle.\r
-                                2) No drivers were connected to ControllerHandle, but      \r
+                                2) No drivers were connected to ControllerHandle, but\r
                                 RemainingDevicePath is not NULL, and it is an End Device\r
-                                Path Node.                                                                                                                  \r
-  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.       \r
+                                Path Node.\r
+  @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r
   @retval EFI_NOT_FOUND         1) There are no EFI_DRIVER_BINDING_PROTOCOL instances\r
-                                present in the system.                            \r
+                                present in the system.\r
                                 2) No drivers were connected to ControllerHandle.\r
-                                \r
-**/ \r
+  @retval EFI_SECURITY_VIOLATION \r
+                                The user has no permission to start UEFI device drivers on the device path \r
+                                associated with the ControllerHandle or specified by the RemainingDevicePath.\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_CONNECT_CONTROLLER) (\r
+(EFIAPI *EFI_CONNECT_CONTROLLER)(\r
   IN  EFI_HANDLE                    ControllerHandle,\r
   IN  EFI_HANDLE                    *DriverImageHandle,   OPTIONAL\r
   IN  EFI_DEVICE_PATH_PROTOCOL      *RemainingDevicePath, OPTIONAL\r
@@ -286,131 +321,121 @@ EFI_STATUS
 \r
 /**\r
   Disconnects one or more drivers from a controller.\r
-    \r
-  @param  ControllerHandle      The handle of the controller from which driver(s) are to be disconnected.\r
-  @param  DriverImageHandle     The driver to disconnect from ControllerHandle.                       \r
-  @param  ChildHandle           The handle of the child to destroy.                                \r
-                                \r
+\r
+  @param[in]  ControllerHandle      The handle of the controller from which driver(s) are to be disconnected.\r
+  @param[in]  DriverImageHandle     The driver to disconnect from ControllerHandle.\r
+                                    If DriverImageHandle is NULL, then all the drivers currently managing\r
+                                    ControllerHandle are disconnected from ControllerHandle.\r
+  @param[in]  ChildHandle           The handle of the child to destroy.\r
+                                    If ChildHandle is NULL, then all the children of ControllerHandle are\r
+                                    destroyed before the drivers are disconnected from ControllerHandle.\r
+\r
   @retval EFI_SUCCESS           1) One or more drivers were disconnected from the controller.\r
                                 2) On entry, no drivers are managing ControllerHandle.\r
                                 3) DriverImageHandle is not NULL, and on entry\r
                                    DriverImageHandle is not managing ControllerHandle.\r
-                                   \r
-  @retval EFI_INVALID_PARAMETER One ore more parameters are invalid.\r
+  @retval EFI_INVALID_PARAMETER 1) ControllerHandle is NULL.\r
+                                2) DriverImageHandle is not NULL, and it is not a valid EFI_HANDLE.\r
+                                3) ChildHandle is not NULL, and it is not a valid EFI_HANDLE.\r
+                                4) DriverImageHandle does not support the EFI_DRIVER_BINDING_PROTOCOL.\r
   @retval EFI_OUT_OF_RESOURCES  There are not enough resources available to disconnect any drivers from\r
-                                ControllerHandle.                                                      \r
-  @retval EFI_DEVICE_ERROR      The controller could not be disconnected because of a device error.  \r
-                                \r
-**/ \r
+                                ControllerHandle.\r
+  @retval EFI_DEVICE_ERROR      The controller could not be disconnected because of a device error.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_DISCONNECT_CONTROLLER) (\r
+(EFIAPI *EFI_DISCONNECT_CONTROLLER)(\r
   IN  EFI_HANDLE                     ControllerHandle,\r
   IN  EFI_HANDLE                     DriverImageHandle, OPTIONAL\r
   IN  EFI_HANDLE                     ChildHandle        OPTIONAL\r
   );\r
 \r
+\r
+\r
 //\r
 // ConvertPointer DebugDisposition type.\r
 //\r
 #define EFI_OPTIONAL_PTR     0x00000001\r
-#define EFI_OPTIONAL_POINTER EFI_OPTIONAL_PTR\r
 \r
 /**\r
   Determines the new virtual address that is to be used on subsequent memory accesses.\r
-    \r
-  @param  DebugDisposition      Supplies type information for the pointer being converted.\r
-  @param  Address               A pointer to a pointer that is to be fixed to be the value needed\r
-                                for the new virtual address mappings being applied.                              \r
-                                \r
-  @retval EFI_SUCCESS           The pointer pointed to by Address was modified.                                                                   \r
+\r
+  @param[in]       DebugDisposition  Supplies type information for the pointer being converted.\r
+  @param[in, out]  Address           A pointer to a pointer that is to be fixed to be the value needed\r
+                                     for the new virtual address mappings being applied.\r
+\r
+  @retval EFI_SUCCESS           The pointer pointed to by Address was modified.\r
   @retval EFI_INVALID_PARAMETER 1) Address is NULL.\r
                                 2) *Address is NULL and DebugDisposition does\r
-                                not have the EFI_OPTIONAL_PTR bit set.    \r
+                                not have the EFI_OPTIONAL_PTR bit set.\r
   @retval EFI_NOT_FOUND         The pointer pointed to by Address was not found to be part\r
-                                of the current memory map. This is normally fatal.          \r
-                                \r
-**/ \r
+                                of the current memory map. This is normally fatal.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_CONVERT_POINTER) (\r
+(EFIAPI *EFI_CONVERT_POINTER)(\r
   IN     UINTN                      DebugDisposition,\r
   IN OUT VOID                       **Address\r
   );\r
 \r
-//\r
-// EFI Event Types (name defined in spec)\r
-//\r
-#define EVENT_TIMER                             0x80000000\r
-#define EVENT_RUNTIME                           0x40000000\r
-#define EVENT_RUNTIME_CONTEXT                   0x20000000\r
-\r
-#define EVENT_NOTIFY_WAIT                       0x00000100\r
-#define EVENT_NOTIFY_SIGNAL                     0x00000200\r
 \r
-#define EVENT_SIGNAL_EXIT_BOOT_SERVICES         0x00000201\r
-#define EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE     0x60000202\r
-\r
-#if ((EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))\r
 //\r
-// Prior to UEFI 2.0 Tiano extended these enums. This was replaced by\r
-// CreateEventEx() Event Groups in UEFI 2.0\r
+// These types can be ORed together as needed - for example,\r
+// EVT_TIMER might be Ored with EVT_NOTIFY_WAIT or\r
+// EVT_NOTIFY_SIGNAL.\r
 //\r
-#define EFI_EVENT_NOTIFY_SIGNAL_ALL     0x00000400\r
-\r
-#define EFI_EVENT_SIGNAL_READY_TO_BOOT  0x00000203\r
-#define EFI_EVENT_SIGNAL_LEGACY_BOOT    0x00000204\r
+#define EVT_TIMER                         0x80000000\r
+#define EVT_RUNTIME                       0x40000000\r
+#define EVT_NOTIFY_WAIT                   0x00000100\r
+#define EVT_NOTIFY_SIGNAL                 0x00000200\r
 \r
-#endif\r
+#define EVT_SIGNAL_EXIT_BOOT_SERVICES     0x00000201\r
+#define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202\r
 \r
 //\r
-// EFI Event Types (name following coding style)\r
+// The event's NotifyContext pointer points to a runtime memory\r
+// address.\r
+// The event is deprecated in UEFI2.0 and later specifications.\r
 //\r
-#define EFI_EVENT_TIMER                         EVENT_TIMER\r
-#define EFI_EVENT_RUNTIME                       EVENT_RUNTIME\r
-#define EFI_EVENT_RUNTIME_CONTEXT               EVENT_RUNTIME_CONTEXT\r
+#define EVT_RUNTIME_CONTEXT               0x20000000\r
 \r
-#define EFI_EVENT_NOTIFY_WAIT                   EVENT_NOTIFY_WAIT\r
-#define EFI_EVENT_NOTIFY_SIGNAL                 EVENT_NOTIFY_SIGNAL\r
 \r
-#define EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES     EVENT_SIGNAL_EXIT_BOOT_SERVICES\r
-#define EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE\r
+/**\r
+  Invoke a notification event\r
 \r
+  @param[in]  Event                 Event whose notification function is being invoked.\r
+  @param[in]  Context               The pointer to the notification function's context,\r
+                                    which is implementation-dependent.\r
 \r
-/**                                                                                                   \r
-  Invoke a notification event\r
-                                                                                                      \r
-  @param  Event                 Event whose notification function is being invoked.\r
-  @param  Context               Pointer to the notification function's context, \r
-                                which is implementation-dependent.                                                  \r
-                                                                                                      \r
-**/                                                                                                   \r
+**/\r
 typedef\r
 VOID\r
-(EFIAPI *EFI_EVENT_NOTIFY) (\r
+(EFIAPI *EFI_EVENT_NOTIFY)(\r
   IN  EFI_EVENT                Event,\r
   IN  VOID                     *Context\r
   );\r
 \r
-/**                                                                                                   \r
+/**\r
   Creates an event.\r
-                                                                                                      \r
-  @param  Type                  The type of event to create and its mode and attributes.\r
-  @param  NotifyTpl             Pointer to the notification function's context.\r
-  @param  NotifyFunction        Pointer to the event's notification function, if any.  \r
-  @param  NotifyContext         Pointer to the notification function's context; corresponds to parameter\r
-                                Context in the notification function.                                                                                                          \r
-  @param  Event                 Pointer to the newly created event if the call succeeds; undefined  \r
-                                otherwise.                                                          \r
-\r
-  @retval EFI_SUCCESS           The event structure was created.                    \r
+\r
+  @param[in]   Type             The type of event to create and its mode and attributes.\r
+  @param[in]   NotifyTpl        The task priority level of event notifications, if needed.\r
+  @param[in]   NotifyFunction   The pointer to the event's notification function, if any.\r
+  @param[in]   NotifyContext    The pointer to the notification function's context; corresponds to parameter\r
+                                Context in the notification function.\r
+  @param[out]  Event            The pointer to the newly created event if the call succeeds; undefined\r
+                                otherwise.\r
+\r
+  @retval EFI_SUCCESS           The event structure was created.\r
   @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
   @retval EFI_OUT_OF_RESOURCES  The event could not be allocated.\r
-  \r
-**/                                                                                   \r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_CREATE_EVENT) (\r
+(EFIAPI *EFI_CREATE_EVENT)(\r
   IN  UINT32                       Type,\r
   IN  EFI_TPL                      NotifyTpl,\r
   IN  EFI_EVENT_NOTIFY             NotifyFunction,\r
@@ -418,250 +443,281 @@ EFI_STATUS
   OUT EFI_EVENT                    *Event\r
   );\r
 \r
-/**                                                                                                   \r
+/**\r
   Creates an event in a group.\r
-                                                                                                      \r
-  @param  Type                  The type of event to create and its mode and attributes.\r
-  @param  NotifyTpl             Pointer to the notification function's context.\r
-  @param  NotifyFunction        Pointer to the event's notification function, if any.  \r
-  @param  NotifyContext         Pointer to the notification function's context; corresponds to parameter\r
-                                Context in the notification function.          \r
-  @param  EventGroup            Pointer to the unique identifier of the group to which this event belongs.                                                                                                                                \r
-  @param  Event                 Pointer to the newly created event if the call succeeds; undefined  \r
-                                otherwise.                                                          \r
-\r
-  @retval EFI_SUCCESS           The event structure was created.                    \r
+\r
+  @param[in]   Type             The type of event to create and its mode and attributes.\r
+  @param[in]   NotifyTpl        The task priority level of event notifications,if needed.\r
+  @param[in]   NotifyFunction   The pointer to the event's notification function, if any.\r
+  @param[in]   NotifyContext    The pointer to the notification function's context; corresponds to parameter\r
+                                Context in the notification function.\r
+  @param[in]   EventGroup       The pointer to the unique identifier of the group to which this event belongs.\r
+                                If this is NULL, then the function behaves as if the parameters were passed\r
+                                to CreateEvent.\r
+  @param[out]  Event            The pointer to the newly created event if the call succeeds; undefined\r
+                                otherwise.\r
+\r
+  @retval EFI_SUCCESS           The event structure was created.\r
   @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
   @retval EFI_OUT_OF_RESOURCES  The event could not be allocated.\r
-  \r
-**/                 \r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_CREATE_EVENT_EX) (\r
+(EFIAPI *EFI_CREATE_EVENT_EX)(\r
   IN       UINT32                 Type,\r
-  IN       EFI_TPL                NotifyTpl      OPTIONAL,\r
+  IN       EFI_TPL                NotifyTpl,\r
   IN       EFI_EVENT_NOTIFY       NotifyFunction OPTIONAL,\r
   IN CONST VOID                   *NotifyContext OPTIONAL,\r
   IN CONST EFI_GUID               *EventGroup    OPTIONAL,\r
   OUT      EFI_EVENT              *Event\r
   );\r
 \r
+///\r
+/// Timer delay types\r
+///\r
 typedef enum {\r
+  ///\r
+  /// An event's timer settings is to be cancelled and not trigger time is to be set/\r
+  ///\r
   TimerCancel,\r
+  ///\r
+  /// An event is to be signaled periodically at a specified interval from the current time.\r
+  ///\r
   TimerPeriodic,\r
+  ///\r
+  /// An event is to be signaled once at a specified interval from the current time.\r
+  ///\r
   TimerRelative\r
 } EFI_TIMER_DELAY;\r
 \r
-/**                                                 \r
+/**\r
   Sets the type of timer and the trigger time for a timer event.\r
-                                                    \r
-  @param  Event                 The timer event that is to be signaled at the specified time.\r
-  @param  Type                  The type of time that is specified in TriggerTime.\r
-  @param  TriggerTime           The number of 100ns units until the timer expires.  \r
 \r
-  @retval EFI_SUCCESS           The event has been set to be signaled at the requested time.  \r
+  @param[in]  Event             The timer event that is to be signaled at the specified time.\r
+  @param[in]  Type              The type of time that is specified in TriggerTime.\r
+  @param[in]  TriggerTime       The number of 100ns units until the timer expires.\r
+                                A TriggerTime of 0 is legal.\r
+                                If Type is TimerRelative and TriggerTime is 0, then the timer\r
+                                event will be signaled on the next timer tick.\r
+                                If Type is TimerPeriodic and TriggerTime is 0, then the timer\r
+                                event will be signaled on every timer tick.\r
+\r
+  @retval EFI_SUCCESS           The event has been set to be signaled at the requested time.\r
   @retval EFI_INVALID_PARAMETER Event or Type is not valid.\r
-  \r
-**/         \r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_SET_TIMER) (\r
+(EFIAPI *EFI_SET_TIMER)(\r
   IN  EFI_EVENT                Event,\r
   IN  EFI_TIMER_DELAY          Type,\r
   IN  UINT64                   TriggerTime\r
   );\r
 \r
-/**                                                                                                   \r
+/**\r
   Signals an event.\r
-                                                                                                       \r
-  @param  Event                 The event to signal.\r
 \r
-  @retval EFI_SUCCESS           The event has been signaled.  \r
-  \r
-**/                 \r
+  @param[in]  Event             The event to signal.\r
+\r
+  @retval EFI_SUCCESS           The event has been signaled.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_SIGNAL_EVENT) (\r
+(EFIAPI *EFI_SIGNAL_EVENT)(\r
   IN  EFI_EVENT                Event\r
   );\r
 \r
-/**                                                                                                   \r
+/**\r
   Stops execution until an event is signaled.\r
-                                                                                                       \r
-  @param  NumberOfEvents        The number of events in the Event array.\r
-  @param  Event                 An array of EFI_EVENT.\r
-  @param  Index                 Pointer to the index of the event which satisfied the wait condition.\r
+\r
+  @param[in]   NumberOfEvents   The number of events in the Event array.\r
+  @param[in]   Event            An array of EFI_EVENT.\r
+  @param[out]  Index            The pointer to the index of the event which satisfied the wait condition.\r
 \r
   @retval EFI_SUCCESS           The event indicated by Index was signaled.\r
   @retval EFI_INVALID_PARAMETER 1) NumberOfEvents is 0.\r
                                 2) The event indicated by Index is of type\r
-                                   EVT_NOTIFY_SIGNAL.                     \r
-  @retval EFI_UNSUPPORTED       The current TPL is not TPL_APPLICATION.                                   \r
-  \r
-**/          \r
+                                   EVT_NOTIFY_SIGNAL.\r
+  @retval EFI_UNSUPPORTED       The current TPL is not TPL_APPLICATION.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_WAIT_FOR_EVENT) (\r
+(EFIAPI *EFI_WAIT_FOR_EVENT)(\r
   IN  UINTN                    NumberOfEvents,\r
   IN  EFI_EVENT                *Event,\r
   OUT UINTN                    *Index\r
   );\r
 \r
-/**                                                                                                   \r
+/**\r
   Closes an event.\r
-                                                                                                       \r
-  @param  Event                 The event to close.\r
 \r
-  @retval EFI_SUCCESS           The event has been closed.  \r
-  \r
-**/                 \r
+  @param[in]  Event             The event to close.\r
+\r
+  @retval EFI_SUCCESS           The event has been closed.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_CLOSE_EVENT) (\r
+(EFIAPI *EFI_CLOSE_EVENT)(\r
   IN EFI_EVENT                Event\r
   );\r
 \r
-/**                                                 \r
+/**\r
   Checks whether an event is in the signaled state.\r
-                                                    \r
-  @param  Event                 The event to check.\r
+\r
+  @param[in]  Event             The event to check.\r
 \r
   @retval EFI_SUCCESS           The event is in the signaled state.\r
   @retval EFI_NOT_READY         The event is not in the signaled state.\r
   @retval EFI_INVALID_PARAMETER Event is of type EVT_NOTIFY_SIGNAL.\r
-  \r
-**/         \r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_CHECK_EVENT) (\r
+(EFIAPI *EFI_CHECK_EVENT)(\r
   IN EFI_EVENT                Event\r
   );\r
 \r
+\r
 //\r
-// Task priority level (name defined in spec).\r
+// Task priority level\r
 //\r
 #define TPL_APPLICATION       4\r
 #define TPL_CALLBACK          8\r
 #define TPL_NOTIFY            16\r
 #define TPL_HIGH_LEVEL        31\r
 \r
-//\r
-// Task priority level (name following coding style).\r
-//\r
-#define EFI_TPL_APPLICATION   TPL_APPLICATION\r
-#define EFI_TPL_CALLBACK      TPL_CALLBACK\r
-#define EFI_TPL_NOTIFY        TPL_NOTIFY\r
-#define EFI_TPL_HIGH_LEVEL    TPL_HIGH_LEVEL\r
 \r
-/**                                                 \r
+/**\r
   Raises a task's priority level and returns its previous level.\r
-                                                    \r
-  @param  NewTpl                The new task priority level.\r
-  \r
-  @retval                       Previous task priority level  \r
-  \r
-**/         \r
+\r
+  @param[in]  NewTpl          The new task priority level.\r
+\r
+  @return Previous task priority level\r
+\r
+**/\r
 typedef\r
 EFI_TPL\r
-(EFIAPI *EFI_RAISE_TPL) (\r
+(EFIAPI *EFI_RAISE_TPL)(\r
   IN EFI_TPL      NewTpl\r
   );\r
 \r
-/**                                                 \r
+/**\r
   Restores a task's priority level to its previous value.\r
-                                                    \r
-  @param  OldTpl                The previous task priority level to restore    \r
-  \r
-**/       \r
+\r
+  @param[in]  OldTpl          The previous task priority level to restore.\r
+\r
+**/\r
 typedef\r
 VOID\r
-(EFIAPI *EFI_RESTORE_TPL) (\r
+(EFIAPI *EFI_RESTORE_TPL)(\r
   IN EFI_TPL      OldTpl\r
   );\r
 \r
-//\r
-// Variable attributes\r
-//\r
-#define EFI_VARIABLE_NON_VOLATILE       0x00000001\r
-#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002\r
-#define EFI_VARIABLE_RUNTIME_ACCESS     0x00000004\r
-\r
-/**                                                 \r
+/**\r
   Returns the value of a variable.\r
-                                                    \r
-  @param  VariableName          A Null-terminated Unicode string that is the name of the\r
-                                vendor's variable.                                     \r
-  @param  VendorGuid            A unique identifier for the vendor.                    \r
-  @param  Attributes            If not NULL, a pointer to the memory location to return the\r
-                                attributes bitmask for the variable.                       \r
-  @param  DataSize              On input, the size in bytes of the return Data buffer.\r
-                                On output the size of data returned in Data.          \r
-  @param  Data                  The buffer to return the contents of the variable.                                \r
-  \r
-  @retval EFI_SUCCESS           The function completed successfully.\r
-  @retval EFI_NOT_FOUND         The variable was not found.\r
-  @retval EFI_BUFFER_TOO_SMALL  The DataSize is too small for the result.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
-  @retval EFI_DEVICE_ERROR      The variable could not be retrieved due to a hardware error.\r
-  \r
-**/         \r
+\r
+  @param[in]       VariableName  A Null-terminated string that is the name of the vendor's\r
+                                 variable.\r
+  @param[in]       VendorGuid    A unique identifier for the vendor.\r
+  @param[out]      Attributes    If not NULL, a pointer to the memory location to return the\r
+                                 attributes bitmask for the variable.\r
+  @param[in, out]  DataSize      On input, the size in bytes of the return Data buffer.\r
+                                 On output the size of data returned in Data.\r
+  @param[out]      Data          The buffer to return the contents of the variable. May be NULL\r
+                                 with a zero DataSize in order to determine the size buffer needed.\r
+\r
+  @retval EFI_SUCCESS            The function completed successfully.\r
+  @retval EFI_NOT_FOUND          The variable was not found.\r
+  @retval EFI_BUFFER_TOO_SMALL   The DataSize is too small for the result.\r
+  @retval EFI_INVALID_PARAMETER  VariableName is NULL.\r
+  @retval EFI_INVALID_PARAMETER  VendorGuid is NULL.\r
+  @retval EFI_INVALID_PARAMETER  DataSize is NULL.\r
+  @retval EFI_INVALID_PARAMETER  The DataSize is not too small and Data is NULL.\r
+  @retval EFI_DEVICE_ERROR       The variable could not be retrieved due to a hardware error.\r
+  @retval EFI_SECURITY_VIOLATION The variable could not be retrieved due to an authentication failure.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_GET_VARIABLE) (\r
+(EFIAPI *EFI_GET_VARIABLE)(\r
   IN     CHAR16                      *VariableName,\r
   IN     EFI_GUID                    *VendorGuid,\r
   OUT    UINT32                      *Attributes,    OPTIONAL\r
   IN OUT UINTN                       *DataSize,\r
-  OUT    VOID                        *Data\r
+  OUT    VOID                        *Data           OPTIONAL\r
   );\r
 \r
-/**                                                 \r
+/**\r
   Enumerates the current variable names.\r
-                                                    \r
-  @param  VariableNameSize      The size of the VariableName buffer.\r
-  @param  VariableName          On input, supplies the last VariableName that was returned     \r
-                                by GetNextVariableName(). On output, returns the Nullterminated\r
-                                Unicode string of the current variable.                                             \r
-  @param  VendorGuid            On input, supplies the last VendorGuid that was returned by\r
-                                GetNextVariableName(). On output, returns the              \r
-                                VendorGuid of the current variable.                          \r
-  \r
+\r
+  @param[in, out]  VariableNameSize The size of the VariableName buffer.\r
+  @param[in, out]  VariableName     On input, supplies the last VariableName that was returned\r
+                                    by GetNextVariableName(). On output, returns the Nullterminated\r
+                                    string of the current variable.\r
+  @param[in, out]  VendorGuid       On input, supplies the last VendorGuid that was returned by\r
+                                    GetNextVariableName(). On output, returns the\r
+                                    VendorGuid of the current variable.\r
+\r
   @retval EFI_SUCCESS           The function completed successfully.\r
   @retval EFI_NOT_FOUND         The next variable was not found.\r
   @retval EFI_BUFFER_TOO_SMALL  The VariableNameSize is too small for the result.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
+  @retval EFI_INVALID_PARAMETER VariableNameSize is NULL.\r
+  @retval EFI_INVALID_PARAMETER VariableName is NULL.\r
+  @retval EFI_INVALID_PARAMETER VendorGuid is NULL.\r
   @retval EFI_DEVICE_ERROR      The variable could not be retrieved due to a hardware error.\r
-  \r
-**/        \r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_GET_NEXT_VARIABLE_NAME) (\r
+(EFIAPI *EFI_GET_NEXT_VARIABLE_NAME)(\r
   IN OUT UINTN                    *VariableNameSize,\r
   IN OUT CHAR16                   *VariableName,\r
   IN OUT EFI_GUID                 *VendorGuid\r
   );\r
 \r
-/**                                                                                               \r
+/**\r
   Sets the value of a variable.\r
-                                                                                                    \r
-  @param  VariableName          A Null-terminated Unicode string that is the name of the\r
-                                vendor's variable.                                     \r
-  @param  VendorGuid            A unique identifier for the vendor.                                \r
-  @param  Attributes            Attributes bitmask to set for the variable.                                \r
-  @param  DataSize              The size in bytes of the Data buffer.\r
-  @param  Data                  The contents for the variable.\r
-                                                                                                  \r
-  @retval EFI_SUCCESS           The firmware has successfully stored the variable and its data as\r
-                                defined by the Attributes.                                       \r
-  @retval EFI_WRITE_PROTECTED   The variable in question is read-only.\r
-  @retval EFI_OUT_OF_RESOURCES  Not enough storage is available to hold the variable and its data.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.                               \r
-  @retval EFI_DEVICE_ERROR      The variable could not be retrieved due to a hardware error.      \r
-                                                                                                  \r
-**/                                                                                               \r
+\r
+  @param[in]  VariableName       A Null-terminated string that is the name of the vendor's variable.\r
+                                 Each VariableName is unique for each VendorGuid. VariableName must\r
+                                 contain 1 or more characters. If VariableName is an empty string,\r
+                                 then EFI_INVALID_PARAMETER is returned.\r
+  @param[in]  VendorGuid         A unique identifier for the vendor.\r
+  @param[in]  Attributes         Attributes bitmask to set for the variable.\r
+  @param[in]  DataSize           The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, \r
+                                 EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or \r
+                                 EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero \r
+                                 causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is \r
+                                 set, then a SetVariable() call with a DataSize of zero will not cause any change to \r
+                                 the variable value (the timestamp associated with the variable may be updated however \r
+                                 even if no new data value is provided,see the description of the \r
+                                 EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not \r
+                                 be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). \r
+  @param[in]  Data               The contents for the variable.\r
+\r
+  @retval EFI_SUCCESS            The firmware has successfully stored the variable and its data as\r
+                                 defined by the Attributes.\r
+  @retval EFI_INVALID_PARAMETER  An invalid combination of attribute bits, name, and GUID was supplied, or the\r
+                                 DataSize exceeds the maximum allowed.\r
+  @retval EFI_INVALID_PARAMETER  VariableName is an empty string.\r
+  @retval EFI_OUT_OF_RESOURCES   Not enough storage is available to hold the variable and its data.\r
+  @retval EFI_DEVICE_ERROR       The variable could not be retrieved due to a hardware error.\r
+  @retval EFI_WRITE_PROTECTED    The variable in question is read-only.\r
+  @retval EFI_WRITE_PROTECTED    The variable in question cannot be deleted.\r
+  @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS \r
+                                 or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo \r
+                                 does NOT pass the validation check carried out by the firmware.\r
+  \r
+  @retval EFI_NOT_FOUND          The variable trying to be updated or deleted was not found.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_SET_VARIABLE) (\r
+(EFIAPI *EFI_SET_VARIABLE)(\r
   IN  CHAR16                       *VariableName,\r
   IN  EFI_GUID                     *VendorGuid,\r
   IN  UINT32                       Attributes,\r
@@ -669,518 +725,541 @@ EFI_STATUS
   IN  VOID                         *Data\r
   );\r
 \r
-//\r
-// EFI Time\r
-//\r
+\r
+///\r
+/// This provides the capabilities of the\r
+/// real time clock device as exposed through the EFI interfaces.\r
+///\r
 typedef struct {\r
-  UINT32  Resolution;\r
-  UINT32  Accuracy;\r
-  BOOLEAN SetsToZero;\r
+  ///\r
+  /// Provides the reporting resolution of the real-time clock device in\r
+  /// counts per second. For a normal PC-AT CMOS RTC device, this\r
+  /// value would be 1 Hz, or 1, to indicate that the device only reports\r
+  /// the time to the resolution of 1 second.\r
+  ///\r
+  UINT32    Resolution;\r
+  ///\r
+  /// Provides the timekeeping accuracy of the real-time clock in an\r
+  /// error rate of 1E-6 parts per million. For a clock with an accuracy\r
+  /// of 50 parts per million, the value in this field would be\r
+  /// 50,000,000.\r
+  ///\r
+  UINT32    Accuracy;\r
+  ///\r
+  /// A TRUE indicates that a time set operation clears the device's\r
+  /// time below the Resolution reporting level. A FALSE\r
+  /// indicates that the state below the Resolution level of the\r
+  /// device is not cleared when the time is set. Normal PC-AT CMOS\r
+  /// RTC devices set this value to FALSE.\r
+  ///\r
+  BOOLEAN   SetsToZero;\r
 } EFI_TIME_CAPABILITIES;\r
 \r
-/**                                                                 \r
-  Returns the current time and date information, and the time-keeping capabilities \r
+/**\r
+  Returns the current time and date information, and the time-keeping capabilities\r
   of the hardware platform.\r
-                                                                    \r
-  @param  Time                  A pointer to storage to receive a snapshot of the current time.                                \r
-  @param  Capabilities          An optional pointer to a buffer to receive the real time clock \r
-                                device's capabilities.                                  \r
-                                                                    \r
-  @retval EFI_SUCCESS           The operation completed successfully.     \r
+\r
+  @param[out]  Time             A pointer to storage to receive a snapshot of the current time.\r
+  @param[out]  Capabilities     An optional pointer to a buffer to receive the real time clock\r
+                                device's capabilities.\r
+\r
+  @retval EFI_SUCCESS           The operation completed successfully.\r
   @retval EFI_INVALID_PARAMETER Time is NULL.\r
   @retval EFI_DEVICE_ERROR      The time could not be retrieved due to hardware error.\r
-                                                                    \r
-**/                                                                 \r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_GET_TIME) (\r
+(EFIAPI *EFI_GET_TIME)(\r
   OUT  EFI_TIME                    *Time,\r
   OUT  EFI_TIME_CAPABILITIES       *Capabilities OPTIONAL\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Sets the current local time and date information.\r
-                                                                    \r
-  @param  Time                  A pointer to the current time.\r
-                                                                    \r
-  @retval EFI_SUCCESS           The operation completed successfully.     \r
+\r
+  @param[in]  Time              A pointer to the current time.\r
+\r
+  @retval EFI_SUCCESS           The operation completed successfully.\r
   @retval EFI_INVALID_PARAMETER A time field is out of range.\r
   @retval EFI_DEVICE_ERROR      The time could not be set due due to hardware error.\r
-                                                                    \r
-**/    \r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_SET_TIME) (\r
+(EFIAPI *EFI_SET_TIME)(\r
   IN  EFI_TIME                     *Time\r
   );\r
-  \r
-/**                                                                 \r
+\r
+/**\r
   Returns the current wakeup alarm clock setting.\r
-  \r
-  @param  Enabled               Indicates if the alarm is currently enabled or disabled.\r
-  @param  Pending               Indicates if the alarm signal is pending and requires acknowledgement.                                                                      \r
-  @param  Time                  The current alarm setting.\r
-                                                                    \r
+\r
+  @param[out]  Enabled          Indicates if the alarm is currently enabled or disabled.\r
+  @param[out]  Pending          Indicates if the alarm signal is pending and requires acknowledgement.\r
+  @param[out]  Time             The current alarm setting.\r
+\r
   @retval EFI_SUCCESS           The alarm settings were returned.\r
-  @retval EFI_INVALID_PARAMETER Any parameter is NULL.\r
+  @retval EFI_INVALID_PARAMETER Enabled is NULL.\r
+  @retval EFI_INVALID_PARAMETER Pending is NULL.\r
+  @retval EFI_INVALID_PARAMETER Time is NULL.\r
   @retval EFI_DEVICE_ERROR      The wakeup time could not be retrieved due to a hardware error.\r
-                                                                    \r
-**/    \r
+  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this platform.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_GET_WAKEUP_TIME) (\r
+(EFIAPI *EFI_GET_WAKEUP_TIME)(\r
   OUT BOOLEAN                     *Enabled,\r
   OUT BOOLEAN                     *Pending,\r
   OUT EFI_TIME                    *Time\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Sets the system wakeup alarm clock time.\r
-  \r
-  @param  Enabled               Enable or disable the wakeup alarm.  \r
-  @param  Time                  If Enable is TRUE, the time to set the wakeup alarm for.\r
-                                                                    \r
+\r
+  @param[in]  Enable            Enable or disable the wakeup alarm.\r
+  @param[in]  Time              If Enable is TRUE, the time to set the wakeup alarm for.\r
+                                If Enable is FALSE, then this parameter is optional, and may be NULL.\r
+\r
   @retval EFI_SUCCESS           If Enable is TRUE, then the wakeup alarm was enabled. If\r
-                                Enable is FALSE, then the wakeup alarm was disabled.    \r
+                                Enable is FALSE, then the wakeup alarm was disabled.\r
   @retval EFI_INVALID_PARAMETER A time field is out of range.\r
   @retval EFI_DEVICE_ERROR      The wakeup time could not be set due to a hardware error.\r
   @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this platform.\r
-                                                                    \r
-**/    \r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_SET_WAKEUP_TIME) (\r
+(EFIAPI *EFI_SET_WAKEUP_TIME)(\r
   IN  BOOLEAN                      Enable,\r
   IN  EFI_TIME                     *Time   OPTIONAL\r
   );\r
 \r
-/**                                                                 \r
-  This is the declaration of an EFI image entry point. This can be the entry point to an application\r
-  written to this specification, an EFI boot service driver, or an EFI runtime driver.                \r
-  \r
-  @param  ImageHandle           Handle that identifies the loaded image.\r
-  @param  SystemTable           System Table for this image.\r
-                                                                    \r
-  @retval EFI_SUCCESS           The operation completed successfully.                                     \r
-  \r
-**/    \r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_IMAGE_ENTRY_POINT) (\r
-  IN  EFI_HANDLE                   ImageHandle,\r
-  IN  EFI_SYSTEM_TABLE             *SystemTable\r
-  );\r
-\r
-/**                                                                 \r
+/**\r
   Loads an EFI image into memory.\r
-  \r
-  @param  BootPolicy            If TRUE, indicates that the request originates from the boot\r
-                                manager, and that the boot manager is attempting to load    \r
-                                FilePath as a boot selection. Ignored if SourceBuffer is    \r
-                                not NULL.                                                   \r
-  @param  ParentImageHandle     The caller's image handle.\r
-  @param  FilePath              The DeviceHandle specific file path from which the image is\r
-                                loaded.                                                     \r
-  @param  SourceBuffer          If not NULL, a pointer to the memory location containing a copy\r
-                                of the image to be loaded.                                     \r
-  @param  SourceSize            The size in bytes of SourceBuffer.  \r
-  @param  ImageHandle           Pointer to the returned image handle that is created when the\r
-                                image is successfully loaded.                                \r
-                                                                                 \r
-  @retval EFI_SUCCESS           Image was loaded into memory correctly.\r
-  @retval EFI_NOT_FOUND         Both SourceBuffer and FilePath are NULL.\r
-  @retval EFI_INVALID_PARAMETER One or more parametes are invalid.\r
-  @retval EFI_UNSUPPORTED       The image type is not supported.\r
-  @retval EFI_OUT_OF_RESOURCES  Image was not loaded due to insufficient resources.\r
-  @retval EFI_LOAD_ERROR        Image was not loaded because the image format was corrupt or not\r
-                                understood.                                                     \r
-  @retval EFI_DEVICE_ERROR      Image was not loaded because the device returned a read error.                          \r
-  \r
-**/    \r
+\r
+  @param[in]   BootPolicy        If TRUE, indicates that the request originates from the boot\r
+                                 manager, and that the boot manager is attempting to load\r
+                                 FilePath as a boot selection. Ignored if SourceBuffer is\r
+                                 not NULL.\r
+  @param[in]   ParentImageHandle The caller's image handle.\r
+  @param[in]   DevicePath        The DeviceHandle specific file path from which the image is\r
+                                 loaded.\r
+  @param[in]   SourceBuffer      If not NULL, a pointer to the memory location containing a copy\r
+                                 of the image to be loaded.\r
+  @param[in]   SourceSize        The size in bytes of SourceBuffer. Ignored if SourceBuffer is NULL.\r
+  @param[out]  ImageHandle       The pointer to the returned image handle that is created when the\r
+                                 image is successfully loaded.\r
+\r
+  @retval EFI_SUCCESS            Image was loaded into memory correctly.\r
+  @retval EFI_NOT_FOUND          Both SourceBuffer and DevicePath are NULL.\r
+  @retval EFI_INVALID_PARAMETER  One or more parametes are invalid.\r
+  @retval EFI_UNSUPPORTED        The image type is not supported.\r
+  @retval EFI_OUT_OF_RESOURCES   Image was not loaded due to insufficient resources.\r
+  @retval EFI_LOAD_ERROR         Image was not loaded because the image format was corrupt or not\r
+                                 understood.\r
+  @retval EFI_DEVICE_ERROR       Image was not loaded because the device returned a read error.\r
+  @retval EFI_ACCESS_DENIED      Image was not loaded because the platform policy prohibits the \r
+                                 image from being loaded. NULL is returned in *ImageHandle.\r
+  @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a \r
+                                 valid EFI_LOADED_IMAGE_PROTOCOL. However, the current \r
+                                 platform policy specifies that the image should not be started.\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_IMAGE_LOAD) (\r
+(EFIAPI *EFI_IMAGE_LOAD)(\r
   IN  BOOLEAN                      BootPolicy,\r
   IN  EFI_HANDLE                   ParentImageHandle,\r
-  IN  EFI_DEVICE_PATH_PROTOCOL     *FilePath,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL     *DevicePath,\r
   IN  VOID                         *SourceBuffer OPTIONAL,\r
   IN  UINTN                        SourceSize,\r
   OUT EFI_HANDLE                   *ImageHandle\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Transfers control to a loaded image's entry point.\r
-  \r
-  @param  ImageHandle           Handle of image to be started.  \r
-  @param  ExitDataSize          Pointer to the size, in bytes, of ExitData.\r
-  @param  ExitData              Pointer to a pointer to a data buffer that includes a Null-terminated\r
-                                Unicode string, optionally followed by additional binary data.       \r
-                                                                                  \r
-  @retval EFI_INVALID_PARAMETER ImageHandle is either an invalid image handle or the image\r
-                                has already been initialized with StartImage\r
-  @retval Exit code from image  Exit code from image\r
-  \r
-**/    \r
+\r
+  @param[in]   ImageHandle       Handle of image to be started.\r
+  @param[out]  ExitDataSize      The pointer to the size, in bytes, of ExitData.\r
+  @param[out]  ExitData          The pointer to a pointer to a data buffer that includes a Null-terminated\r
+                                 string, optionally followed by additional binary data.\r
+\r
+  @retval EFI_INVALID_PARAMETER  ImageHandle is either an invalid image handle or the image\r
+                                 has already been initialized with StartImage.\r
+  @retval EFI_SECURITY_VIOLATION The current platform policy specifies that the image should not be started.\r
+  @return Exit code from image\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_IMAGE_START) (\r
+(EFIAPI *EFI_IMAGE_START)(\r
   IN  EFI_HANDLE                  ImageHandle,\r
   OUT UINTN                       *ExitDataSize,\r
   OUT CHAR16                      **ExitData    OPTIONAL\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Terminates a loaded EFI image and returns control to boot services.\r
-  \r
-  @param  ImageHandle           Handle that identifies the image.\r
-  @param  ExitStatus            The image's exit code.\r
-  @param  ExitDataSize          The size, in bytes, of ExitData.\r
-  @param  ExitData              Pointer to a data buffer that includes a Null-terminated Unicode string,                    \r
-                                optionally followed by additional binary data.                                                                            \r
-                                \r
-  @retval EFI_SUCCESS           The image specified by ImageHandle was unloaded.  \r
+\r
+  @param[in]  ImageHandle       Handle that identifies the image. This parameter is passed to the \r
+                                image on entry.\r
+  @param[in]  ExitStatus        The image's exit code.\r
+  @param[in]  ExitDataSize      The size, in bytes, of ExitData. Ignored if ExitStatus is EFI_SUCCESS.\r
+  @param[in]  ExitData          The pointer to a data buffer that includes a Null-terminated string,\r
+                                optionally followed by additional binary data. The string is a \r
+                                description that the caller may use to further indicate the reason \r
+                                for the image's exit. ExitData is only valid if ExitStatus \r
+                                is something other than EFI_SUCCESS. The ExitData buffer \r
+                                must be allocated by calling AllocatePool().\r
+\r
+  @retval EFI_SUCCESS           The image specified by ImageHandle was unloaded.\r
   @retval EFI_INVALID_PARAMETER The image specified by ImageHandle has been loaded and\r
-                                started with LoadImage() and StartImage(), but the    \r
-                                image is not the currently executing image.               \r
-  \r
-**/    \r
+                                started with LoadImage() and StartImage(), but the\r
+                                image is not the currently executing image.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_EXIT) (\r
+(EFIAPI *EFI_EXIT)(\r
   IN  EFI_HANDLE                   ImageHandle,\r
   IN  EFI_STATUS                   ExitStatus,\r
   IN  UINTN                        ExitDataSize,\r
   IN  CHAR16                       *ExitData     OPTIONAL\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Unloads an image.\r
-  \r
-  @param  ImageHandle           Handle that identifies the image to be unloaded.\r
-                                \r
+\r
+  @param[in]  ImageHandle       Handle that identifies the image to be unloaded.\r
+\r
   @retval EFI_SUCCESS           The image has been unloaded.\r
   @retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.\r
-  @retval EFI_UNSUPPORTED       The image has been started, and does not support unload.\r
-  @retval                       Exit code from the image's unload handler                                \r
-  \r
-**/    \r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_IMAGE_UNLOAD) (\r
+(EFIAPI *EFI_IMAGE_UNLOAD)(\r
   IN  EFI_HANDLE                   ImageHandle\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Terminates all boot services.\r
-  \r
-  @param  ImageHandle           Handle that identifies the exiting image.\r
-  @param  MapKey                Key to the latest memory map.\r
-                                \r
+\r
+  @param[in]  ImageHandle       Handle that identifies the exiting image.\r
+  @param[in]  MapKey            Key to the latest memory map.\r
+\r
   @retval EFI_SUCCESS           Boot services have been terminated.\r
-  @retval EFI_INVALID_PARAMETER MapKey is incorrect.  \r
-  \r
-**/  \r
+  @retval EFI_INVALID_PARAMETER MapKey is incorrect.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_EXIT_BOOT_SERVICES) (\r
+(EFIAPI *EFI_EXIT_BOOT_SERVICES)(\r
   IN  EFI_HANDLE                   ImageHandle,\r
   IN  UINTN                        MapKey\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Induces a fine-grained stall.\r
-  \r
-  @param  Microseconds          The number of microseconds to stall execution.  \r
-                                \r
+\r
+  @param[in]  Microseconds      The number of microseconds to stall execution.\r
+\r
   @retval EFI_SUCCESS           Execution was stalled at least the requested number of\r
-                                Microseconds.  \r
-  \r
-**/  \r
+                                Microseconds.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_STALL) (\r
+(EFIAPI *EFI_STALL)(\r
   IN  UINTN                    Microseconds\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Sets the system's watchdog timer.\r
-  \r
-  @param  Timeout               The number of seconds to set the watchdog timer to.\r
-  @param  WatchdogCode          The numeric code to log on a watchdog timer timeout event.\r
-  @param  DataSize              The size, in bytes, of WatchdogData.\r
-  @param  WatchdogData          A data buffer that includes a Null-terminated Unicode string, optionally\r
-                                followed by additional binary data.                                       \r
-                                \r
+\r
+  @param[in]  Timeout           The number of seconds to set the watchdog timer to.\r
+  @param[in]  WatchdogCode      The numeric code to log on a watchdog timer timeout event.\r
+  @param[in]  DataSize          The size, in bytes, of WatchdogData.\r
+  @param[in]  WatchdogData      A data buffer that includes a Null-terminated string, optionally\r
+                                followed by additional binary data.\r
+\r
   @retval EFI_SUCCESS           The timeout has been set.\r
-  @retval EFI_INVALID_PARAMETER The supplied WatchdogCode is invalid.                               \r
+  @retval EFI_INVALID_PARAMETER The supplied WatchdogCode is invalid.\r
   @retval EFI_UNSUPPORTED       The system does not have a watchdog timer.\r
-  @retval EFI_DEVICE_ERROR      The watch dog timer could not be programmed due to a hardware\r
-                                error.                                                       \r
-                                \r
-**/  \r
+  @retval EFI_DEVICE_ERROR      The watchdog timer could not be programmed due to a hardware\r
+                                error.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_SET_WATCHDOG_TIMER) (\r
+(EFIAPI *EFI_SET_WATCHDOG_TIMER)(\r
   IN UINTN                    Timeout,\r
   IN UINT64                   WatchdogCode,\r
   IN UINTN                    DataSize,\r
   IN CHAR16                   *WatchdogData OPTIONAL\r
   );\r
 \r
-typedef enum {\r
-  EfiResetCold,\r
-  EfiResetWarm,\r
-  EfiResetShutdown,\r
-#if ((EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))\r
-  //\r
-  // Tiano extension for capsules that was removed after UEFI 2.0 came out\r
-  //\r
-  EfiResetUpdate\r
-#endif\r
-} EFI_RESET_TYPE;\r
-\r
-/**                                                                 \r
+/**\r
   Resets the entire platform.\r
-  \r
-  @param  ResetType             The type of reset to perform.\r
-  @param  ResetStatus           The status code for the reset.\r
-  @param  DataSize              The size, in bytes, of WatchdogData.\r
-  @param  ResetData             For a ResetType of EfiResetCold, EfiResetWarm, or             \r
-                                EfiResetShutdown the data buffer starts with a Null-terminated\r
-                                Unicode string, optionally followed by additional binary data.\r
 \r
-**/  \r
+  @param[in]  ResetType         The type of reset to perform.\r
+  @param[in]  ResetStatus       The status code for the reset.\r
+  @param[in]  DataSize          The size, in bytes, of ResetData.\r
+  @param[in]  ResetData         For a ResetType of EfiResetCold, EfiResetWarm, or\r
+                                EfiResetShutdown the data buffer starts with a Null-terminated\r
+                                string, optionally followed by additional binary data.\r
+                                The string is a description that the caller may use to further\r
+                                indicate the reason for the system reset. ResetData is only\r
+                                valid if ResetStatus is something other than EFI_SUCCESS\r
+                                unless the ResetType is EfiResetPlatformSpecific\r
+                                where a minimum amount of ResetData is always required.\r
+**/\r
 typedef\r
 VOID\r
-(EFIAPI *EFI_RESET_SYSTEM) (\r
+(EFIAPI *EFI_RESET_SYSTEM)(\r
   IN EFI_RESET_TYPE           ResetType,\r
   IN EFI_STATUS               ResetStatus,\r
   IN UINTN                    DataSize,\r
-  IN CHAR16                   *ResetData OPTIONAL\r
+  IN VOID                     *ResetData OPTIONAL\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Returns a monotonically increasing count for the platform.\r
-  \r
-  @param  Count                 Pointer to returned value.\r
-                                \r
+\r
+  @param[out]  Count            The pointer to returned value.\r
+\r
   @retval EFI_SUCCESS           The next monotonic count was returned.\r
-  @retval EFI_INVALID_PARAMETER Count is NULL.                         \r
-  @retval EFI_DEVICE_ERROR      The device is not functioning properly.                                                  \r
-                                \r
-**/  \r
+  @retval EFI_INVALID_PARAMETER Count is NULL.\r
+  @retval EFI_DEVICE_ERROR      The device is not functioning properly.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_GET_NEXT_MONOTONIC_COUNT) (\r
+(EFIAPI *EFI_GET_NEXT_MONOTONIC_COUNT)(\r
   OUT UINT64                  *Count\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Returns the next high 32 bits of the platform's monotonic counter.\r
-  \r
-  @param  HighCount             Pointer to returned value.\r
-                                \r
+\r
+  @param[out]  HighCount        The pointer to returned value.\r
+\r
   @retval EFI_SUCCESS           The next high monotonic count was returned.\r
-  @retval EFI_INVALID_PARAMETER HighCount is NULL.                         \r
-  @retval EFI_DEVICE_ERROR      The device is not functioning properly.                                                  \r
-                                \r
-**/  \r
+  @retval EFI_INVALID_PARAMETER HighCount is NULL.\r
+  @retval EFI_DEVICE_ERROR      The device is not functioning properly.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_GET_NEXT_HIGH_MONO_COUNT) (\r
+(EFIAPI *EFI_GET_NEXT_HIGH_MONO_COUNT)(\r
   OUT UINT32                  *HighCount\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Computes and returns a 32-bit CRC for a data buffer.\r
-  \r
-  @param  Data                  A pointer to the buffer on which the 32-bit CRC is to be computed.\r
-  @param  DataSize              The number of bytes in the buffer Data.\r
-  @param  Crc32                 The 32-bit CRC that was computed for the data buffer specified by Data\r
+\r
+  @param[in]   Data             A pointer to the buffer on which the 32-bit CRC is to be computed.\r
+  @param[in]   DataSize         The number of bytes in the buffer Data.\r
+  @param[out]  Crc32            The 32-bit CRC that was computed for the data buffer specified by Data\r
                                 and DataSize.\r
-                                \r
+\r
   @retval EFI_SUCCESS           The 32-bit CRC was computed for the data buffer and returned in\r
-                                Crc32.                                                           \r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.  \r
-                                \r
-**/  \r
+                                Crc32.\r
+  @retval EFI_INVALID_PARAMETER Data is NULL.\r
+  @retval EFI_INVALID_PARAMETER Crc32 is NULL.\r
+  @retval EFI_INVALID_PARAMETER DataSize is 0.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_CALCULATE_CRC32) (\r
+(EFIAPI *EFI_CALCULATE_CRC32)(\r
   IN  VOID                              *Data,\r
   IN  UINTN                             DataSize,\r
   OUT UINT32                            *Crc32\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Copies the contents of one buffer to another buffer.\r
-  \r
-  @param  Destination           Pointer to the destination buffer of the memory copy.\r
-  @param  Source                Pointer to the source buffer of the memory copy.\r
-  @param  Length                Number of bytes to copy from Source to Destination.                                \r
-                                \r
-**/  \r
+\r
+  @param[in]  Destination       The pointer to the destination buffer of the memory copy.\r
+  @param[in]  Source            The pointer to the source buffer of the memory copy.\r
+  @param[in]  Length            Number of bytes to copy from Source to Destination.\r
+\r
+**/\r
 typedef\r
 VOID\r
-(EFIAPI *EFI_COPY_MEM) (\r
+(EFIAPI *EFI_COPY_MEM)(\r
   IN VOID     *Destination,\r
   IN VOID     *Source,\r
   IN UINTN    Length\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   The SetMem() function fills a buffer with a specified value.\r
-  \r
-  @param  Buffer                Pointer to the buffer to fill.\r
-  @param  Size                  Number of bytes in Buffer to fill.\r
-  @param  Value                 Value to fill Buffer with.\r
-                                \r
-**/  \r
+\r
+  @param[in]  Buffer            The pointer to the buffer to fill.\r
+  @param[in]  Size              Number of bytes in Buffer to fill.\r
+  @param[in]  Value             Value to fill Buffer with.\r
+\r
+**/\r
 typedef\r
 VOID\r
-(EFIAPI *EFI_SET_MEM) (\r
+(EFIAPI *EFI_SET_MEM)(\r
   IN VOID     *Buffer,\r
   IN UINTN    Size,\r
   IN UINT8    Value\r
   );\r
 \r
-//\r
-// Protocol handler functions\r
-//\r
+///\r
+/// Enumeration of EFI Interface Types\r
+///\r
 typedef enum {\r
+  ///\r
+  /// Indicates that the supplied protocol interface is supplied in native form.\r
+  ///\r
   EFI_NATIVE_INTERFACE\r
 } EFI_INTERFACE_TYPE;\r
 \r
-/**                                                                 \r
+/**\r
   Installs a protocol interface on a device handle. If the handle does not exist, it is created and added\r
-  to the list of handles in the system. InstallMultipleProtocolInterfaces() performs                     \r
-  more error checking than InstallProtocolInterface(), so it is recommended that                         \r
-  InstallMultipleProtocolInterfaces() be used in place of                                                \r
-  InstallProtocolInterface()                                                                             \r
-  \r
-  @param  Handle                A pointer to the EFI_HANDLE on which the interface is to be installed.\r
-  @param  Protocol              The numeric ID of the protocol interface.\r
-  @param  InterfaceType         Indicates whether Interface is supplied in native form.                                \r
-  @param  Interface             A pointer to the protocol interface.\r
-                                \r
+  to the list of handles in the system. InstallMultipleProtocolInterfaces() performs\r
+  more error checking than InstallProtocolInterface(), so it is recommended that\r
+  InstallMultipleProtocolInterfaces() be used in place of\r
+  InstallProtocolInterface()\r
+\r
+  @param[in, out]  Handle         A pointer to the EFI_HANDLE on which the interface is to be installed.\r
+  @param[in]       Protocol       The numeric ID of the protocol interface.\r
+  @param[in]       InterfaceType  Indicates whether Interface is supplied in native form.\r
+  @param[in]       Interface      A pointer to the protocol interface.\r
+\r
   @retval EFI_SUCCESS           The protocol interface was installed.\r
-  @retval EFI_OUT_OF_RESOURCES  Space for a new handle could not be allocated.                            \r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.  \r
-                                \r
-**/  \r
+  @retval EFI_OUT_OF_RESOURCES  Space for a new handle could not be allocated.\r
+  @retval EFI_INVALID_PARAMETER Handle is NULL.\r
+  @retval EFI_INVALID_PARAMETER Protocol is NULL.\r
+  @retval EFI_INVALID_PARAMETER InterfaceType is not EFI_NATIVE_INTERFACE.\r
+  @retval EFI_INVALID_PARAMETER Protocol is already installed on the handle specified by Handle.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_INSTALL_PROTOCOL_INTERFACE) (\r
+(EFIAPI *EFI_INSTALL_PROTOCOL_INTERFACE)(\r
   IN OUT EFI_HANDLE               *Handle,\r
   IN     EFI_GUID                 *Protocol,\r
   IN     EFI_INTERFACE_TYPE       InterfaceType,\r
   IN     VOID                     *Interface\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Installs one or more protocol interfaces into the boot services environment.\r
-  \r
-  @param  Handle                The handle to install the new protocol interfaces on, or NULL if a new\r
-                                handle is to be allocated.                                                                            \r
+\r
+  @param[in, out]  Handle       The pointer to a handle to install the new protocol interfaces on,\r
+                                or a pointer to NULL if a new handle is to be allocated.\r
   @param  ...                   A variable argument list containing pairs of protocol GUIDs and protocol\r
-                                interfaces.                                                               \r
+                                interfaces.\r
 \r
   @retval EFI_SUCCESS           All the protocol interface was installed.\r
   @retval EFI_OUT_OF_RESOURCES  There was not enough memory in pool to install all the protocols.\r
   @retval EFI_ALREADY_STARTED   A Device Path Protocol instance was passed in that is already present in\r
                                 the handle database.\r
-    \r
-**/  \r
+  @retval EFI_INVALID_PARAMETER Handle is NULL.\r
+  @retval EFI_INVALID_PARAMETER Protocol is already installed on the handle specified by Handle.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES) (\r
+(EFIAPI *EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES)(\r
   IN OUT EFI_HANDLE           *Handle,\r
   ...\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Reinstalls a protocol interface on a device handle.\r
-  \r
-  @param  Handle                Handle on which the interface is to be reinstalled.                                                                                   \r
-  @param  Protocol              The numeric ID of the interface.\r
-  @param  OldInterface          A pointer to the old interface. NULL can be used if a structure is not\r
-                                associated with Protocol.                                             \r
-  @param  NewInterface          A pointer to the new interface.                      \r
-  \r
+\r
+  @param[in]  Handle            Handle on which the interface is to be reinstalled.\r
+  @param[in]  Protocol          The numeric ID of the interface.\r
+  @param[in]  OldInterface      A pointer to the old interface. NULL can be used if a structure is not\r
+                                associated with Protocol.\r
+  @param[in]  NewInterface      A pointer to the new interface.\r
+\r
   @retval EFI_SUCCESS           The protocol interface was reinstalled.\r
   @retval EFI_NOT_FOUND         The OldInterface on the handle was not found.\r
   @retval EFI_ACCESS_DENIED     The protocol interface could not be reinstalled,\r
-                                because OldInterface is still being used by a   \r
-                                driver that will not release it.                \r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.                                \r
-    \r
-**/  \r
+                                because OldInterface is still being used by a\r
+                                driver that will not release it.\r
+  @retval EFI_INVALID_PARAMETER Handle is NULL.\r
+  @retval EFI_INVALID_PARAMETER Protocol is NULL.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_REINSTALL_PROTOCOL_INTERFACE) (\r
+(EFIAPI *EFI_REINSTALL_PROTOCOL_INTERFACE)(\r
   IN EFI_HANDLE               Handle,\r
   IN EFI_GUID                 *Protocol,\r
   IN VOID                     *OldInterface,\r
   IN VOID                     *NewInterface\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Removes a protocol interface from a device handle. It is recommended that\r
-  UninstallMultipleProtocolInterfaces() be used in place of                \r
-  UninstallProtocolInterface().                                            \r
-  \r
-  @param  Handle                The handle on which the interface was installed.\r
-  @param  Protocol              The numeric ID of the interface.\r
-  @param  Interface             A pointer to the interface.                      \r
-  \r
+  UninstallMultipleProtocolInterfaces() be used in place of\r
+  UninstallProtocolInterface().\r
+\r
+  @param[in]  Handle            The handle on which the interface was installed.\r
+  @param[in]  Protocol          The numeric ID of the interface.\r
+  @param[in]  Interface         A pointer to the interface.\r
+\r
   @retval EFI_SUCCESS           The interface was removed.\r
   @retval EFI_NOT_FOUND         The interface was not found.\r
   @retval EFI_ACCESS_DENIED     The interface was not removed because the interface\r
-                                is still being used by a driver.                                                                                               \r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.                                \r
-    \r
-**/  \r
+                                is still being used by a driver.\r
+  @retval EFI_INVALID_PARAMETER Handle is NULL.\r
+  @retval EFI_INVALID_PARAMETER Protocol is NULL.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_UNINSTALL_PROTOCOL_INTERFACE) (\r
+(EFIAPI *EFI_UNINSTALL_PROTOCOL_INTERFACE)(\r
   IN EFI_HANDLE               Handle,\r
   IN EFI_GUID                 *Protocol,\r
   IN VOID                     *Interface\r
   );\r
 \r
-/**                                                                 \r
-  Removes one or more protocol interfaces into the boot services environment.                                      \r
-  \r
-  @param  Handle                The handle to remove the protocol interfaces from.  \r
+/**\r
+  Removes one or more protocol interfaces into the boot services environment.\r
+\r
+  @param[in]  Handle            The handle to remove the protocol interfaces from.\r
   @param  ...                   A variable argument list containing pairs of protocol GUIDs and\r
                                 protocol interfaces.\r
-  \r
-  @retval EFI_SUCCESS           All the protocol interfaces were removed.                                                                                        \r
-  @retval EFI_INVALID_PARAMETER One of the protocol interfaces was not previously installed on Handle.                          \r
-    \r
-**/  \r
+\r
+  @retval EFI_SUCCESS           All the protocol interfaces were removed.\r
+  @retval EFI_INVALID_PARAMETER One of the protocol interfaces was not previously installed on Handle.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES) (\r
+(EFIAPI *EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES)(\r
   IN EFI_HANDLE           Handle,\r
   ...\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Queries a handle to determine if it supports a specified protocol.\r
-  \r
-  @param  Handle                The handle being queried.\r
-  @param  Protocol              The published unique identifier of the protocol.\r
-  @param  Interface             Supplies the address where a pointer to the corresponding Protocol\r
-                                Interface is returned.                                            \r
+\r
+  @param[in]   Handle           The handle being queried.\r
+  @param[in]   Protocol         The published unique identifier of the protocol.\r
+  @param[out]  Interface        Supplies the address where a pointer to the corresponding Protocol\r
+                                Interface is returned.\r
+\r
   @retval EFI_SUCCESS           The interface information for the specified protocol was returned.\r
   @retval EFI_UNSUPPORTED       The device does not support the specified protocol.\r
-  @retval EFI_INVALID_PARAMETER One of the protocol interfaces was not previously installed on Handle.                          \r
-    \r
-**/  \r
+  @retval EFI_INVALID_PARAMETER Handle is NULL.\r
+  @retval EFI_INVALID_PARAMETER Protocol is NULL.\r
+  @retval EFI_INVALID_PARAMETER Interface is NULL.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_HANDLE_PROTOCOL) (\r
+(EFIAPI *EFI_HANDLE_PROTOCOL)(\r
   IN  EFI_HANDLE               Handle,\r
   IN  EFI_GUID                 *Protocol,\r
   OUT VOID                     **Interface\r
@@ -1193,74 +1272,78 @@ EFI_STATUS
 #define EFI_OPEN_PROTOCOL_BY_DRIVER           0x00000010\r
 #define EFI_OPEN_PROTOCOL_EXCLUSIVE           0x00000020\r
 \r
-/**                                                                 \r
+/**\r
   Queries a handle to determine if it supports a specified protocol. If the protocol is supported by the\r
   handle, it opens the protocol on behalf of the calling agent.\r
-    \r
-  @param  Handle                The handle for the protocol interface that is being opened.\r
-  @param  Protocol              The published unique identifier of the protocol.\r
-  @param  Interface             Supplies the address where a pointer to the corresponding Protocol\r
-                                Interface is returned.                                            \r
-  @param  AgentHandle           The handle of the agent that is opening the protocol interface\r
-                                specified by Protocol and Interface.                            \r
-  @param  ControllerHandle      If the agent that is opening a protocol is a driver that follows the                          \r
-                                UEFI Driver Model, then this parameter is the controller handle     \r
-                                that requires the protocol interface. If the agent does not follow  \r
-                                the UEFI Driver Model, then this parameter is optional and may      \r
-                                be NULL.                                                            \r
-  @param  Attributes            The open mode of the protocol interface specified by Handle                    \r
-                                and Protocol.             \r
-                                                                 \r
+\r
+  @param[in]   Handle           The handle for the protocol interface that is being opened.\r
+  @param[in]   Protocol         The published unique identifier of the protocol.\r
+  @param[out]  Interface        Supplies the address where a pointer to the corresponding Protocol\r
+                                Interface is returned.\r
+  @param[in]   AgentHandle      The handle of the agent that is opening the protocol interface\r
+                                specified by Protocol and Interface.\r
+  @param[in]   ControllerHandle If the agent that is opening a protocol is a driver that follows the\r
+                                UEFI Driver Model, then this parameter is the controller handle\r
+                                that requires the protocol interface. If the agent does not follow\r
+                                the UEFI Driver Model, then this parameter is optional and may\r
+                                be NULL.\r
+  @param[in]   Attributes       The open mode of the protocol interface specified by Handle\r
+                                and Protocol.\r
+\r
   @retval EFI_SUCCESS           An item was added to the open list for the protocol interface, and the\r
-                                protocol interface was returned in Interface.                         \r
+                                protocol interface was returned in Interface.\r
   @retval EFI_UNSUPPORTED       Handle does not support Protocol.\r
   @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
   @retval EFI_ACCESS_DENIED     Required attributes can't be supported in current environment.\r
   @retval EFI_ALREADY_STARTED   Item on the open list already has requierd attributes whose agent\r
-                                handle is the same as AgentHandle.                                \r
-    \r
-**/  \r
+                                handle is the same as AgentHandle.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_OPEN_PROTOCOL) (\r
+(EFIAPI *EFI_OPEN_PROTOCOL)(\r
   IN  EFI_HANDLE                Handle,\r
   IN  EFI_GUID                  *Protocol,\r
-  OUT VOID                      **Interface,\r
+  OUT VOID                      **Interface, OPTIONAL\r
   IN  EFI_HANDLE                AgentHandle,\r
-  IN  EFI_HANDLE                ControllerHandle, OPTIONAL\r
+  IN  EFI_HANDLE                ControllerHandle,\r
   IN  UINT32                    Attributes\r
   );\r
 \r
-  \r
-/**                                                                 \r
+\r
+/**\r
   Closes a protocol on a handle that was opened using OpenProtocol().\r
-    \r
-  @param  Handle                The handle for the protocol interface that was previously opened\r
-                                with OpenProtocol(), and is now being closed.                   \r
-  @param  Protocol              The published unique identifier of the protocol.\r
-  @param  Interface             Supplies the address where a pointer to the corresponding Protocol\r
-                                Interface is returned.                                            \r
-  @param  AgentHandle           The handle of the agent that is closing the protocol interface.                                 \r
-  @param  ControllerHandle      If the agent that opened a protocol is a driver that follows the\r
-                                UEFI Driver Model, then this parameter is the controller handle \r
-                                that required the protocol interface.                           \r
-                                                                 \r
-  @retval EFI_SUCCESS           The protocol instance was closed.                                  \r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.  \r
+\r
+  @param[in]  Handle            The handle for the protocol interface that was previously opened\r
+                                with OpenProtocol(), and is now being closed.\r
+  @param[in]  Protocol          The published unique identifier of the protocol.\r
+  @param[in]  AgentHandle       The handle of the agent that is closing the protocol interface.\r
+  @param[in]  ControllerHandle  If the agent that opened a protocol is a driver that follows the\r
+                                UEFI Driver Model, then this parameter is the controller handle\r
+                                that required the protocol interface.\r
+\r
+  @retval EFI_SUCCESS           The protocol instance was closed.\r
+  @retval EFI_INVALID_PARAMETER 1) Handle is NULL.\r
+                                2) AgentHandle is NULL.\r
+                                3) ControllerHandle is not NULL and ControllerHandle is not a valid EFI_HANDLE.\r
+                                4) Protocol is NULL.\r
   @retval EFI_NOT_FOUND         1) Handle does not support the protocol specified by Protocol.\r
                                 2) The protocol interface specified by Handle and Protocol is not\r
-                                   currently open by AgentHandle and ControllerHandle.           \r
-                                   \r
-**/  \r
+                                   currently open by AgentHandle and ControllerHandle.\r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_CLOSE_PROTOCOL) (\r
+(EFIAPI *EFI_CLOSE_PROTOCOL)(\r
   IN EFI_HANDLE               Handle,\r
   IN EFI_GUID                 *Protocol,\r
   IN EFI_HANDLE               AgentHandle,\r
   IN EFI_HANDLE               ControllerHandle\r
   );\r
 \r
+///\r
+/// EFI Oprn Protocol Information Entry\r
+///\r
 typedef struct {\r
   EFI_HANDLE  AgentHandle;\r
   EFI_HANDLE  ControllerHandle;\r
@@ -1268,104 +1351,126 @@ typedef struct {
   UINT32      OpenCount;\r
 } EFI_OPEN_PROTOCOL_INFORMATION_ENTRY;\r
 \r
-/**                                                                 \r
+/**\r
   Retrieves the list of agents that currently have a protocol interface opened.\r
-    \r
-  @param  Handle                The handle for the protocol interface that is being queried.                                    \r
-  @param  Protocol              The published unique identifier of the protocol.\r
-  @param  EntryBuffer           A pointer to a buffer of open protocol information in the form of\r
-                                EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.                  \r
-  @param  EntryCount            A pointer to the number of entries in EntryBuffer.\r
-                                                                 \r
+\r
+  @param[in]   Handle           The handle for the protocol interface that is being queried.\r
+  @param[in]   Protocol         The published unique identifier of the protocol.\r
+  @param[out]  EntryBuffer      A pointer to a buffer of open protocol information in the form of\r
+                                EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.\r
+  @param[out]  EntryCount       A pointer to the number of entries in EntryBuffer.\r
+\r
   @retval EFI_SUCCESS           The open protocol information was returned in EntryBuffer, and the\r
-                                number of entries was returned EntryCount.                        \r
+                                number of entries was returned EntryCount.\r
   @retval EFI_OUT_OF_RESOURCES  There are not enough resources available to allocate EntryBuffer.\r
   @retval EFI_NOT_FOUND         Handle does not support the protocol specified by Protocol.\r
-                                   \r
-**/  \r
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_OPEN_PROTOCOL_INFORMATION) (\r
+(EFIAPI *EFI_OPEN_PROTOCOL_INFORMATION)(\r
   IN  EFI_HANDLE                          Handle,\r
   IN  EFI_GUID                            *Protocol,\r
-  IN  EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,\r
+  OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,\r
   OUT UINTN                               *EntryCount\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated\r
-  from pool.                                                                                           \r
-  \r
-  @param  Handle                The handle from which to retrieve the list of protocol interface\r
-                                GUIDs.                                                            \r
-  @param  ProtocolBuffer        A pointer to the list of protocol interface GUID pointers that are\r
-                                installed on Handle.                                                    \r
-  @param  ProtocolBufferCount   A pointer to the number of GUID pointers present in \r
-                                ProtocolBuffer.                                      \r
-                                \r
+  from pool.\r
+\r
+  @param[in]   Handle              The handle from which to retrieve the list of protocol interface\r
+                                   GUIDs.\r
+  @param[out]  ProtocolBuffer      A pointer to the list of protocol interface GUID pointers that are\r
+                                   installed on Handle.\r
+  @param[out]  ProtocolBufferCount A pointer to the number of GUID pointers present in\r
+                                   ProtocolBuffer.\r
+\r
   @retval EFI_SUCCESS           The list of protocol interface GUIDs installed on Handle was returned in\r
-                                ProtocolBuffer. The number of protocol interface GUIDs was              \r
-                                returned in ProtocolBufferCount.                                        \r
+                                ProtocolBuffer. The number of protocol interface GUIDs was\r
+                                returned in ProtocolBufferCount.\r
   @retval EFI_OUT_OF_RESOURCES  There is not enough pool memory to store the results.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
-                                   \r
+  @retval EFI_INVALID_PARAMETER Handle is NULL.\r
+  @retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER ProtocolBuffer is NULL.\r
+  @retval EFI_INVALID_PARAMETER ProtocolBufferCount is NULL.\r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_PROTOCOLS_PER_HANDLE) (\r
+(EFIAPI *EFI_PROTOCOLS_PER_HANDLE)(\r
   IN  EFI_HANDLE      Handle,\r
   OUT EFI_GUID        ***ProtocolBuffer,\r
   OUT UINTN           *ProtocolBufferCount\r
   );\r
 \r
-/**                                                                 \r
-  Creates an event that is to be signaled whenever an interface is installed for a specified protocol.  \r
-  \r
-  @param  Protocol              The numeric ID of the protocol for which the event is to be registered.                                \r
-  @param  Event                 Event that is to be signaled whenever a protocol interface is registered\r
-                                for Protocol.                                                           \r
-  @param  Registration          A pointer to a memory location to receive the registration value.                                \r
-                                \r
-  @retval EFI_SUCCESS           The notification event has been registered.                                                                \r
+/**\r
+  Creates an event that is to be signaled whenever an interface is installed for a specified protocol.\r
+\r
+  @param[in]   Protocol         The numeric ID of the protocol for which the event is to be registered.\r
+  @param[in]   Event            Event that is to be signaled whenever a protocol interface is registered\r
+                                for Protocol.\r
+  @param[out]  Registration     A pointer to a memory location to receive the registration value.\r
+\r
+  @retval EFI_SUCCESS           The notification event has been registered.\r
   @retval EFI_OUT_OF_RESOURCES  Space for the notification event could not be allocated.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
-                                   \r
+  @retval EFI_INVALID_PARAMETER Protocol is NULL.\r
+  @retval EFI_INVALID_PARAMETER Event is NULL.\r
+  @retval EFI_INVALID_PARAMETER Registration is NULL.\r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_REGISTER_PROTOCOL_NOTIFY) (\r
+(EFIAPI *EFI_REGISTER_PROTOCOL_NOTIFY)(\r
   IN  EFI_GUID                 *Protocol,\r
   IN  EFI_EVENT                Event,\r
   OUT VOID                     **Registration\r
   );\r
 \r
+///\r
+/// Enumeration of EFI Locate Search Types\r
+///\r
 typedef enum {\r
+  ///\r
+  /// Retrieve all the handles in the handle database.\r
+  ///\r
   AllHandles,\r
+  ///\r
+  /// Retrieve the next handle fron a RegisterProtocolNotify() event.\r
+  ///\r
   ByRegisterNotify,\r
+  ///\r
+  /// Retrieve the set of handles from the handle database that support a \r
+  /// specified protocol.\r
+  ///\r
   ByProtocol\r
 } EFI_LOCATE_SEARCH_TYPE;\r
 \r
-/**                                                                 \r
+/**\r
   Returns an array of handles that support a specified protocol.\r
-  \r
-  @param  SearchType            Specifies which handle(s) are to be returned.\r
-  @param  Protocol              Specifies the protocol to search by.\r
-  @param  SearchKey             Specifies the search key.                \r
-  @param  BufferSize            On input, the size in bytes of Buffer. On output, the size in bytes of     \r
-                                the array returned in Buffer (if the buffer was large enough) or the       \r
+\r
+  @param[in]       SearchType   Specifies which handle(s) are to be returned.\r
+  @param[in]       Protocol     Specifies the protocol to search by.\r
+  @param[in]       SearchKey    Specifies the search key.\r
+  @param[in, out]  BufferSize   On input, the size in bytes of Buffer. On output, the size in bytes of\r
+                                the array returned in Buffer (if the buffer was large enough) or the\r
                                 size, in bytes, of the buffer needed to obtain the array (if the buffer was\r
-                                not large enough).                                                             \r
-  @param  Buffer                The buffer in which the array is returned.\r
-                                \r
+                                not large enough).\r
+  @param[out]      Buffer       The buffer in which the array is returned.\r
+\r
   @retval EFI_SUCCESS           The array of handles was returned.\r
   @retval EFI_NOT_FOUND         No handles match the search.\r
-  @retval EFI_BUFFER_TOO_SMALL  The BufferSize is too small for the result.  \r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
-                                   \r
+  @retval EFI_BUFFER_TOO_SMALL  The BufferSize is too small for the result.\r
+  @retval EFI_INVALID_PARAMETER SearchType is not a member of EFI_LOCATE_SEARCH_TYPE.\r
+  @retval EFI_INVALID_PARAMETER SearchType is ByRegisterNotify and SearchKey is NULL.\r
+  @retval EFI_INVALID_PARAMETER SearchType is ByProtocol and Protocol is NULL.\r
+  @retval EFI_INVALID_PARAMETER One or more matches are found and BufferSize is NULL.\r
+  @retval EFI_INVALID_PARAMETER BufferSize is large enough for the result and Buffer is NULL.\r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_LOCATE_HANDLE) (\r
+(EFIAPI *EFI_LOCATE_HANDLE)(\r
   IN     EFI_LOCATE_SEARCH_TYPE   SearchType,\r
   IN     EFI_GUID                 *Protocol,    OPTIONAL\r
   IN     VOID                     *SearchKey,   OPTIONAL\r
@@ -1373,80 +1478,72 @@ EFI_STATUS
   OUT    EFI_HANDLE               *Buffer\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Locates the handle to a device on the device path that supports the specified protocol.\r
-    \r
-  @param  Protocol              Specifies the protocol to search for.\r
-  @param  DevicePath            On input, a pointer to a pointer to the device path. On output, the device\r
-                                path pointer is modified to point to the remaining part of the device     \r
-                                path.                                                                        \r
-  @param  Device                A pointer to the returned device handle.  \r
-                                \r
+\r
+  @param[in]       Protocol     Specifies the protocol to search for.\r
+  @param[in, out]  DevicePath   On input, a pointer to a pointer to the device path. On output, the device\r
+                                path pointer is modified to point to the remaining part of the device\r
+                                path.\r
+  @param[out]      Device       A pointer to the returned device handle.\r
+\r
   @retval EFI_SUCCESS           The resulting handle was returned.\r
-  @retval EFI_NOT_FOUND         No handles match the search.  \r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
-                                   \r
+  @retval EFI_NOT_FOUND         No handles match the search.\r
+  @retval EFI_INVALID_PARAMETER Protocol is NULL.\r
+  @retval EFI_INVALID_PARAMETER DevicePath is NULL.\r
+  @retval EFI_INVALID_PARAMETER A handle matched the search and Device is NULL.\r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_LOCATE_DEVICE_PATH) (\r
+(EFIAPI *EFI_LOCATE_DEVICE_PATH)(\r
   IN     EFI_GUID                         *Protocol,\r
   IN OUT EFI_DEVICE_PATH_PROTOCOL         **DevicePath,\r
   OUT    EFI_HANDLE                       *Device\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Adds, updates, or removes a configuration table entry from the EFI System Table.\r
-    \r
-  @param  Guid                  A pointer to the GUID for the entry to add, update, or remove.\r
-  @param  Table                 A pointer to the configuration table for the entry to add, update, or\r
-                                remove. May be NULL.                                                   \r
-                                \r
+\r
+  @param[in]  Guid              A pointer to the GUID for the entry to add, update, or remove.\r
+  @param[in]  Table             A pointer to the configuration table for the entry to add, update, or\r
+                                remove. May be NULL.\r
+\r
   @retval EFI_SUCCESS           The (Guid, Table) pair was added, updated, or removed.\r
   @retval EFI_NOT_FOUND         An attempt was made to delete a nonexistent entry.\r
-  @retval EFI_INVALID_PARAMETER Guid is not valid.\r
+  @retval EFI_INVALID_PARAMETER Guid is NULL.\r
   @retval EFI_OUT_OF_RESOURCES  There is not enough memory available to complete the operation.\r
-                                   \r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_INSTALL_CONFIGURATION_TABLE) (\r
+(EFIAPI *EFI_INSTALL_CONFIGURATION_TABLE)(\r
   IN EFI_GUID                 *Guid,\r
   IN VOID                     *Table\r
   );\r
 \r
-/**                                                                 \r
-  Reserved service.\r
-                                    \r
-  @retval EFI_SUCCESS           The operation has been completed successfully.\r
-                                   \r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_RESERVED_SERVICE) (\r
-  VOID\r
-  );\r
-\r
-/**                                                                 \r
+/**\r
   Returns an array of handles that support the requested protocol in a buffer allocated from pool.\r
-  \r
-  @param  SearchType            Specifies which handle(s) are to be returned.\r
-  @param  Protocol              Specifies the protocol to search by.\r
-  @param  SearchKey             Supplies the search key depending on the SearchType.\r
-  @param  NoHandles             The number of handles returned in Buffer.\r
-  @param  Buffer                A pointer to the buffer to return the requested array of handles that\r
-                                support Protocol.                                                    \r
-                                \r
+\r
+  @param[in]       SearchType   Specifies which handle(s) are to be returned.\r
+  @param[in]       Protocol     Provides the protocol to search by.\r
+                                This parameter is only valid for a SearchType of ByProtocol.\r
+  @param[in]       SearchKey    Supplies the search key depending on the SearchType.\r
+  @param[in, out]  NoHandles    The number of handles returned in Buffer.\r
+  @param[out]      Buffer       A pointer to the buffer to return the requested array of handles that\r
+                                support Protocol.\r
+\r
   @retval EFI_SUCCESS           The array of handles was returned in Buffer, and the number of\r
-                                handles in Buffer was returned in NoHandles.                  \r
+                                handles in Buffer was returned in NoHandles.\r
   @retval EFI_NOT_FOUND         No handles match the search.\r
   @retval EFI_OUT_OF_RESOURCES  There is not enough pool memory to store the matching results.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
-                                   \r
+  @retval EFI_INVALID_PARAMETER NoHandles is NULL.\r
+  @retval EFI_INVALID_PARAMETER Buffer is NULL.\r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_LOCATE_HANDLE_BUFFER) (\r
+(EFIAPI *EFI_LOCATE_HANDLE_BUFFER)(\r
   IN     EFI_LOCATE_SEARCH_TYPE       SearchType,\r
   IN     EFI_GUID                     *Protocol,      OPTIONAL\r
   IN     VOID                         *SearchKey,     OPTIONAL\r
@@ -1454,875 +1551,617 @@ EFI_STATUS
   OUT    EFI_HANDLE                   **Buffer\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Returns the first protocol instance that matches the given protocol.\r
-    \r
-  @param  Protocol              Provides the protocol to search for.\r
-  @param  Registration          Optional registration key returned from\r
-                                RegisterProtocolNotify().              \r
-  @param  Interface             On return, a pointer to the first interface that matches Protocol and\r
-                                Registration.   \r
-                                                                                     \r
+\r
+  @param[in]  Protocol          Provides the protocol to search for.\r
+  @param[in]  Registration      Optional registration key returned from\r
+                                RegisterProtocolNotify().\r
+  @param[out]  Interface        On return, a pointer to the first interface that matches Protocol and\r
+                                Registration.\r
+\r
   @retval EFI_SUCCESS           A protocol instance matching Protocol was found and returned in\r
-                                Interface.                                                     \r
+                                Interface.\r
   @retval EFI_NOT_FOUND         No protocol instances were found that match Protocol and\r
-                                Registration.                                            \r
+                                Registration.\r
   @retval EFI_INVALID_PARAMETER Interface is NULL.\r
-                                   \r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_LOCATE_PROTOCOL) (\r
+(EFIAPI *EFI_LOCATE_PROTOCOL)(\r
   IN  EFI_GUID  *Protocol,\r
   IN  VOID      *Registration, OPTIONAL\r
   OUT VOID      **Interface\r
   );\r
 \r
+///\r
+/// EFI Capsule Block Descriptor\r
+///\r
 typedef struct {\r
-  UINT64                            Length;\r
+  ///\r
+  /// Length in bytes of the data pointed to by DataBlock/ContinuationPointer.\r
+  ///\r
+  UINT64                  Length;\r
   union {\r
+    ///\r
+    /// Physical address of the data block. This member of the union is\r
+    /// used if Length is not equal to zero.\r
+    ///\r
     EFI_PHYSICAL_ADDRESS  DataBlock;\r
+    ///\r
+    /// Physical address of another block of\r
+    /// EFI_CAPSULE_BLOCK_DESCRIPTOR structures. This\r
+    /// member of the union is used if Length is equal to zero. If\r
+    /// ContinuationPointer is zero this entry represents the end of the list.\r
+    ///\r
     EFI_PHYSICAL_ADDRESS  ContinuationPointer;\r
   } Union;\r
-} UEFI_CAPSULE_BLOCK_DESCRIPTOR;\r
+} EFI_CAPSULE_BLOCK_DESCRIPTOR;\r
 \r
+///\r
+/// EFI Capsule Header.\r
+///\r
 typedef struct {\r
+  ///\r
+  /// A GUID that defines the contents of a capsule.\r
+  ///\r
   EFI_GUID          CapsuleGuid;\r
+  ///\r
+  /// The size of the capsule header. This may be larger than the size of\r
+  /// the EFI_CAPSULE_HEADER since CapsuleGuid may imply\r
+  /// extended header entries\r
+  ///\r
   UINT32            HeaderSize;\r
+  ///\r
+  /// Bit-mapped list describing the capsule attributes. The Flag values\r
+  /// of 0x0000 - 0xFFFF are defined by CapsuleGuid. Flag values\r
+  /// of 0x10000 - 0xFFFFFFFF are defined by this specification\r
+  ///\r
   UINT32            Flags;\r
+  ///\r
+  /// Size in bytes of the capsule.\r
+  ///\r
   UINT32            CapsuleImageSize;\r
-} UEFI_CAPSULE_HEADER;\r
+} EFI_CAPSULE_HEADER;\r
+\r
+///\r
+/// The EFI System Table entry must point to an array of capsules\r
+/// that contain the same CapsuleGuid value. The array must be\r
+/// prefixed by a UINT32 that represents the size of the array of capsules.\r
+///\r
+typedef struct {\r
+  ///\r
+  /// the size of the array of capsules.\r
+  ///\r
+  UINT32   CapsuleArrayNumber;\r
+  ///\r
+  /// Point to an array of capsules that contain the same CapsuleGuid value.\r
+  ///\r
+  VOID*    CapsulePtr[1];\r
+} EFI_CAPSULE_TABLE;\r
 \r
 #define CAPSULE_FLAGS_PERSIST_ACROSS_RESET          0x00010000\r
 #define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE         0x00020000\r
+#define CAPSULE_FLAGS_INITIATE_RESET                0x00040000\r
 \r
-/**                                                                 \r
+/**\r
   Passes capsules to the firmware with both virtual and physical mapping. Depending on the intended\r
-  consumption, the firmware may process the capsule immediately. If the payload should persist     \r
-  across a system reset, the reset value returned from EFI_QueryCapsuleCapabilities must           \r
-  be passed into ResetSystem() and will cause the capsule to be processed by the firmware as       \r
-  part of the reset process.                                                                       \r
-    \r
-  @param  CapsuleHeaderArray    Virtual pointer to an array of virtual pointers to the capsules\r
-                                being passed into update capsule.                              \r
-  @param  CapsuleCount          Number of pointers to EFI_CAPSULE_HEADER in\r
-                                CaspuleHeaderArray.                        \r
-  @param  ScatterGatherList     Physical pointer to a set of                   \r
-                                EFI_CAPSULE_BLOCK_DESCRIPTOR that describes the\r
-                                location in physical memory of a set of capsules.\r
-                                                                                   \r
-  @retval EFI_SUCCESS           Valid capsule was passed. If                     \r
+  consumption, the firmware may process the capsule immediately. If the payload should persist\r
+  across a system reset, the reset value returned from EFI_QueryCapsuleCapabilities must\r
+  be passed into ResetSystem() and will cause the capsule to be processed by the firmware as\r
+  part of the reset process.\r
+\r
+  @param[in]  CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules\r
+                                 being passed into update capsule.\r
+  @param[in]  CapsuleCount       Number of pointers to EFI_CAPSULE_HEADER in\r
+                                 CaspuleHeaderArray.\r
+  @param[in]  ScatterGatherList  Physical pointer to a set of\r
+                                 EFI_CAPSULE_BLOCK_DESCRIPTOR that describes the\r
+                                 location in physical memory of a set of capsules.\r
+\r
+  @retval EFI_SUCCESS           Valid capsule was passed. If\r
                                 CAPSULE_FLAGS_PERSIT_ACROSS_RESET is not set, the\r
                                 capsule has been successfully processed by the firmware.\r
-  @retval EFI_DEVICE_ERROR      The capsule update was started, but failed due to a device error.                                \r
-  @retval EFI_INVALID_PARAMETER CapsuleSize is NULL.\r
-                                   \r
+  @retval EFI_INVALID_PARAMETER CapsuleSize is NULL, or an incompatible set of flags were\r
+                                set in the capsule header.\r
+  @retval EFI_INVALID_PARAMETER CapsuleCount is 0.\r
+  @retval EFI_DEVICE_ERROR      The capsule update was started, but failed due to a device error.\r
+  @retval EFI_UNSUPPORTED       The capsule type is not supported on this platform.\r
+  @retval EFI_OUT_OF_RESOURCES  When ExitBootServices() has been previously called this error indicates the capsule \r
+                                is compatible with this platform but is not capable of being submitted or processed \r
+                                in runtime. The caller may resubmit the capsule prior to ExitBootServices().\r
+  @retval EFI_OUT_OF_RESOURCES  When ExitBootServices() has not been previously called then this error indicates \r
+                                the capsule is compatible with this platform but there are insufficient resources to process.\r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_UPDATE_CAPSULE) (\r
-  IN UEFI_CAPSULE_HEADER    **CapsuleHeaderArray,\r
+(EFIAPI *EFI_UPDATE_CAPSULE)(\r
+  IN EFI_CAPSULE_HEADER     **CapsuleHeaderArray,\r
   IN UINTN                  CapsuleCount,\r
   IN EFI_PHYSICAL_ADDRESS   ScatterGatherList   OPTIONAL\r
   );\r
 \r
-/**                                                                 \r
+/**\r
   Returns if the capsule can be supported via UpdateCapsule().\r
-    \r
-  @param  CapsuleHeaderArray    Virtual pointer to an array of virtual pointers to the capsules\r
-                                being passed into update capsule.                              \r
-  @param  CapsuleCount          Number of pointers to EFI_CAPSULE_HEADER in\r
-                                CaspuleHeaderArray.                        \r
-  @param  MaxiumCapsuleSize     On output the maximum size that UpdateCapsule() can\r
-                                support as an argument to UpdateCapsule() via      \r
-                                CapsuleHeaderArray and ScatterGatherList.            \r
-  @param  ResetType             Returns the type of reset required for the capsule update.                                \r
-                                                                                   \r
-  @retval EFI_SUCCESS           Valid answer returned.                                                                \r
+\r
+  @param[in]   CapsuleHeaderArray  Virtual pointer to an array of virtual pointers to the capsules\r
+                                   being passed into update capsule.\r
+  @param[in]   CapsuleCount        Number of pointers to EFI_CAPSULE_HEADER in\r
+                                   CaspuleHeaderArray.\r
+  @param[out]  MaxiumCapsuleSize   On output the maximum size that UpdateCapsule() can\r
+                                   support as an argument to UpdateCapsule() via\r
+                                   CapsuleHeaderArray and ScatterGatherList.\r
+  @param[out]  ResetType           Returns the type of reset required for the capsule update.\r
+\r
+  @retval EFI_SUCCESS           Valid answer returned.\r
   @retval EFI_UNSUPPORTED       The capsule type is not supported on this platform, and\r
-                                MaximumCapsuleSize and ResetType are undefined.        \r
+                                MaximumCapsuleSize and ResetType are undefined.\r
   @retval EFI_INVALID_PARAMETER MaximumCapsuleSize is NULL.\r
-                                   \r
+  @retval EFI_OUT_OF_RESOURCES  When ExitBootServices() has been previously called this error indicates the capsule \r
+                                is compatible with this platform but is not capable of being submitted or processed \r
+                                in runtime. The caller may resubmit the capsule prior to ExitBootServices().\r
+  @retval EFI_OUT_OF_RESOURCES  When ExitBootServices() has not been previously called then this error indicates \r
+                                the capsule is compatible with this platform but there are insufficient resources to process.\r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_QUERY_CAPSULE_CAPABILITIES) (\r
-  IN  UEFI_CAPSULE_HEADER    **CapsuleHeaderArray,\r
+(EFIAPI *EFI_QUERY_CAPSULE_CAPABILITIES)(\r
+  IN  EFI_CAPSULE_HEADER     **CapsuleHeaderArray,\r
   IN  UINTN                  CapsuleCount,\r
   OUT UINT64                 *MaximumCapsuleSize,\r
   OUT EFI_RESET_TYPE         *ResetType\r
   );\r
 \r
-/**                                                                                                    \r
+/**\r
   Returns information about the EFI variables.\r
-                                                                                                       \r
-  @param  Attributes                   Attributes bitmask to specify the type of variables on\r
-                                       which to return information.                          \r
-  @param  MaximumVariableStorageSize   On output the maximum size of the storage space    \r
-                                       available for the EFI variables associated with the\r
-                                       attributes specified.                              \r
-  @param  RemainingVariableStorageSize Returns the remaining size of the storage space    \r
-                                       available for the EFI variables associated with the\r
-                                       attributes specified.                                \r
-  @param  MaximumVariableSize          Returns the maximum size of the individual EFI                        \r
-                                       variables associated with the attributes specified.                                                                \r
-                                       \r
-  @retval EFI_SUCCESS                  Valid answer returned.                                   \r
-  @retval EFI_INVALID_PARAMETER        An invalid combination of attribute bits was supplied                 \r
+\r
+  @param[in]   Attributes                   Attributes bitmask to specify the type of variables on\r
+                                            which to return information.\r
+  @param[out]  MaximumVariableStorageSize   On output the maximum size of the storage space\r
+                                            available for the EFI variables associated with the\r
+                                            attributes specified.\r
+  @param[out]  RemainingVariableStorageSize Returns the remaining size of the storage space\r
+                                            available for the EFI variables associated with the\r
+                                            attributes specified.\r
+  @param[out]  MaximumVariableSize          Returns the maximum size of the individual EFI\r
+                                            variables associated with the attributes specified.\r
+\r
+  @retval EFI_SUCCESS                  Valid answer returned.\r
+  @retval EFI_INVALID_PARAMETER        An invalid combination of attribute bits was supplied\r
   @retval EFI_UNSUPPORTED              The attribute is not supported on this platform, and the\r
-                                       MaximumVariableStorageSize,                             \r
-                                       RemainingVariableStorageSize, MaximumVariableSize       \r
-                                       are undefined.                                              \r
-                                                                                                       \r
-**/                                                                                                    \r
-typedef                         \r
+                                       MaximumVariableStorageSize,\r
+                                       RemainingVariableStorageSize, MaximumVariableSize\r
+                                       are undefined.\r
+\r
+**/\r
+typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_QUERY_VARIABLE_INFO) (\r
+(EFIAPI *EFI_QUERY_VARIABLE_INFO)(\r
   IN  UINT32            Attributes,\r
   OUT UINT64            *MaximumVariableStorageSize,\r
   OUT UINT64            *RemainingVariableStorageSize,\r
   OUT UINT64            *MaximumVariableSize\r
   );\r
 \r
-\r
 //\r
-// EFI Runtime Services Table\r
+// Firmware should stop at a firmware user interface on next boot\r
 //\r
-#define EFI_1_02_SYSTEM_TABLE_REVISION  ((1 << 16) | 02)\r
-#define EFI_1_10_SYSTEM_TABLE_REVISION  ((1 << 16) | 10)\r
-#define EFI_2_00_SYSTEM_TABLE_REVISION  ((2 << 16) | 0)\r
+#define EFI_OS_INDICATIONS_BOOT_TO_FW_UI                    0x0000000000000001\r
+#define EFI_OS_INDICATIONS_TIMESTAMP_REVOCATION             0x0000000000000002\r
+#define EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED  0x0000000000000004\r
+#define EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED            0x0000000000000008\r
+#define EFI_OS_INDICATIONS_CAPSULE_RESULT_VAR_SUPPORTED     0x0000000000000010\r
+#define EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY          0x0000000000000040\r
 \r
-#define EFI_RUNTIME_SERVICES_SIGNATURE  0x56524553544e5552ULL\r
-#define EFI_RUNTIME_SERVICES_REVISION   (EFI_2_00_SYSTEM_TABLE_REVISION)\r
-\r
-#if (EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000)\r
 //\r
-// Include the definition for TIANO_REPORT_STATUS_CODE if this is the version\r
-//  of Tiano that extended the EFI specification. If Tiano mode is diabled\r
-//  don't include it.\r
+// EFI Runtime Services Table\r
 //\r
-#include <Dxe/ArchProtocol/StatusCode.h>\r
-#endif\r
-\r
-\r
+#define EFI_SYSTEM_TABLE_SIGNATURE      SIGNATURE_64 ('I','B','I',' ','S','Y','S','T')\r
+#define EFI_2_60_SYSTEM_TABLE_REVISION  ((2 << 16) | (60))\r
+#define EFI_2_50_SYSTEM_TABLE_REVISION  ((2 << 16) | (50))\r
+#define EFI_2_40_SYSTEM_TABLE_REVISION  ((2 << 16) | (40))\r
+#define EFI_2_31_SYSTEM_TABLE_REVISION  ((2 << 16) | (31))\r
+#define EFI_2_30_SYSTEM_TABLE_REVISION  ((2 << 16) | (30))\r
+#define EFI_2_20_SYSTEM_TABLE_REVISION  ((2 << 16) | (20))\r
+#define EFI_2_10_SYSTEM_TABLE_REVISION  ((2 << 16) | (10))\r
+#define EFI_2_00_SYSTEM_TABLE_REVISION  ((2 << 16) | (00))\r
+#define EFI_1_10_SYSTEM_TABLE_REVISION  ((1 << 16) | (10))\r
+#define EFI_1_02_SYSTEM_TABLE_REVISION  ((1 << 16) | (02))\r
+#define EFI_SYSTEM_TABLE_REVISION       EFI_2_60_SYSTEM_TABLE_REVISION\r
+#define EFI_SPECIFICATION_VERSION       EFI_SYSTEM_TABLE_REVISION\r
+\r
+#define EFI_RUNTIME_SERVICES_SIGNATURE  SIGNATURE_64 ('R','U','N','T','S','E','R','V')\r
+#define EFI_RUNTIME_SERVICES_REVISION   EFI_SPECIFICATION_VERSION\r
+\r
+///\r
+/// EFI Runtime Services Table.\r
+///\r
 typedef struct {\r
-  EFI_TABLE_HEADER              Hdr;\r
+  ///\r
+  /// The table header for the EFI Runtime Services Table.\r
+  ///\r
+  EFI_TABLE_HEADER                Hdr;\r
 \r
   //\r
-  // Time services\r
+  // Time Services\r
   //\r
-  EFI_GET_TIME                  GetTime;\r
-  EFI_SET_TIME                  SetTime;\r
-  EFI_GET_WAKEUP_TIME           GetWakeupTime;\r
-  EFI_SET_WAKEUP_TIME           SetWakeupTime;\r
+  EFI_GET_TIME                    GetTime;\r
+  EFI_SET_TIME                    SetTime;\r
+  EFI_GET_WAKEUP_TIME             GetWakeupTime;\r
+  EFI_SET_WAKEUP_TIME             SetWakeupTime;\r
 \r
   //\r
-  // Virtual memory services\r
+  // Virtual Memory Services\r
   //\r
-  EFI_SET_VIRTUAL_ADDRESS_MAP   SetVirtualAddressMap;\r
-  EFI_CONVERT_POINTER           ConvertPointer;\r
+  EFI_SET_VIRTUAL_ADDRESS_MAP     SetVirtualAddressMap;\r
+  EFI_CONVERT_POINTER             ConvertPointer;\r
 \r
   //\r
-  // Variable services\r
+  // Variable Services\r
   //\r
-  EFI_GET_VARIABLE              GetVariable;\r
-  EFI_GET_NEXT_VARIABLE_NAME    GetNextVariableName;\r
-  EFI_SET_VARIABLE              SetVariable;\r
+  EFI_GET_VARIABLE                GetVariable;\r
+  EFI_GET_NEXT_VARIABLE_NAME      GetNextVariableName;\r
+  EFI_SET_VARIABLE                SetVariable;\r
 \r
   //\r
-  // Misc\r
+  // Miscellaneous Services\r
   //\r
-  EFI_GET_NEXT_HIGH_MONO_COUNT  GetNextHighMonotonicCount;\r
-  EFI_RESET_SYSTEM              ResetSystem;\r
+  EFI_GET_NEXT_HIGH_MONO_COUNT    GetNextHighMonotonicCount;\r
+  EFI_RESET_SYSTEM                ResetSystem;\r
 \r
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
   //\r
-  // New Boot Services added by UEFI 2.0\r
+  // UEFI 2.0 Capsule Services\r
   //\r
   EFI_UPDATE_CAPSULE              UpdateCapsule;\r
   EFI_QUERY_CAPSULE_CAPABILITIES  QueryCapsuleCapabilities;\r
-  EFI_QUERY_VARIABLE_INFO         QueryVariableInfo;\r
-#elif (EDK_RELEASE_VERSION != 0)\r
+\r
   //\r
-  // Tiano extension to EFI 1.10 runtime table\r
-  //  It was moved to a protocol to not conflict with UEFI 2.0\r
-  //  If Tiano is disabled this item is not enabled for EFI 1.10\r
+  // Miscellaneous UEFI 2.0 Service\r
   //\r
-  EFI_REPORT_STATUS_CODE        ReportStatusCode;\r
-#endif\r
+  EFI_QUERY_VARIABLE_INFO         QueryVariableInfo;\r
 } EFI_RUNTIME_SERVICES;\r
 \r
-//\r
-// EFI Boot Services Table\r
-//\r
-#define EFI_BOOT_SERVICES_SIGNATURE 0x56524553544f4f42ULL\r
-#define EFI_BOOT_SERVICES_REVISION  (EFI_2_00_SYSTEM_TABLE_REVISION)\r
 \r
+#define EFI_BOOT_SERVICES_SIGNATURE   SIGNATURE_64 ('B','O','O','T','S','E','R','V')\r
+#define EFI_BOOT_SERVICES_REVISION    EFI_SPECIFICATION_VERSION\r
+\r
+///\r
+/// EFI Boot Services Table.\r
+///\r
 typedef struct {\r
-  EFI_TABLE_HEADER                            Hdr;\r
+  ///\r
+  /// The table header for the EFI Boot Services Table.\r
+  ///\r
+  EFI_TABLE_HEADER                Hdr;\r
 \r
   //\r
-  // Task priority functions\r
+  // Task Priority Services\r
   //\r
-  EFI_RAISE_TPL                               RaiseTPL;\r
-  EFI_RESTORE_TPL                             RestoreTPL;\r
+  EFI_RAISE_TPL                   RaiseTPL;\r
+  EFI_RESTORE_TPL                 RestoreTPL;\r
 \r
   //\r
-  // Memory functions\r
+  // Memory Services\r
   //\r
-  EFI_ALLOCATE_PAGES                          AllocatePages;\r
-  EFI_FREE_PAGES                              FreePages;\r
-  EFI_GET_MEMORY_MAP                          GetMemoryMap;\r
-  EFI_ALLOCATE_POOL                           AllocatePool;\r
-  EFI_FREE_POOL                               FreePool;\r
+  EFI_ALLOCATE_PAGES              AllocatePages;\r
+  EFI_FREE_PAGES                  FreePages;\r
+  EFI_GET_MEMORY_MAP              GetMemoryMap;\r
+  EFI_ALLOCATE_POOL               AllocatePool;\r
+  EFI_FREE_POOL                   FreePool;\r
 \r
   //\r
-  // Event & timer functions\r
+  // Event & Timer Services\r
   //\r
-  EFI_CREATE_EVENT                            CreateEvent;\r
-  EFI_SET_TIMER                               SetTimer;\r
-  EFI_WAIT_FOR_EVENT                          WaitForEvent;\r
-  EFI_SIGNAL_EVENT                            SignalEvent;\r
-  EFI_CLOSE_EVENT                             CloseEvent;\r
-  EFI_CHECK_EVENT                             CheckEvent;\r
+  EFI_CREATE_EVENT                  CreateEvent;\r
+  EFI_SET_TIMER                     SetTimer;\r
+  EFI_WAIT_FOR_EVENT                WaitForEvent;\r
+  EFI_SIGNAL_EVENT                  SignalEvent;\r
+  EFI_CLOSE_EVENT                   CloseEvent;\r
+  EFI_CHECK_EVENT                   CheckEvent;\r
 \r
   //\r
-  // Protocol handler functions\r
+  // Protocol Handler Services\r
   //\r
-  EFI_INSTALL_PROTOCOL_INTERFACE              InstallProtocolInterface;\r
-  EFI_REINSTALL_PROTOCOL_INTERFACE            ReinstallProtocolInterface;\r
-  EFI_UNINSTALL_PROTOCOL_INTERFACE            UninstallProtocolInterface;\r
-  EFI_HANDLE_PROTOCOL                         HandleProtocol;\r
-  VOID                                        *Reserved;\r
-  EFI_REGISTER_PROTOCOL_NOTIFY                RegisterProtocolNotify;\r
-  EFI_LOCATE_HANDLE                           LocateHandle;\r
-  EFI_LOCATE_DEVICE_PATH                      LocateDevicePath;\r
-  EFI_INSTALL_CONFIGURATION_TABLE             InstallConfigurationTable;\r
+  EFI_INSTALL_PROTOCOL_INTERFACE    InstallProtocolInterface;\r
+  EFI_REINSTALL_PROTOCOL_INTERFACE  ReinstallProtocolInterface;\r
+  EFI_UNINSTALL_PROTOCOL_INTERFACE  UninstallProtocolInterface;\r
+  EFI_HANDLE_PROTOCOL               HandleProtocol;\r
+  VOID                              *Reserved;\r
+  EFI_REGISTER_PROTOCOL_NOTIFY      RegisterProtocolNotify;\r
+  EFI_LOCATE_HANDLE                 LocateHandle;\r
+  EFI_LOCATE_DEVICE_PATH            LocateDevicePath;\r
+  EFI_INSTALL_CONFIGURATION_TABLE   InstallConfigurationTable;\r
 \r
   //\r
-  // Image functions\r
+  // Image Services\r
   //\r
-  EFI_IMAGE_LOAD                              LoadImage;\r
-  EFI_IMAGE_START                             StartImage;\r
-  EFI_EXIT                                    Exit;\r
-  EFI_IMAGE_UNLOAD                            UnloadImage;\r
-  EFI_EXIT_BOOT_SERVICES                      ExitBootServices;\r
+  EFI_IMAGE_LOAD                    LoadImage;\r
+  EFI_IMAGE_START                   StartImage;\r
+  EFI_EXIT                          Exit;\r
+  EFI_IMAGE_UNLOAD                  UnloadImage;\r
+  EFI_EXIT_BOOT_SERVICES            ExitBootServices;\r
 \r
   //\r
-  // Misc functions\r
+  // Miscellaneous Services\r
   //\r
-  EFI_GET_NEXT_MONOTONIC_COUNT                GetNextMonotonicCount;\r
-  EFI_STALL                                   Stall;\r
-  EFI_SET_WATCHDOG_TIMER                      SetWatchdogTimer;\r
+  EFI_GET_NEXT_MONOTONIC_COUNT      GetNextMonotonicCount;\r
+  EFI_STALL                         Stall;\r
+  EFI_SET_WATCHDOG_TIMER            SetWatchdogTimer;\r
 \r
-  //\r
-  // ////////////////////////////////////////////////////\r
-  // EFI 1.1 Services\r
-    //////////////////////////////////////////////////////\r
   //\r
   // DriverSupport Services\r
   //\r
-  EFI_CONNECT_CONTROLLER                      ConnectController;\r
-  EFI_DISCONNECT_CONTROLLER                   DisconnectController;\r
+  EFI_CONNECT_CONTROLLER            ConnectController;\r
+  EFI_DISCONNECT_CONTROLLER         DisconnectController;\r
 \r
   //\r
-  // Added Open and Close protocol for the new driver model\r
+  // Open and Close Protocol Services\r
   //\r
-  EFI_OPEN_PROTOCOL                           OpenProtocol;\r
-  EFI_CLOSE_PROTOCOL                          CloseProtocol;\r
-  EFI_OPEN_PROTOCOL_INFORMATION               OpenProtocolInformation;\r
+  EFI_OPEN_PROTOCOL                 OpenProtocol;\r
+  EFI_CLOSE_PROTOCOL                CloseProtocol;\r
+  EFI_OPEN_PROTOCOL_INFORMATION     OpenProtocolInformation;\r
 \r
   //\r
-  // Added new services to EFI 1.1 as Lib to reduce code size.\r
+  // Library Services\r
   //\r
-  EFI_PROTOCOLS_PER_HANDLE                    ProtocolsPerHandle;\r
-  EFI_LOCATE_HANDLE_BUFFER                    LocateHandleBuffer;\r
-  EFI_LOCATE_PROTOCOL                         LocateProtocol;\r
-\r
+  EFI_PROTOCOLS_PER_HANDLE          ProtocolsPerHandle;\r
+  EFI_LOCATE_HANDLE_BUFFER          LocateHandleBuffer;\r
+  EFI_LOCATE_PROTOCOL               LocateProtocol;\r
   EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES    InstallMultipleProtocolInterfaces;\r
   EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES  UninstallMultipleProtocolInterfaces;\r
 \r
   //\r
-  // CRC32 services\r
-  //\r
-  EFI_CALCULATE_CRC32                         CalculateCrc32;\r
-\r
-  //\r
-  // Memory Utility Services\r
+  // 32-bit CRC Services\r
   //\r
-  EFI_COPY_MEM                                CopyMem;\r
-  EFI_SET_MEM                                 SetMem;\r
+  EFI_CALCULATE_CRC32               CalculateCrc32;\r
 \r
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
   //\r
-  // UEFI 2.0 Extension to the table\r
+  // Miscellaneous Services\r
   //\r
-  EFI_CREATE_EVENT_EX                         CreateEventEx;\r
-#endif\r
+  EFI_COPY_MEM                      CopyMem;\r
+  EFI_SET_MEM                       SetMem;\r
+  EFI_CREATE_EVENT_EX               CreateEventEx;\r
 } EFI_BOOT_SERVICES;\r
 \r
-//\r
-// EFI Configuration Table\r
-//\r
+///\r
+/// Contains a set of GUID/pointer pairs comprised of the ConfigurationTable field in the\r
+/// EFI System Table.\r
+///\r
 typedef struct {\r
-  EFI_GUID  VendorGuid;\r
-  VOID      *VendorTable;\r
+  ///\r
+  /// The 128-bit GUID value that uniquely identifies the system configuration table.\r
+  ///\r
+  EFI_GUID                          VendorGuid;\r
+  ///\r
+  /// A pointer to the table associated with VendorGuid.\r
+  ///\r
+  VOID                              *VendorTable;\r
 } EFI_CONFIGURATION_TABLE;\r
 \r
-//\r
-// EFI System Table\r
-//\r
-#define EFI_SYSTEM_TABLE_SIGNATURE      0x5453595320494249ULL\r
-#define EFI_SYSTEM_TABLE_REVISION       (EFI_2_00_SYSTEM_TABLE_REVISION)\r
-\r
-struct _EFI_SYSTEM_TABLE {\r
-  EFI_TABLE_HEADER              Hdr;\r
-\r
-  CHAR16                        *FirmwareVendor;\r
-  UINT32                        FirmwareRevision;\r
-\r
-  EFI_HANDLE                    ConsoleInHandle;\r
-  EFI_SIMPLE_TEXT_IN_PROTOCOL   *ConIn;\r
-\r
-  EFI_HANDLE                    ConsoleOutHandle;\r
-  EFI_SIMPLE_TEXT_OUT_PROTOCOL  *ConOut;\r
-\r
-  EFI_HANDLE                    StandardErrorHandle;\r
-  EFI_SIMPLE_TEXT_OUT_PROTOCOL  *StdErr;\r
-\r
-  EFI_RUNTIME_SERVICES          *RuntimeServices;\r
-  EFI_BOOT_SERVICES             *BootServices;\r
-\r
-  UINTN                         NumberOfTableEntries;\r
-  EFI_CONFIGURATION_TABLE       *ConfigurationTable;\r
-\r
-};\r
-\r
-//\r
-// Device Path information\r
-//\r
-\r
-#pragma pack(1)\r
-\r
-//\r
-// Hardware Device Paths\r
-//\r
-#define HARDWARE_DEVICE_PATH      0x01\r
-\r
-#define HW_PCI_DP                 0x01\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  UINT8                           Function;\r
-  UINT8                           Device;\r
-} PCI_DEVICE_PATH;\r
-\r
-#define HW_PCCARD_DP              0x02\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  UINT8                           FunctionNumber;\r
-} PCCARD_DEVICE_PATH;\r
-\r
-#define HW_MEMMAP_DP              0x03\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  UINT32                          MemoryType;\r
-  EFI_PHYSICAL_ADDRESS            StartingAddress;\r
-  EFI_PHYSICAL_ADDRESS            EndingAddress;\r
-} MEMMAP_DEVICE_PATH;\r
-\r
-#define HW_VENDOR_DP              0x04\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  EFI_GUID                        Guid;\r
-} VENDOR_DEVICE_PATH;\r
-\r
-#define HW_CONTROLLER_DP          0x05\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  UINT32                          ControllerNumber;\r
-} CONTROLLER_DEVICE_PATH;\r
-\r
-//\r
-// ACPI Device Paths\r
-//\r
-#define ACPI_DEVICE_PATH          0x02\r
-\r
-#define ACPI_DP                   0x01\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  UINT32                          HID;\r
-  UINT32                          UID;\r
-} ACPI_HID_DEVICE_PATH;\r
-\r
-#define ACPI_EXTENDED_DP          0x02\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  UINT32                          HID;\r
-  UINT32                          UID;\r
-  UINT32                          CID;\r
-  //\r
-  // Optional variable length _HIDSTR\r
-  // Optional variable length _UIDSTR\r
-  //\r
-} ACPI_EXTENDED_HID_DEVICE_PATH;\r
-\r
-//\r
-//  EISA ID Macro\r
-//  EISA ID Definition 32-bits\r
-//   bits[15:0] - three character compressed ASCII EISA ID.\r
-//   bits[31:16] - binary number\r
-//    Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'\r
-//\r
-#define PNP_EISA_ID_CONST         0x41d0\r
-#define EISA_ID(_Name, _Num)      ((UINT32) ((_Name) | (_Num) << 16))\r
-#define EISA_PNP_ID(_PNPId)       (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))\r
-#define EFI_PNP_ID(_PNPId)        (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))\r
-\r
-#define PNP_EISA_ID_MASK          0xffff\r
-#define EISA_ID_TO_NUM(_Id)       ((_Id) >> 16)\r
-\r
-\r
-#define ACPI_ADR_DP               0x03\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  UINT32                          ADR;\r
-} ACPI_ADR_DEVICE_PATH;\r
-\r
-\r
-//\r
-// Messaging Device Paths\r
-//\r
-#define MESSAGING_DEVICE_PATH     0x03\r
-\r
-#define MSG_ATAPI_DP              0x01\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  UINT8                           PrimarySecondary;\r
-  UINT8                           SlaveMaster;\r
-  UINT16                          Lun;\r
-} ATAPI_DEVICE_PATH;\r
-\r
-#define MSG_SCSI_DP               0x02\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  UINT16                          Pun;\r
-  UINT16                          Lun;\r
-} SCSI_DEVICE_PATH;\r
-\r
-#define MSG_FIBRECHANNEL_DP       0x03\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  UINT32                          Reserved;\r
-  UINT64                          WWN;\r
-  UINT64                          Lun;\r
-} FIBRECHANNEL_DEVICE_PATH;\r
-\r
-#define MSG_1394_DP               0x04\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  UINT32                          Reserved;\r
-  UINT64                          Guid;\r
-} F1394_DEVICE_PATH;\r
-\r
-#define MSG_USB_DP                0x05\r
-typedef struct {\r
-    EFI_DEVICE_PATH_PROTOCOL      Header;\r
-    UINT8                         ParentPortNumber;\r
-    UINT8                         InterfaceNumber;\r
-} USB_DEVICE_PATH;\r
-\r
-#define MSG_USB_CLASS_DP          0x0f\r
+///\r
+/// EFI System Table\r
+///\r
 typedef struct {\r
-    EFI_DEVICE_PATH_PROTOCOL      Header;\r
-    UINT16                        VendorId;\r
-    UINT16                        ProductId;\r
-    UINT8                         DeviceClass;\r
-    UINT8                         DeviceSubClass;\r
-    UINT8                         DeviceProtocol;\r
-} USB_CLASS_DEVICE_PATH;\r
-\r
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
-#define MSG_USB_WWID_DP           0x10\r
-typedef struct {\r
-    EFI_DEVICE_PATH_PROTOCOL      Header;\r
-    UINT16                        InterfaceNumber;\r
-    UINT16                        VendorId;\r
-    UINT16                        ProductId;\r
-    // CHAR16                     SerialNumber[];\r
-} USB_WWID_DEVICE_PATH;\r
-\r
-#define MSG_DEVICE_LOGICAL_UNIT_DP  0x11\r
-typedef struct {\r
-    EFI_DEVICE_PATH_PROTOCOL      Header;\r
-    UINT8                         Lun;\r
-} DEVICE_LOGICAL_UNIT_DEVICE_PATH;\r
-#endif\r
-\r
-#define MSG_I2O_DP                0x06\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  UINT32                          Tid;\r
-} I2O_DEVICE_PATH;\r
-\r
-#define MSG_MAC_ADDR_DP           0x0b\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  EFI_MAC_ADDRESS                 MacAddress;\r
-  UINT8                           IfType;\r
-} MAC_ADDR_DEVICE_PATH;\r
-\r
-#define MSG_IPv4_DP               0x0c\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  EFI_IPv4_ADDRESS                LocalIpAddress;\r
-  EFI_IPv4_ADDRESS                RemoteIpAddress;\r
-  UINT16                          LocalPort;\r
-  UINT16                          RemotePort;\r
-  UINT16                          Protocol;\r
-  BOOLEAN                         StaticIpAddress;\r
-} IPv4_DEVICE_PATH;\r
-\r
-#define MSG_IPv6_DP               0x0d\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  EFI_IPv6_ADDRESS                LocalIpAddress;\r
-  EFI_IPv6_ADDRESS                RemoteIpAddress;\r
-  UINT16                          LocalPort;\r
-  UINT16                          RemotePort;\r
-  UINT16                          Protocol;\r
-  BOOLEAN                         StaticIpAddress;\r
-} IPv6_DEVICE_PATH;\r
-\r
-#define MSG_INFINIBAND_DP         0x09\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  UINT32                          ResourceFlags;\r
-  UINT8                           PortGid[16];\r
-  UINT64                          ServiceId;\r
-  UINT64                          TargetPortId;\r
-  UINT64                          DeviceId;\r
-} INFINIBAND_DEVICE_PATH;\r
-\r
-#define INFINIBAND_RESOURCE_FLAG_IOC_SERVICE                0x01\r
-#define INFINIBAND_RESOURCE_FLAG_EXTENDED_BOOT_ENVIRONMENT  0x02\r
-#define INFINIBAND_RESOURCE_FLAG_CONSOLE_PROTOCOL           0x04\r
-#define INFINIBAND_RESOURCE_FLAG_STORAGE_PROTOCOL           0x08\r
-#define INFINIBAND_RESOURCE_FLAG_NETWORK_PROTOCOL           0x10\r
-\r
-#define MSG_UART_DP               0x0e\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  UINT32                          Reserved;\r
-  UINT64                          BaudRate;\r
-  UINT8                           DataBits;\r
-  UINT8                           Parity;\r
-  UINT8                           StopBits;\r
-} UART_DEVICE_PATH;\r
-\r
-//\r
-// Use VENDOR_DEVICE_PATH struct\r
-//\r
-#define MSG_VENDOR_DP             0x0a\r
-\r
-#define DEVICE_PATH_MESSAGING_PC_ANSI     EFI_PC_ANSI_GUID\r
-#define DEVICE_PATH_MESSAGING_VT_100      EFI_VT_100_GUID\r
-#define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID\r
-#define DEVICE_PATH_MESSAGING_VT_UTF8     EFI_VT_UTF8_GUID\r
-\r
-#define DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL   EFI_UART_DEVICE_PATH_GUID\r
-\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  EFI_GUID                        Guid;\r
-  UINT32                          FlowControlMap;\r
-} UART_FLOW_CONTROL_DEVICE_PATH;\r
-\r
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
-\r
-#define DEVICE_PATH_MESSAGING_SAS                 EFI_SAS_DEVICE_PATH_GUID\r
-\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  EFI_GUID                        Guid;\r
-  UINT32                          Reserved;\r
-  UINT64                          SasAddress;\r
-  UINT64                          Lun;\r
-  UINT16                          DeviceTopology;\r
-  UINT16                          RelativeTargetPort;\r
-} SAS_DEVICE_PATH;\r
-\r
-#define MSG_ISCSI_DP              0x13\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  UINT16                          NetworkProtocol;\r
-  UINT16                          LoginOption;\r
-  UINT16                          Reserved;\r
-  UINT16                          TargetPortalGroupTag;\r
-  UINT64                          LUN;\r
-  // CHAR8                        iSCSI Target Name\r
-} ISCSI_DEVICE_PATH;\r
-\r
-#define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST             0x0000\r
-#define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C   0x0002\r
-#define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST               0x0000\r
-#define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C     0x0008\r
-#define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP              0x0000\r
-#define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON               0x1000\r
-#define ISCSI_LOGIN_OPTION_CHAP_BI                      0x0000\r
-#define ISCSI_LOGIN_OPTION_CHAP_UNI                     0x2000\r
-\r
-#endif\r
+  ///\r
+  /// The table header for the EFI System Table.\r
+  ///\r
+  EFI_TABLE_HEADER                  Hdr;\r
+  ///\r
+  /// A pointer to a null terminated string that identifies the vendor\r
+  /// that produces the system firmware for the platform.\r
+  ///\r
+  CHAR16                            *FirmwareVendor;\r
+  ///\r
+  /// A firmware vendor specific value that identifies the revision\r
+  /// of the system firmware for the platform.\r
+  ///\r
+  UINT32                            FirmwareRevision;\r
+  ///\r
+  /// The handle for the active console input device. This handle must support\r
+  /// EFI_SIMPLE_TEXT_INPUT_PROTOCOL and EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.\r
+  ///\r
+  EFI_HANDLE                        ConsoleInHandle;\r
+  ///\r
+  /// A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL interface that is\r
+  /// associated with ConsoleInHandle.\r
+  ///\r
+  EFI_SIMPLE_TEXT_INPUT_PROTOCOL    *ConIn;\r
+  ///\r
+  /// The handle for the active console output device.\r
+  ///\r
+  EFI_HANDLE                        ConsoleOutHandle;\r
+  ///\r
+  /// A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface\r
+  /// that is associated with ConsoleOutHandle.\r
+  ///\r
+  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   *ConOut;\r
+  ///\r
+  /// The handle for the active standard error console device.\r
+  /// This handle must support the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.\r
+  ///\r
+  EFI_HANDLE                        StandardErrorHandle;\r
+  ///\r
+  /// A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface\r
+  /// that is associated with StandardErrorHandle.\r
+  ///\r
+  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   *StdErr;\r
+  ///\r
+  /// A pointer to the EFI Runtime Services Table.\r
+  ///\r
+  EFI_RUNTIME_SERVICES              *RuntimeServices;\r
+  ///\r
+  /// A pointer to the EFI Boot Services Table.\r
+  ///\r
+  EFI_BOOT_SERVICES                 *BootServices;\r
+  ///\r
+  /// The number of system configuration tables in the buffer ConfigurationTable.\r
+  ///\r
+  UINTN                             NumberOfTableEntries;\r
+  ///\r
+  /// A pointer to the system configuration tables.\r
+  /// The number of entries in the table is NumberOfTableEntries.\r
+  ///\r
+  EFI_CONFIGURATION_TABLE           *ConfigurationTable;\r
+} EFI_SYSTEM_TABLE;\r
 \r
-//\r
-// Media Device Path\r
-//\r
-#define MEDIA_DEVICE_PATH         0x04\r
-\r
-#define MEDIA_HARDDRIVE_DP        0x01\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  UINT32                          PartitionNumber;\r
-  UINT64                          PartitionStart;\r
-  UINT64                          PartitionSize;\r
-  UINT8                           Signature[16];\r
-  UINT8                           MBRType;\r
-  UINT8                           SignatureType;\r
-} HARDDRIVE_DEVICE_PATH;\r
-\r
-#define MBR_TYPE_PCAT             0x01\r
-#define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02\r
-\r
-#define SIGNATURE_TYPE_MBR        0x01\r
-#define SIGNATURE_TYPE_GUID       0x02\r
-\r
-#define MEDIA_CDROM_DP            0x02\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  UINT32                          BootEntry;\r
-  UINT64                          PartitionStart;\r
-  UINT64                          PartitionSize;\r
-} CDROM_DEVICE_PATH;\r
-\r
-//\r
-// Use VENDOR_DEVICE_PATH struct\r
-//\r
-#define MEDIA_VENDOR_DP           0x03\r
-\r
-#define MEDIA_FILEPATH_DP         0x04\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  CHAR16                          PathName[1];\r
-} FILEPATH_DEVICE_PATH;\r
-\r
-#define SIZE_OF_FILEPATH_DEVICE_PATH EFI_FIELD_OFFSET(FILEPATH_DEVICE_PATH,PathName)\r
-\r
-#define MEDIA_PROTOCOL_DP         0x05\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  EFI_GUID                        Protocol;\r
-} MEDIA_PROTOCOL_DEVICE_PATH;\r
-\r
-#if ((EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))\r
-//\r
-// Prior to UEFI 2.0 Tiano extended this enum. UEFI owns device path values\r
-// and we moved to a new GUID'ed device path for Tiano\r
-//\r
-\r
-#define MEDIA_FV_FILEPATH_DP      0x06\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL  Header;\r
-  EFI_GUID                  NameGuid;\r
-} MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;\r
-\r
-#else\r
+/**\r
+  This is the declaration of an EFI image entry point. This entry point is\r
+  the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including\r
+  both device drivers and bus drivers.\r
 \r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL  Header;\r
-  EFI_GUID                  TianoSpecificDevicePath;\r
-  UINT32                    Type;\r
-} TIANO_DEVICE_PATH;\r
+  @param[in]  ImageHandle       The firmware allocated handle for the UEFI image.\r
+  @param[in]  SystemTable       A pointer to the EFI System Table.\r
 \r
-#define TIANO_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH_TYPE         0x01\r
-typedef struct {\r
-  TIANO_DEVICE_PATH     Tiano;\r
-  EFI_GUID              NameGuid;\r
-} MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;\r
+  @retval EFI_SUCCESS           The operation completed successfully.\r
+  @retval Others                An unexpected error occurred.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_IMAGE_ENTRY_POINT)(\r
+  IN  EFI_HANDLE                   ImageHandle,\r
+  IN  EFI_SYSTEM_TABLE             *SystemTable\r
+  );\r
 \r
 //\r
-// Place holder for a future extension\r
-//\r
-#define TIANO_MEDIAFW_VOL_DEVICE_PATH_TYPE                   0x02\r
-typedef struct {\r
-  TIANO_DEVICE_PATH     Tiano;\r
-  EFI_GUID              VolumeGuid;\r
-} MEDIA_FW_VOL_DEVICE_PATH;\r
-\r
-#endif\r
-\r
-\r
+// EFI Load Option. This data structure describes format of UEFI boot option variables.\r
 //\r
-// BBS Device Path\r
+// NOTE: EFI Load Option is a byte packed buffer of variable length fields.\r
+// The first two fields have fixed length. They are declared as members of the\r
+// EFI_LOAD_OPTION structure. All the other fields are variable length fields.\r
+// They are listed in the comment block below for reference purposes.\r
 //\r
-#define BBS_DEVICE_PATH           0x05\r
-#define BBS_BBS_DP                0x01\r
-typedef struct {\r
-  EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  UINT16                          DeviceType;\r
-  UINT16                          StatusFlag;\r
-  CHAR8                           String[1];\r
-} BBS_BBS_DEVICE_PATH;\r
+#pragma pack(1)\r
+typedef struct _EFI_LOAD_OPTION {\r
+  ///\r
+  /// The attributes for this load option entry. All unused bits must be zero\r
+  /// and are reserved by the UEFI specification for future growth.\r
+  ///\r
+  UINT32                           Attributes;\r
+  ///\r
+  /// Length in bytes of the FilePathList. OptionalData starts at offset\r
+  /// sizeof(UINT32) + sizeof(UINT16) + StrSize(Description) + FilePathListLength\r
+  /// of the EFI_LOAD_OPTION descriptor.\r
+  ///\r
+  UINT16                           FilePathListLength;\r
+  ///\r
+  /// The user readable description for the load option.\r
+  /// This field ends with a Null character.\r
+  ///\r
+  // CHAR16                        Description[];\r
+  ///\r
+  /// A packed array of UEFI device paths. The first element of the array is a\r
+  /// device path that describes the device and location of the Image for this\r
+  /// load option. The FilePathList[0] is specific to the device type. Other\r
+  /// device paths may optionally exist in the FilePathList, but their usage is\r
+  /// OSV specific. Each element in the array is variable length, and ends at\r
+  /// the device path end structure. Because the size of Description is\r
+  /// arbitrary, this data structure is not guaranteed to be aligned on a\r
+  /// natural boundary. This data structure may have to be copied to an aligned\r
+  /// natural boundary before it is used.\r
+  ///\r
+  // EFI_DEVICE_PATH_PROTOCOL      FilePathList[];\r
+  ///\r
+  /// The remaining bytes in the load option descriptor are a binary data buffer\r
+  /// that is passed to the loaded image. If the field is zero bytes long, a\r
+  /// NULL pointer is passed to the loaded image. The number of bytes in\r
+  /// OptionalData can be computed by subtracting the starting offset of\r
+  /// OptionalData from total size in bytes of the EFI_LOAD_OPTION.\r
+  ///\r
+  // UINT8                         OptionalData[];\r
+} EFI_LOAD_OPTION;\r
+#pragma pack()\r
 \r
 //\r
-// DeviceType definitions - from BBS specification\r
+// EFI Load Options Attributes\r
 //\r
-#define BBS_TYPE_FLOPPY           0x01\r
-#define BBS_TYPE_HARDDRIVE        0x02\r
-#define BBS_TYPE_CDROM            0x03\r
-#define BBS_TYPE_PCMCIA           0x04\r
-#define BBS_TYPE_USB              0x05\r
-#define BBS_TYPE_EMBEDDED_NETWORK 0x06\r
-#define BBS_TYPE_BEV              0x80\r
-#define BBS_TYPE_UNKNOWN          0xFF\r
+#define LOAD_OPTION_ACTIVE              0x00000001\r
+#define LOAD_OPTION_FORCE_RECONNECT     0x00000002\r
+#define LOAD_OPTION_HIDDEN              0x00000008\r
+#define LOAD_OPTION_CATEGORY            0x00001F00\r
 \r
+#define LOAD_OPTION_CATEGORY_BOOT       0x00000000\r
+#define LOAD_OPTION_CATEGORY_APP        0x00000100\r
 \r
-//\r
-// Union of all possible Device Paths and pointers to Device Paths\r
-//\r
+#define EFI_BOOT_OPTION_SUPPORT_KEY     0x00000001\r
+#define EFI_BOOT_OPTION_SUPPORT_APP     0x00000002\r
+#define EFI_BOOT_OPTION_SUPPORT_SYSPREP 0x00000010\r
+#define EFI_BOOT_OPTION_SUPPORT_COUNT   0x00000300\r
 \r
+///\r
+/// EFI Boot Key Data\r
+///\r
 typedef union {\r
-  EFI_DEVICE_PATH_PROTOCOL             DevPath;\r
-  PCI_DEVICE_PATH                      Pci;\r
-  PCCARD_DEVICE_PATH                   PcCard;\r
-  MEMMAP_DEVICE_PATH                   MemMap;\r
-  VENDOR_DEVICE_PATH                   Vendor;\r
-\r
-  CONTROLLER_DEVICE_PATH               Controller;\r
-  ACPI_HID_DEVICE_PATH                 Acpi;\r
-\r
-  ATAPI_DEVICE_PATH                    Atapi;\r
-  SCSI_DEVICE_PATH                     Scsi;\r
-  FIBRECHANNEL_DEVICE_PATH             FibreChannel;\r
-\r
-  F1394_DEVICE_PATH                    F1394;\r
-  USB_DEVICE_PATH                      Usb;\r
-  USB_CLASS_DEVICE_PATH                UsbClass;\r
-  I2O_DEVICE_PATH                      I2O;\r
-  MAC_ADDR_DEVICE_PATH                 MacAddr;\r
-  IPv4_DEVICE_PATH                     Ipv4;\r
-  IPv6_DEVICE_PATH                     Ipv6;\r
-  INFINIBAND_DEVICE_PATH               InfiniBand;\r
-  UART_DEVICE_PATH                     Uart;\r
-\r
-  HARDDRIVE_DEVICE_PATH                HardDrive;\r
-  CDROM_DEVICE_PATH                    CD;\r
-\r
-  FILEPATH_DEVICE_PATH                 FilePath;\r
-  MEDIA_PROTOCOL_DEVICE_PATH           MediaProtocol;\r
-\r
-  BBS_BBS_DEVICE_PATH                  Bbs;\r
-} EFI_DEV_PATH;\r
-\r
-\r
-\r
-typedef union {\r
-  EFI_DEVICE_PATH_PROTOCOL             *DevPath;\r
-  PCI_DEVICE_PATH                      *Pci;\r
-  PCCARD_DEVICE_PATH                   *PcCard;\r
-  MEMMAP_DEVICE_PATH                   *MemMap;\r
-  VENDOR_DEVICE_PATH                   *Vendor;\r
-\r
-  CONTROLLER_DEVICE_PATH               *Controller;\r
-  ACPI_HID_DEVICE_PATH                 *Acpi;\r
-  ACPI_EXTENDED_HID_DEVICE_PATH        *ExtendedAcpi;\r
-\r
-  ATAPI_DEVICE_PATH                    *Atapi;\r
-  SCSI_DEVICE_PATH                     *Scsi;\r
-  FIBRECHANNEL_DEVICE_PATH             *FibreChannel;\r
-\r
-  F1394_DEVICE_PATH                    *F1394;\r
-  USB_DEVICE_PATH                      *Usb;\r
-  USB_CLASS_DEVICE_PATH                *UsbClass;\r
-  I2O_DEVICE_PATH                      *I2O;\r
-  MAC_ADDR_DEVICE_PATH                 *MacAddr;\r
-  IPv4_DEVICE_PATH                     *Ipv4;\r
-  IPv6_DEVICE_PATH                     *Ipv6;\r
-  INFINIBAND_DEVICE_PATH               *InfiniBand;\r
-  UART_DEVICE_PATH                     *Uart;\r
-\r
-  HARDDRIVE_DEVICE_PATH                *HardDrive;\r
-  CDROM_DEVICE_PATH                    *CD;\r
-\r
-  FILEPATH_DEVICE_PATH                 *FilePath;\r
-  MEDIA_PROTOCOL_DEVICE_PATH           *MediaProtocol;\r
-\r
-  BBS_BBS_DEVICE_PATH                  *Bbs;\r
-  UINT8                                *Raw;\r
-} EFI_DEV_PATH_PTR;\r
-\r
-#pragma pack()\r
-\r
-\r
-//\r
-// PXE Informations\r
-//\r
-\r
-//\r
-// Packet definitions\r
-//\r
+  struct {\r
+    ///\r
+    /// Indicates the revision of the EFI_KEY_OPTION structure. This revision level should be 0.\r
+    ///\r
+    UINT32  Revision        : 8;\r
+    ///\r
+    /// Either the left or right Shift keys must be pressed (1) or must not be pressed (0).\r
+    ///\r
+    UINT32  ShiftPressed    : 1;\r
+    ///\r
+    /// Either the left or right Control keys must be pressed (1) or must not be pressed (0).\r
+    ///\r
+    UINT32  ControlPressed  : 1;\r
+    ///\r
+    /// Either the left or right Alt keys must be pressed (1) or must not be pressed (0).\r
+    ///\r
+    UINT32  AltPressed      : 1;\r
+    ///\r
+    /// Either the left or right Logo keys must be pressed (1) or must not be pressed (0).\r
+    ///\r
+    UINT32  LogoPressed     : 1;\r
+    ///\r
+    /// The Menu key must be pressed (1) or must not be pressed (0).\r
+    ///\r
+    UINT32  MenuPressed     : 1;\r
+    ///\r
+    /// The SysReq key must be pressed (1) or must not be pressed (0).\r
+    ///\r
+    UINT32  SysReqPressed    : 1;\r
+    UINT32  Reserved        : 16;\r
+    ///\r
+    /// Specifies the actual number of entries in EFI_KEY_OPTION.Keys, from 0-3. If\r
+    /// zero, then only the shift state is considered. If more than one, then the boot option will\r
+    /// only be launched if all of the specified keys are pressed with the same shift state.\r
+    ///\r
+    UINT32  InputKeyCount   : 2;\r
+  } Options;\r
+  UINT32  PackedValue;\r
+} EFI_BOOT_KEY_DATA;\r
+\r
+///\r
+/// EFI Key Option.\r
+///\r
+#pragma pack(1)\r
 typedef struct {\r
-  UINT8   BootpOpcode;\r
-  UINT8   BootpHwType;\r
-  UINT8   BootpHwAddrLen;\r
-  UINT8   BootpGateHops;\r
-  UINT32  BootpIdent;\r
-  UINT16  BootpSeconds;\r
-  UINT16  BootpFlags;\r
-  UINT8   BootpCiAddr[4];\r
-  UINT8   BootpYiAddr[4];\r
-  UINT8   BootpSiAddr[4];\r
-  UINT8   BootpGiAddr[4];\r
-  UINT8   BootpHwAddr[16];\r
-  UINT8   BootpSrvName[64];\r
-  UINT8   BootpBootFile[128];\r
-  UINT32  DhcpMagik;\r
-  UINT8   DhcpOptions[56];\r
-} EFI_PXE_BASE_CODE_DHCPV4_PACKET;\r
-\r
-typedef union {\r
-  UINT8                           Raw[1472];\r
-  EFI_PXE_BASE_CODE_DHCPV4_PACKET Dhcpv4;\r
-\r
-  //\r
-  //  EFI_PXE_BASE_CODE_DHCPV6_PACKET     Dhcpv6;\r
-  //\r
-} EFI_PXE_BASE_CODE_PACKET;\r
-\r
-#include <Uefi/EfiPxe.h>\r
-\r
-//\r
-// EFI Revision information\r
-//\r
-#define EFI_FIRMWARE_REVISION       (EFI_2_00_SYSTEM_TABLE_REVISION)\r
-\r
-#include <Common/EfiImage.h>\r
-#include <IndustryStandard/Usb.h>\r
-\r
-\r
-#define EFI_USB_HC_RESET_GLOBAL            0x0001\r
-#define EFI_USB_HC_RESET_HOST_CONTROLLER   0x0002\r
-#define EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG 0x0004\r
-#define EFI_USB_HC_RESET_HOST_WITH_DEBUG   0x0008\r
-\r
-//\r
-// USB Host Controller state\r
-//\r
-typedef enum {\r
-  EfiUsbHcStateHalt,\r
-  EfiUsbHcStateOperational,\r
-  EfiUsbHcStateSuspend,\r
-  EfiUsbHcStateMaximum\r
-} EFI_USB_HC_STATE;\r
-\r
+  ///\r
+  /// Specifies options about how the key will be processed.\r
+  ///\r
+  EFI_BOOT_KEY_DATA  KeyData;\r
+  ///\r
+  /// The CRC-32 which should match the CRC-32 of the entire EFI_LOAD_OPTION to\r
+  /// which BootOption refers. If the CRC-32s do not match this value, then this key\r
+  /// option is ignored.\r
+  ///\r
+  UINT32             BootOptionCrc;\r
+  ///\r
+  /// The Boot#### option which will be invoked if this key is pressed and the boot option\r
+  /// is active (LOAD_OPTION_ACTIVE is set).\r
+  ///\r
+  UINT16             BootOption;\r
+  ///\r
+  /// The key codes to compare against those returned by the\r
+  /// EFI_SIMPLE_TEXT_INPUT and EFI_SIMPLE_TEXT_INPUT_EX protocols.\r
+  /// The number of key codes (0-3) is specified by the EFI_KEY_CODE_COUNT field in KeyOptions.\r
+  ///\r
+  //EFI_INPUT_KEY      Keys[];\r
+} EFI_KEY_OPTION;\r
+#pragma pack()\r
 \r
 //\r
 // EFI File location to boot from on removable media devices\r
@@ -2330,7 +2169,8 @@ typedef enum {
 #define EFI_REMOVABLE_MEDIA_FILE_NAME_IA32    L"\\EFI\\BOOT\\BOOTIA32.EFI"\r
 #define EFI_REMOVABLE_MEDIA_FILE_NAME_IA64    L"\\EFI\\BOOT\\BOOTIA64.EFI"\r
 #define EFI_REMOVABLE_MEDIA_FILE_NAME_X64     L"\\EFI\\BOOT\\BOOTX64.EFI"\r
-#define EFI_REMOVABLE_MEDIA_FILE_NAME_EBC     L"\\EFI\\BOOT\\BOOTEBC.EFI"\r
+#define EFI_REMOVABLE_MEDIA_FILE_NAME_ARM     L"\\EFI\\BOOT\\BOOTARM.EFI"\r
+#define EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64 L"\\EFI\\BOOT\\BOOTAA64.EFI"\r
 \r
 #if   defined (MDE_CPU_IA32)\r
   #define EFI_REMOVABLE_MEDIA_FILE_NAME   EFI_REMOVABLE_MEDIA_FILE_NAME_IA32\r
@@ -2339,96 +2179,16 @@ typedef enum {
 #elif defined (MDE_CPU_X64)\r
   #define EFI_REMOVABLE_MEDIA_FILE_NAME   EFI_REMOVABLE_MEDIA_FILE_NAME_X64\r
 #elif defined (MDE_CPU_EBC)\r
-  #define EFI_REMOVABLE_MEDIA_FILE_NAME   EFI_REMOVABLE_MEDIA_FILE_NAME_EBC\r
+#elif defined (MDE_CPU_ARM)\r
+  #define EFI_REMOVABLE_MEDIA_FILE_NAME   EFI_REMOVABLE_MEDIA_FILE_NAME_ARM\r
+#elif defined (MDE_CPU_AARCH64)\r
+  #define EFI_REMOVABLE_MEDIA_FILE_NAME   EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64\r
 #else\r
   #error Unknown Processor Type\r
 #endif\r
 \r
-\r
-//\r
-// Protocols from EFI 1.10 that got thier names fixed in UEFI 2.0\r
-//\r
-#include <Protocol/LoadedImage.h>\r
-#include <Protocol/SimpleTextIn.h>\r
-#include <Protocol/SimpleTextOut.h>\r
-#include <Protocol/SerialIo.h>\r
-#include <Protocol/LoadFile.h>\r
-#include <Protocol/SimpleFileSystem.h>\r
-#include <Protocol/DiskIo.h>\r
-#include <Protocol/BlockIo.h>\r
-#include <Protocol/UnicodeCollation.h>\r
-#include <Protocol/SimpleNetwork.h>\r
-#include <Protocol/EfiNetworkInterfaceIdentifier.h>\r
-#include <Protocol/PxeBaseCode.h>\r
-#include <Protocol/PxeBaseCodeCallBack.h>\r
-\r
-//\r
-// EFI 1.10 Protocols\r
-//\r
-#include <Protocol/Bis.h>\r
-#include <Protocol/BusSpecificDriverOverride.h>\r
-#include <Protocol/ComponentName.h>\r
-#include <Protocol/DebugPort.h>\r
-#include <Protocol/DebugSupport.h>\r
-#include <Protocol/Decompress.h>\r
-#include <Protocol/DriverBinding.h>\r
-#include <Protocol/DriverConfiguration.h>\r
-#include <Protocol/DriverDiagnostics.h>\r
-#include <Protocol/Ebc.h>\r
-#include <Protocol/EfiNetworkInterfaceIdentifier.h>\r
-#include <Protocol/PciIo.h>\r
-#include <Protocol/PciRootBridgeIo.h>\r
-#include <Protocol/PlatformDriverOverride.h>\r
-#include <Protocol/SimplePointer.h>\r
-#include <Protocol/ScsiPassThru.h>\r
-#include <Protocol/UsbIo.h>\r
-#include <Protocol/UsbHostController.h>\r
-#include <Protocol/UgaDraw.h>\r
-\r
-//\r
-// EFI 1.10 GUIDs\r
-//\r
-#include <Guid/Acpi.h>\r
-#include <Guid/DebugImageInfoTable.h>\r
-#include <Guid/GlobalVariable.h>\r
-#include <Guid/Gpt.h>\r
-#include <Guid/PcAnsi.h>\r
-#include <Guid/SmBios.h>\r
-#include <Guid/SalSystemTable.h>\r
-#include <Guid/FileInfo.h>\r
-#include <Guid/FileSystemInfo.h>\r
-#include <Guid/FileSystemVolumeLabelInfo.h>\r
-\r
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
-//\r
-// Turn on UEFI 2.0 Protocols and GUIDs\r
-//\r
-#include <Protocol/AuthenticationInfo.h>\r
-#include <Protocol/DevicePathUtilities.h>\r
-#include <Protocol/DevicePathToText.h>\r
-#include <Protocol/DevicePathFromText.h>\r
-#include <Protocol/GraphicsOutput.h>\r
-#include <Protocol/EdidDiscovered.h>\r
-#include <Protocol/EdidActive.h>\r
-#include <Protocol/EdidOverride.h>\r
-#include <Protocol/ScsiIoExt.h>\r
-#include <Protocol/ScsiPassThruExt.h>\r
-#include <Protocol/IScsiInitatorName.h>\r
-#include <Protocol/Usb2HostController.h>\r
-#include <Protocol/TapeIo.h>\r
-#include <Protocol/ManagedNetwork.h>\r
-#include <Protocol/Arp.h>\r
-#include <Protocol/Dhcp4.h>\r
-#include <Protocol/IP4.h>\r
-#include <Protocol/IP4Config.h>\r
-#include <Protocol/Tcp4.h>\r
-#include <Protocol/Udp4.h>\r
-#include <Protocol/Mtftp4.h>\r
-#include <Protocol/ServiceBinding.h>\r
-#include <Protocol/Hash.h>\r
-\r
-#include <Guid/EventGroup.h>\r
-#endif\r
-\r
+#include <Uefi/UefiPxe.h>\r
+#include <Uefi/UefiGpt.h>\r
+#include <Uefi/UefiInternalFormRepresentation.h>\r
 \r
 #endif\r