]> 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 e5448f9a5380ece30d89f14acc62926893b99bd1..57cb4e804f703e7e21c1cf6ca1b23b3aa65386ab 100644 (file)
@@ -1,11 +1,11 @@
 /** @file\r
   Include file that supports UEFI.\r
 \r
-  This include file must contain things defined in the UEFI 2.3 specification.\r
-  If a code construct is defined in the UEFI 2.3 specification it must be included\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 - 2011, Intel Corporation. All rights reserved.<BR>\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
@@ -23,6 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/SimpleTextIn.h>\r
+#include <Protocol/SimpleTextInEx.h>\r
 #include <Protocol/SimpleTextOut.h>\r
 \r
 ///\r
@@ -62,21 +63,35 @@ typedef enum {
 //\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
+#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
 // Physical memory protection attributes\r
 //\r
-#define EFI_MEMORY_WP   0x0000000000001000ULL\r
-#define EFI_MEMORY_RP   0x0000000000002000ULL\r
-#define EFI_MEMORY_XP   0x0000000000004000ULL\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
+#define EFI_MEMORY_RUNTIME          0x8000000000000000ULL\r
 \r
 ///\r
 /// Memory descriptor version number.\r
@@ -116,17 +131,23 @@ typedef struct {
 /**\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      The pointer to a physical address. On input, the way in which the address is\r
-                      used depends on the value of Type.\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
@@ -143,8 +164,8 @@ EFI_STATUS
 /**\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
+  @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
@@ -162,19 +183,19 @@ EFI_STATUS
 /**\r
   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
-                                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
+  @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
@@ -197,14 +218,20 @@ EFI_STATUS
 /**\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
+  @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
+  @retval EFI_INVALID_PARAMETER Buffer is NULL.\r
+                                PoolType is in the range EfiMaxMemoryType..0x6FFFFFFF.\r
+                                PoolType is EfiPersistentMemory.\r
 \r
 **/\r
 typedef\r
@@ -218,7 +245,7 @@ EFI_STATUS
 /**\r
   Returns pool memory to the system.\r
 \r
-  @param  Buffer                The pointer to the buffer to free.\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
@@ -233,10 +260,10 @@ EFI_STATUS
 /**\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
+  @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
   @retval EFI_SUCCESS           The virtual address map has been applied.\r
@@ -261,25 +288,27 @@ EFI_STATUS
 /**\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
+  @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
                                 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
+  @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
                                 2) No drivers were connected to ControllerHandle.\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
@@ -293,19 +322,19 @@ EFI_STATUS
 /**\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
-                                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
+  @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
-  @retval EFI_INVALID_PARAMETER 1) ControllerHandle is not a valid EFI_HANDLE.\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
@@ -332,9 +361,9 @@ EFI_STATUS
 /**\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
+  @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
@@ -376,9 +405,9 @@ EFI_STATUS
 /**\r
   Invoke a notification event\r
 \r
-  @param  Event                 Event whose notification function is being invoked.\r
-  @param  Context               The pointer to the notification function's context,\r
-                                which is implementation-dependent.\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
 typedef\r
@@ -391,12 +420,12 @@ VOID
 /**\r
   Creates an event.\r
 \r
-  @param  Type                  The type of event to create and its mode and attributes.\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
+  @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  Event                 The pointer to the newly created event if the call succeeds; undefined\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
@@ -417,15 +446,15 @@ EFI_STATUS
 /**\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             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
+  @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  EventGroup            The pointer to the unique identifier of the group to which this event belongs.\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  Event                 The pointer to the newly created event if the call succeeds; undefined\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
@@ -453,11 +482,11 @@ typedef enum {
   ///\r
   TimerCancel,\r
   ///\r
-  /// An event is to be signalled periodically at a specified interval from the current time.\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 signalled once at a specified interval from the current time.\r
+  /// An event is to be signaled once at a specified interval from the current time.\r
   ///\r
   TimerRelative\r
 } EFI_TIMER_DELAY;\r
@@ -465,9 +494,9 @@ typedef enum {
 /**\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
+  @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
@@ -489,7 +518,7 @@ EFI_STATUS
 /**\r
   Signals an event.\r
 \r
-  @param  Event                 The event to signal.\r
+  @param[in]  Event             The event to signal.\r
 \r
   @retval EFI_SUCCESS           The event has been signaled.\r
 \r
@@ -503,9 +532,9 @@ EFI_STATUS
 /**\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                 The pointer to the index of the event which satisfied the wait condition.\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
@@ -525,7 +554,7 @@ EFI_STATUS
 /**\r
   Closes an event.\r
 \r
-  @param  Event                 The event to close.\r
+  @param[in]  Event             The event to close.\r
 \r
   @retval EFI_SUCCESS           The event has been closed.\r
 \r
@@ -539,7 +568,7 @@ EFI_STATUS
 /**\r
   Checks whether an event is in the signaled state.\r
 \r
-  @param  Event                 The event to check.\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
@@ -565,7 +594,7 @@ EFI_STATUS
 /**\r
   Raises a task's priority level and returns its previous level.\r
 \r
-  @param  NewTpl                The new task priority level.\r
+  @param[in]  NewTpl          The new task priority level.\r
 \r
   @return Previous task priority level\r
 \r
@@ -579,7 +608,7 @@ EFI_TPL
 /**\r
   Restores a task's priority level to its previous value.\r
 \r
-  @param  OldTpl                The previous task priority level to restore.\r
+  @param[in]  OldTpl          The previous task priority level to restore.\r
 \r
 **/\r
 typedef\r
