]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Uefi/UefiSpec.h
Grammatical and disclaimer changes (does not follow internal C coding stds.)
[mirror_edk2.git] / MdePkg / Include / Uefi / UefiSpec.h
index f43624284f942e4931b980153b05b96af5fa286e..ac1604010822b55c16ea0a94c27681ccd518057f 100644 (file)
@@ -1,20 +1,18 @@
 /** @file\r
-  Include file that supportes UEFI.\r
+  Include file that supports 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
+  This include file must only contain things defined in the UEFI 2.1 specification.\r
+  If a code construct is defined in the UEFI 2.1 specification it must be included\r
   by this include file.\r
 \r
-  Copyright (c) 2006 - 2007, 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
+Copyright (c) 2006 - 2010, 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
 #include <Protocol/SimpleTextIn.h>\r
 #include <Protocol/SimpleTextOut.h>\r
 \r
-//\r
-// Enumeration of memory allocation.\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
+// Bit definitions for EFI_TIME.Daylight\r
+//\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
-// possible caching types for the memory range\r
+// Memory cacheability attributes\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
 //\r
-// physical memory protection on range\r
+// Physical memory protection attributes\r
 //\r
 #define EFI_MEMORY_WP   0x0000000000001000ULL\r
 #define EFI_MEMORY_RP   0x0000000000002000ULL\r
 #define EFI_MEMORY_XP   0x0000000000004000ULL\r
-\r
 //\r
-// range requires a runtime mapping\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
+  ///\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
-// Build macros to find next EFI_MEMORY_DESCRIPTOR.\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
-// 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
+  @param  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
@@ -99,7 +133,7 @@ typedef struct _EFI_SYSTEM_TABLE   EFI_SYSTEM_TABLE;
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_ALLOCATE_PAGES) (\r
+(EFIAPI *EFI_ALLOCATE_PAGES)(\r
   IN     EFI_ALLOCATE_TYPE            Type,\r
   IN     EFI_MEMORY_TYPE              MemoryType,\r
   IN     UINTN                        Pages,\r
@@ -120,7 +154,7 @@ EFI_STATUS
 **/\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
@@ -129,6 +163,10 @@ EFI_STATUS
   Returns the current memory map.\r
 \r
   @param  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  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
@@ -148,7 +186,7 @@ EFI_STATUS
 **/\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
@@ -171,7 +209,7 @@ EFI_STATUS
 **/\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
@@ -180,7 +218,7 @@ EFI_STATUS
 /**\r
   Returns pool memory to the system.\r
 \r
-  @param  Buffer                Pointer to the buffer to free.\r
+  @param  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
@@ -188,7 +226,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_FREE_POOL) (\r
+(EFIAPI *EFI_FREE_POOL)(\r
   IN  VOID                         *Buffer\r
   );\r
 \r
@@ -213,7 +251,7 @@ EFI_STATUS
 **/\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
@@ -245,7 +283,7 @@ EFI_STATUS
 **/\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
@@ -257,14 +295,20 @@ EFI_STATUS
 \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
+                                If DriverImageHandle is NULL, then all the drivers currently managing\r
+                                ControllerHandle are disconnected from ControllerHandle.\r
   @param  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 not a valid EFI_HANDLE.\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
@@ -272,7 +316,7 @@ EFI_STATUS
 **/\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
@@ -284,7 +328,6 @@ EFI_STATUS
 // 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
@@ -303,31 +346,30 @@ EFI_STATUS
 **/\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
 //\r
-// These types can be ¡°ORed¡± together as needed ¨C for example,\r
-// EVT_TIMER might be ¡°Ored¡± with EVT_NOTIFY_WAIT or\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 EVT_TIMER                         0x80000000\r
 #define EVT_RUNTIME                       0x40000000\r
-\r
 #define EVT_NOTIFY_WAIT                   0x00000100\r
 #define EVT_NOTIFY_SIGNAL                 0x00000200\r
+\r
 #define EVT_SIGNAL_EXIT_BOOT_SERVICES     0x00000201\r
 #define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202\r
 \r
-\r
 //\r
-// The event¡¯s NotifyContext pointer points to a runtime memory\r
-// address. \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
+//\r
 #define EVT_RUNTIME_CONTEXT               0x20000000\r
 \r
 \r
@@ -335,13 +377,13 @@ EFI_STATUS
   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
+  @param  Context               The pointer to the notification function's context,\r
                                 which is implementation-dependent.\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
@@ -350,11 +392,11 @@ VOID
   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
+  @param  NotifyTpl             The task priority level of event notifications, if needed.\r
+  @param  NotifyFunction        The pointer to the event's notification function, if any.\r
+  @param  NotifyContext         The 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
+  @param  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
@@ -364,7 +406,7 @@ VOID
 **/\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
