]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Uefi/UefiSpec.h
Add the new reset type (EfiResetPlatformSpecific) to UefiSpec.h to follow UEFI Spec...
[mirror_edk2.git] / MdePkg / Include / Uefi / UefiSpec.h
index ff0bab0aaabe6c0a2a8982c8b1d6f05bdf2c0304..a39b4b8960845140f969901362923dc4b4d9aa38 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.4 specification.\r
+  If a code construct is defined in the UEFI 2.4 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 - 2013, 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
@@ -127,6 +127,7 @@ typedef struct {
   @retval EFI_INVALID_PARAMETER 1) Type is not AllocateAnyPages or\r
                                 AllocateMaxAddress or AllocateAddress.\r
                                 2) MemoryType is in the range\r
+                                3) Memory is NULL.\r
                                 EfiMaxMemoryType..0x7FFFFFFF.\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
@@ -205,7 +206,7 @@ EFI_STATUS
 \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 PoolType was invalid or Buffer is NULL.\r
 \r
 **/\r
 typedef\r
@@ -276,11 +277,13 @@ EFI_STATUS
                                 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
@@ -306,7 +309,7 @@ EFI_STATUS
                                 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
@@ -665,7 +668,7 @@ EFI_STATUS
 \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
@@ -847,8 +850,9 @@ EFI_STATUS
   @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 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
@@ -983,7 +987,15 @@ typedef enum {
   /// 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
+  EfiResetShutdown,\r
+  ///\r
+  /// Used to induce a system-wide reset. The exact type of the reset is defined by\r
+  /// the EFI_GUID that follows the Null-terminated Unicode string passed into\r
+  /// ResetData. If the platform does not recognize the EFI_GUID in ResetData the \r
+  /// platform must pick a supported reset type to perform. The platform may\r
+  /// optionally log the parameters from any non-normal reset that occurs.\r
+  ///\r
+  EfiResetPlatformSpecific\r
 } EFI_RESET_TYPE;\r
 \r
 /**\r
@@ -1135,8 +1147,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  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
@@ -1144,6 +1156,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
@@ -1167,7 +1181,7 @@ 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 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
@@ -1193,7 +1207,7 @@ 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 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
@@ -1233,7 +1247,7 @@ EFI_STATUS
 \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
@@ -1304,8 +1318,8 @@ EFI_STATUS
                                 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
@@ -1719,11 +1733,16 @@ 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
 \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_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
@@ -2003,50 +2022,46 @@ EFI_STATUS
 ///\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
+typedef UINT32 EFI_BOOT_KEY_DATA;\r
+///\r
+/// Indicates the revision of the EFI_KEY_OPTION structure. This revision level should be 0.\r
+///\r
+#define EFI_KEY_OPTION_REVISION_MASK        0x000000FF\r
+///\r
+/// Either the left or right Shift keys must be pressed (1) or must not be pressed (0).\r
+///\r
+#define EFI_KEY_OPTION_SHIFT_PRESSED_MASK   BIT8\r
+///\r
+/// Either the left or right Control keys must be pressed (1) or must not be pressed (0).\r
+///\r
+#define EFI_KEY_OPTION_CONTROL_PRESSED_MASK BIT9\r
+///\r
+/// Either the left or right Alt keys must be pressed (1) or must not be pressed (0).\r
+///\r
+#define EFI_KEY_OPTION_ALT_PRESSED_MASK     BIT10\r
+///\r
+/// Either the left or right Logo keys must be pressed (1) or must not be pressed (0).\r
+///\r
+#define EFI_KEY_OPTION_LOGO_PRESSED_MASK    BIT11\r
+///\r
+/// The Menu key must be pressed (1) or must not be pressed (0).\r
+///\r
+#define EFI_KEY_OPTION_MENU_PRESSED_MASK    BIT12\r
+///\r
+/// The SysReq key must be pressed (1) or must not be pressed (0).\r
+///\r
+#define EFI_KEY_OPTION_SYS_REQ_PRESSED_MASK BIT13\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
+#define EFI_KEY_OPTION_INPUT_KEY_COUNT_MASK (BIT30 | BIT31)\r
 \r
 ///\r
 /// EFI Key Option.\r
 ///\r
+#pragma pack(1)\r
 typedef struct {\r
   ///\r
   /// Specifies options about how the key will be processed.\r
@@ -2070,6 +2085,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
@@ -2078,6 +2094,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
@@ -2088,6 +2105,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