@@ -591,14 +620,15 @@ VOID
 /**\r
   Returns the value of a variable.\r
 \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
-  @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
+  @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
@@ -618,19 +648,19 @@ EFI_STATUS
   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
   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
-                                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
+  @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
@@ -652,28 +682,36 @@ EFI_STATUS
 /**\r
   Sets the value of a variable.\r
 \r
-  @param  VariableName           A Null-terminated string that is the name of the vendor's variable.\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  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
+  @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 was supplied, or the\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
-                                 set but the AuthInfo does NOT pass the validation check carried out\r
-                                 by the firmware.\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
@@ -721,8 +759,8 @@ typedef struct {
   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
+  @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
@@ -740,7 +778,7 @@ EFI_STATUS
 /**\r
   Sets the current local time and date information.\r
 \r
-  @param  Time                  A pointer to the current time.\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
@@ -756,9 +794,9 @@ EFI_STATUS
 /**\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
+  @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 Enabled is NULL.\r
@@ -779,8 +817,8 @@ EFI_STATUS
 /**\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
+  @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
@@ -800,32 +838,32 @@ EFI_STATUS
 /**\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  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. 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 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
+  @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
+                                 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
@@ -841,13 +879,14 @@ EFI_STATUS
 /**\r
   Transfers control to a loaded image's entry point.\r
 \r
-  @param  ImageHandle           Handle of image to be started.\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
+  @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_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
@@ -862,11 +901,11 @@ EFI_STATUS
 /**\r
   Terminates a loaded EFI image and returns control to boot services.\r
 \r
-  @param  ImageHandle           Handle that identifies the image. This parameter is passed to the \r
+  @param[in]  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. Ignored if ExitStatus is EFI_SUCCESS.\r
-  @param  ExitData              The pointer to a data buffer that includes a Null-terminated string,\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
@@ -891,7 +930,7 @@ EFI_STATUS
 /**\r
   Unloads an image.\r
 \r
-  @param  ImageHandle           Handle that identifies the image to be unloaded.\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
@@ -906,8 +945,8 @@ EFI_STATUS
 /**\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
+  @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
@@ -923,7 +962,7 @@ EFI_STATUS
 /**\r
   Induces a fine-grained stall.\r
 \r
-  @param  Microseconds          The number of microseconds to stall execution.\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
@@ -938,10 +977,10 @@ EFI_STATUS
 /**\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 string, optionally\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
@@ -960,41 +999,20 @@ EFI_STATUS
   IN CHAR16                   *WatchdogData OPTIONAL\r
   );\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
-  ///\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
   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
+  @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
-\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
@@ -1008,7 +1026,7 @@ VOID
 /**\r
   Returns a monotonically increasing count for the platform.\r
 \r
-  @param  Count                 The pointer to returned value.\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
@@ -1024,7 +1042,7 @@ EFI_STATUS
 /**\r
   Returns the next high 32 bits of the platform's monotonic counter.\r
 \r
-  @param  HighCount             The pointer to returned value.\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
@@ -1040,9 +1058,9 @@ EFI_STATUS
 /**\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
+  @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
   @retval EFI_SUCCESS           The 32-bit CRC was computed for the data buffer and returned in\r
@@ -1063,9 +1081,9 @@ EFI_STATUS
 /**\r
   Copies the contents of one buffer to another buffer.\r
 \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
+  @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
@@ -1079,9 +1097,9 @@ VOID
 /**\r
   The SetMem() function fills a buffer with a specified value.\r
 \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
+  @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
@@ -1109,10 +1127,10 @@ typedef enum {
   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
+  @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
@@ -1134,8 +1152,8 @@ EFI_STATUS
 /**\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
+  @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
 \r
@@ -1143,6 +1161,8 @@ EFI_STATUS
   @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
+  @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
@@ -1155,18 +1175,18 @@ EFI_STATUS
 /**\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
+  @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  NewInterface          A pointer to the new interface.\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 Handle is not a valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER Handle is NULL.\r
   @retval EFI_INVALID_PARAMETER Protocol is NULL.\r
 \r
 **/\r