@@ -376,12 +418,14 @@ EFI_STATUS
   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
+  @param  NotifyTpl             The task priority level of event notifications,if needed.\r
+  @param  NotifyFunction        The pointer to the event's notification function, if any.\r
+  @param  NotifyContext         The 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
+  @param  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  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
@@ -391,18 +435,30 @@ EFI_STATUS
 **/\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 signalled periodically at a specified interval from the current time.\r
+  ///\r
   TimerPeriodic,\r
+  ///\r
+  /// An event is to be signalled once at a specified interval from the current time.\r
+  ///\r
   TimerRelative\r
 } EFI_TIMER_DELAY;\r
 \r
@@ -412,6 +468,11 @@ typedef enum {
   @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
+                                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
@@ -419,7 +480,7 @@ typedef enum {
 **/\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
@@ -435,7 +496,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_SIGNAL_EVENT) (\r
+(EFIAPI *EFI_SIGNAL_EVENT)(\r
   IN  EFI_EVENT                Event\r
   );\r
 \r
@@ -444,7 +505,7 @@ EFI_STATUS
 \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
+  @param  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
@@ -455,7 +516,7 @@ EFI_STATUS
 **/\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
@@ -471,7 +532,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_CLOSE_EVENT) (\r
+(EFIAPI *EFI_CLOSE_EVENT)(\r
   IN EFI_EVENT                Event\r
   );\r
 \r
@@ -487,13 +548,13 @@ EFI_STATUS
 **/\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
@@ -506,32 +567,32 @@ EFI_STATUS
 \r
   @param  NewTpl                The new task priority level.\r
 \r
-  @retval                       Previous task priority level\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
   Restores a task's priority level to its previous value.\r
 \r
-  @param  OldTpl                The previous task priority level to restore\r
+  @param  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
   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  VariableName          A Null-terminated string that is the name of the vendor's\r
+                                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
@@ -539,16 +600,20 @@ VOID
                                 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
+  @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
@@ -562,7 +627,7 @@ EFI_STATUS
   @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
+                                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
@@ -570,13 +635,15 @@ EFI_STATUS
   @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
 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
@@ -585,24 +652,34 @@ EFI_STATUS
 /**\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
+  @param  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  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. A size of zero causes the\r
+                                 variable to be deleted.\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_INVALID_PARAMETER  An invalid combination of attribute bits 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
+                                 set but the AuthInfo does NOT pass the validation check carried out\r
+                                 by the firmware.\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
@@ -611,13 +688,32 @@ EFI_STATUS
   );\r
 \r
 \r
-// \r
-// This provides the capabilities of the\r
-// real time clock device as exposed through the EFI interfaces.\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
+  ///\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
@@ -636,7 +732,7 @@ typedef struct {
 **/\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
@@ -653,7 +749,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_SET_TIME) (\r
+(EFIAPI *EFI_SET_TIME)(\r
   IN  EFI_TIME                     *Time\r
   );\r
 \r
@@ -665,13 +761,16 @@ EFI_STATUS
   @param  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
+  @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
@@ -682,6 +781,7 @@ EFI_STATUS
 \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
+                                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
@@ -692,28 +792,11 @@ EFI_STATUS
 **/\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
   Loads an EFI image into memory.\r
 \r
@@ -722,16 +805,16 @@ EFI_STATUS
                                 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
+  @param  DevicePath            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
+  @param  SourceSize            The size in bytes of SourceBuffer. Ignored if SourceBuffer is NULL.\r
+  @param  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 FilePath are NULL.\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
@@ -742,10 +825,10 @@ EFI_STATUS
 **/\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
@@ -755,18 +838,18 @@ EFI_STATUS
   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
+  @param  ExitDataSize          The pointer to the size, in bytes, of ExitData.\r
+  @param  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 Exit code from image  Exit code from image\r
+                                has already been initialized with StartImage.\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
@@ -775,11 +858,16 @@ EFI_STATUS
 /**\r
   Terminates a loaded EFI image and returns control to boot services.\r
 \r
-  @param  ImageHandle           Handle that identifies the image.\r
+  @param  ImageHandle           Handle that identifies the image. This parameter is passed to the \r
+                                image on entry.\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
+  @param  ExitDataSize          The size, in bytes, of ExitData. Ignored if ExitStatus is EFI_SUCCESS.\r
+  @param  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
@@ -789,7 +877,7 @@ EFI_STATUS
 **/\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
@@ -803,13 +891,11 @@ EFI_STATUS
 \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
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_IMAGE_UNLOAD) (\r
+(EFIAPI *EFI_IMAGE_UNLOAD)(\r
   IN  EFI_HANDLE                   ImageHandle\r
   );\r
 \r
@@ -825,7 +911,7 @@ EFI_STATUS
 **/\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
@@ -841,7 +927,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_STALL) (\r
+(EFIAPI *EFI_STALL)(\r
   IN  UINTN                    Microseconds\r
   );\r
 \r
@@ -851,32 +937,48 @@ EFI_STATUS
   @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
+  @param  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_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
+  @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
-//\r
-// Enumeration of reset types.\r
-// \r
+///\r
+/// Enumeration of reset types.\r
+///\r
 typedef enum {\r
+  ///\r
+  /// Used to induce a system-wide reset. This sets all circuitry within the \r
+  /// system to its initial state.  This type of reset is asynchronous to system\r
+  /// operation and operates withgout regard to cycle boundaries.  EfiColdReset \r
+  /// is tantamount to a system power cycle.\r
+  ///\r
   EfiResetCold,\r
+  ///\r
+  /// Used to induce a system-wide initialization. The processors are set to their\r
+  /// initial state, and pending cycles are not corrupted.  If the system does \r
+  /// not support this reset type, then an EfiResetCold must be performed.\r
+  ///\r
   EfiResetWarm,\r
-  EfiResetShutdown,\r
+  ///\r
+  /// Used to induce an entry into a power state equivalent to the ACPI G2/S5 or G3\r
+  /// state.  If the system does not support this reset type, then when the system\r
+  /// is rebooted, it should exhibit the EfiResetCold attributes.\r
+  ///\r
+  EfiResetShutdown\r
 } EFI_RESET_TYPE;\r
 \r
 /**\r
@@ -887,22 +989,22 @@ typedef enum {
   @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
+                                string, optionally followed by additional binary data.\r
 \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
   Returns a monotonically increasing count for the platform.\r
 \r
-  @param  Count                 Pointer to returned value.\r
+  @param  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
@@ -911,14 +1013,14 @@ VOID
 **/\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
   Returns the next high 32 bits of the platform's monotonic counter.\r
 \r
-  @param  HighCount             Pointer to returned value.\r
+  @param  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
@@ -927,7 +1029,7 @@ EFI_STATUS
 **/\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
@@ -941,12 +1043,14 @@ EFI_STATUS
 \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
+  @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
@@ -955,14 +1059,14 @@ EFI_STATUS
 /**\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  Destination           The pointer to the destination buffer of the memory copy.\r
+  @param  Source                The pointer to the source buffer of the memory copy.\r
   @param  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
@@ -971,24 +1075,26 @@ VOID
 /**\r
   The SetMem() function fills a buffer with a specified value.\r
 \r
-  @param  Buffer                Pointer to the buffer to fill.\r
+  @param  Buffer                The 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
 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
-//\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
@@ -1006,12 +1112,15 @@ typedef enum {
 \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
+  @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
@@ -1034,7 +1143,7 @@ EFI_STATUS
 **/\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
@@ -1053,12 +1162,13 @@ EFI_STATUS
   @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
+  @retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE.\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
@@ -1078,12 +1188,13 @@ EFI_STATUS
   @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
+  @retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE.\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
@@ -1102,7 +1213,7 @@ EFI_STATUS
 **/\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
@@ -1114,14 +1225,17 @@ EFI_STATUS
   @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
   @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
+  @retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE.\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
@@ -1163,12 +1277,12 @@ EFI_STATUS
 **/\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
@@ -1179,15 +1293,16 @@ EFI_STATUS
   @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
+  @retval EFI_INVALID_PARAMETER 1) Handle is not a valid EFI_HANDLE.\r
+                                2) AgentHandle is not a valid EFI_HANDLE.\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
@@ -1195,14 +1310,16 @@ EFI_STATUS
 **/\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