@@ -1184,15 +1204,15 @@ EFI_STATUS
   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
+  @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 Handle is not a valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER Handle is NULL.\r
   @retval EFI_INVALID_PARAMETER Protocol is NULL.\r
 \r
 **/\r
@@ -1207,7 +1227,7 @@ EFI_STATUS
 /**\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
+  @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
@@ -1225,14 +1245,14 @@ EFI_STATUS
 /**\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
+  @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 Handle is not a valid EFI_HANDLE.\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
@@ -1256,18 +1276,18 @@ EFI_STATUS
   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
+  @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  AgentHandle           The handle of the agent that is opening the protocol interface\r
+  @param[in]   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
+  @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  Attributes            The open mode of the protocol interface specified by Handle\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
@@ -1294,17 +1314,17 @@ EFI_STATUS
 /**\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
+  @param[in]  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  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
+  @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 not a valid EFI_HANDLE.\r
-                                2) AgentHandle is not a valid EFI_HANDLE.\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
@@ -1334,11 +1354,11 @@ typedef struct {
 /**\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
+  @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  EntryCount            A pointer to the number of entries in EntryBuffer.\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
@@ -1359,12 +1379,12 @@ EFI_STATUS
   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
+  @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
@@ -1387,10 +1407,10 @@ EFI_STATUS
 /**\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
+  @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  Registration          A pointer to a memory location to receive the registration value.\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
@@ -1429,14 +1449,14 @@ typedef enum {
 /**\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
+  @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
+  @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
@@ -1461,11 +1481,11 @@ EFI_STATUS
 /**\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
+  @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  Device                A pointer to the returned device handle.\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
@@ -1485,13 +1505,13 @@ EFI_STATUS
 /**\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
+  @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
@@ -1505,12 +1525,12 @@ EFI_STATUS
 /**\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              Provides the protocol to search by.\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  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
+  @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
@@ -1534,10 +1554,10 @@ EFI_STATUS
 /**\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
+  @param[in]  Protocol          Provides the protocol to search for.\r
+  @param[in]  Registration      Optional registration key returned from\r
                                 RegisterProtocolNotify().\r
-  @param  Interface             On return, a pointer to the first interface that matches Protocol and\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
@@ -1632,13 +1652,13 @@ typedef struct {
   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
+  @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
@@ -1648,7 +1668,11 @@ typedef struct {
   @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  There were insufficient resources to process the capsule.\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
@@ -1662,20 +1686,24 @@ EFI_STATUS
 /**\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
+  @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
   @retval EFI_INVALID_PARAMETER MaximumCapsuleSize is NULL.\r
-  @retval EFI_OUT_OF_RESOURCES  There were insufficient resources to process the query request.\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
@@ -1690,16 +1718,16 @@ EFI_STATUS
 /**\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
+  @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
@@ -1718,21 +1746,35 @@ EFI_STATUS
   OUT UINT64            *MaximumVariableSize\r
   );\r
 \r
+//\r
+// Firmware should stop at a firmware user interface on next boot\r
+//\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
 //\r
 // EFI Runtime Services Table\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_30_SYSTEM_TABLE_REVISION\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_2_30_SYSTEM_TABLE_REVISION\r
+#define EFI_RUNTIME_SERVICES_REVISION   EFI_SPECIFICATION_VERSION\r
 \r
 ///\r
 /// EFI Runtime Services Table.\r
@@ -1784,7 +1826,7 @@ typedef struct {
 \r
 \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
+#define EFI_BOOT_SERVICES_REVISION    EFI_SPECIFICATION_VERSION\r
 \r
 ///\r
 /// EFI Boot Services Table.\r
@@ -1970,8 +2012,8 @@ typedef struct {
   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
+  @param[in]  ImageHandle       The firmware allocated handle for the UEFI image.\r
+  @param[in]  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
@@ -1983,20 +2025,70 @@ EFI_STATUS
   IN  EFI_SYSTEM_TABLE             *SystemTable\r
   );\r
 \r
+//\r
+// EFI Load Option. This data structure describes format of UEFI boot option variables.\r
+//\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
+#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
 // 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
+#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
+#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
+#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
@@ -2045,6 +2137,7 @@ typedef union {
 ///\r
 /// EFI Key Option.\r
 ///\r
+#pragma pack(1)\r
 typedef struct {\r
   ///\r
   /// Specifies options about how the key will be processed.\r
@@ -2068,6 +2161,7 @@ typedef struct {
   ///\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
@@ -2076,6 +2170,7 @@ typedef struct {
 #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_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
@@ -2086,6 +2181,8 @@ typedef struct {
 #elif defined (MDE_CPU_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