+///\r
+/// EFI Oprn Protocol Information Entry\r
+///\r
 typedef struct {\r
   EFI_HANDLE  AgentHandle;\r
   EFI_HANDLE  ControllerHandle;\r
@@ -1227,10 +1344,10 @@ typedef struct {
 **/\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
@@ -1249,12 +1366,15 @@ EFI_STATUS
                                 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
+  @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
@@ -1270,21 +1390,35 @@ EFI_STATUS
 \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
+  @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
+///\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
@@ -1303,12 +1437,16 @@ typedef enum {
   @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
+  @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
@@ -1327,12 +1465,14 @@ EFI_STATUS
 \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
+  @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
@@ -1353,17 +1493,17 @@ EFI_STATUS
 **/\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
 /**\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  Protocol              Provides the protocol to search by.\r
+                                This parameter is only valid for a SearchType of ByProtocol.\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
@@ -1373,12 +1513,13 @@ EFI_STATUS
                                 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
+  @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
@@ -1404,29 +1545,81 @@ EFI_STATUS
 **/\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
   Passes capsules to the firmware with both virtual and physical mapping. Depending on the intended\r
@@ -1446,14 +1639,18 @@ typedef struct {
   @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_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_INVALID_PARAMETER CapsuleSize is NULL.\r
+  @retval EFI_UNSUPPORTED       The capsule type is not supported on this platform.\r
+  @retval EFI_OUT_OF_RESOURCES  There were insufficient resources to process the capsule.\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
@@ -1474,12 +1671,13 @@ EFI_STATUS
   @retval EFI_UNSUPPORTED       The capsule type is not supported on this platform, and\r
                                 MaximumCapsuleSize and ResetType are undefined.\r
   @retval EFI_INVALID_PARAMETER MaximumCapsuleSize is NULL.\r
+  @retval EFI_OUT_OF_RESOURCES  There were insufficient resources to process the query request.\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
@@ -1509,7 +1707,7 @@ EFI_STATUS
 **/\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
@@ -1520,18 +1718,26 @@ EFI_STATUS
 //\r
 // EFI Runtime Services Table\r
 //\r
-#define EFI_SYSTEM_TABLE_SIGNATURE      0x5453595320494249\r
-#define EFI_SYSTEM_TABLE_REVISION       ((2<<16) | (10))\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
-\r
-#define EFI_RUNTIME_SERVICES_SIGNATURE  0x56524553544e5552\r
-#define EFI_RUNTIME_SERVICES_REVISION   EFI_2_10_SYSTEM_TABLE_REVISION\r
-\r
+#define EFI_SYSTEM_TABLE_SIGNATURE      SIGNATURE_64 ('I','B','I',' ','S','Y','S','T')\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_30_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_2_30_SYSTEM_TABLE_REVISION\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
@@ -1573,12 +1779,18 @@ typedef struct {
 } EFI_RUNTIME_SERVICES;\r
 \r
 \r
-#define EFI_BOOT_SERVICES_SIGNATURE   0x56524553544f4f42\r
-#define EFI_BOOT_SERVICES_REVISION    EFI_2_10_SYSTEM_TABLE_REVISION\r
+#define EFI_BOOT_SERVICES_SIGNATURE   SIGNATURE_64 ('B','O','O','T','S','E','R','V')\r
+#define EFI_BOOT_SERVICES_REVISION    EFI_2_30_SYSTEM_TABLE_REVISION\r
 \r
+///\r
+/// EFI Boot Services Table.\r
+///\r
 typedef struct {\r
-  EFI_TABLE_HEADER  Hdr;\r
-  \r
+  ///\r
+  /// The table header for the EFI Boot Services Table.\r
+  ///\r
+  EFI_TABLE_HEADER                Hdr;\r
+\r
   //\r
   // Task Priority Services\r
   //\r
@@ -1665,34 +1877,193 @@ typedef struct {
   //\r
   EFI_COPY_MEM                      CopyMem;\r
   EFI_SET_MEM                       SetMem;\r
-\r
   EFI_CREATE_EVENT_EX               CreateEventEx;\r
 } EFI_BOOT_SERVICES;\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
+///\r
+/// Contains a set of GUID/pointer pairs comprised of the ConfigurationTable field in the\r
+/// EFI System Table.\r
+///\r
+typedef struct {\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
-struct _EFI_SYSTEM_TABLE {\r
-  EFI_TABLE_HEADER  Hdr;\r
+///\r
+/// EFI System Table\r
+///\r
+typedef struct {\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
-};\r
+} EFI_SYSTEM_TABLE;\r
+\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
+  @param  ImageHandle           The firmware allocated handle for the UEFI image.\r
+  @param  SystemTable           A pointer to the EFI System Table.\r
+\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
+// EFI Load Options Attributes\r
+//\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
+#define EFI_BOOT_OPTION_SUPPORT_KEY   0x00000001\r
+#define EFI_BOOT_OPTION_SUPPORT_APP   0x00000002\r
+#define EFI_BOOT_OPTION_SUPPORT_COUNT 0x00000300\r
+\r
+///\r
+/// EFI Boot Key Data\r
+///\r
+typedef union {\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
+typedef struct {\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
 \r
 //\r
 // EFI File location to boot from on removable media devices\r
@@ -1700,7 +2071,7 @@ struct _EFI_SYSTEM_TABLE {
 #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
 \r
 #if   defined (MDE_CPU_IA32)\r
   #define EFI_REMOVABLE_MEDIA_FILE_NAME   EFI_REMOVABLE_MEDIA_FILE_NAME_IA32\r
@@ -1709,12 +2080,12 @@ struct _EFI_SYSTEM_TABLE {
 #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
 #else\r
   #error Unknown Processor Type\r
 #endif\r
 \r
-#include <Uefi/UefiDevicePath.h>\r
 #include <Uefi/UefiPxe.h>\r
 #include <Uefi/UefiGpt.h>\r
 #include <Uefi/UefiInternalFormRepresentation.h>\r