]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Uefi/UefiSpec.h
Rollback the change to EFI_BOOT_KEY_DATA structure since UEFI Spec adds the clarifica...
[mirror_edk2.git] / MdePkg / Include / Uefi / UefiSpec.h
index a39b4b8960845140f969901362923dc4b4d9aa38..168ebf511e7d36d0d364e9073fd81cc1a1b64a08 100644 (file)
@@ -662,8 +662,15 @@ EFI_STATUS
                                  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  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  Data                   The contents for the variable.\r
 \r
   @retval EFI_SUCCESS            The firmware has successfully stored the variable and its data as\r
@@ -675,9 +682,10 @@ EFI_STATUS
   @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
@@ -1663,7 +1671,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
@@ -1690,7 +1702,11 @@ EFI_STATUS
   @retval EFI_UNSUPPORTED       The capsule type is not supported on this platform, and\r
                                 MaximumCapsuleSize and ResetType are undefined.\r
   @retval EFI_INVALID_PARAMETER MaximumCapsuleSize is NULL.\r
-  @retval EFI_OUT_OF_RESOURCES  There were insufficient resources to process the query request.\r
+  @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
@@ -1736,7 +1752,11 @@ EFI_STATUS
 //\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_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
 \r
 //\r
 // EFI Runtime Services Table\r
@@ -1750,10 +1770,11 @@ EFI_STATUS
 #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_31_SYSTEM_TABLE_REVISION\r
+#define EFI_SYSTEM_TABLE_REVISION       EFI_2_40_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_31_SYSTEM_TABLE_REVISION\r
+#define EFI_RUNTIME_SERVICES_REVISION   EFI_SPECIFICATION_VERSION\r
 \r
 ///\r
 /// EFI Runtime Services Table.\r
@@ -1805,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_31_SYSTEM_TABLE_REVISION\r
+#define EFI_BOOT_SERVICES_REVISION    EFI_SPECIFICATION_VERSION\r
 \r
 ///\r
 /// EFI Boot Services Table.\r
@@ -2022,41 +2043,46 @@ EFI_STATUS
 ///\r
 /// EFI Boot Key Data\r
 ///\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
+typedef union {\r
+  struct {\r
+    ///\r
+    /// Indicates the revision of the EFI_KEY_OPTION structure. This revision level should be 0.\r
+    ///\r
+    UINT32  Revision        : 8;\r
+    ///\r
+    /// Either the left or right Shift keys must be pressed (1) or must not be pressed (0).\r
+    ///\r
+    UINT32  ShiftPressed    : 1;\r
+    ///\r
+    /// Either the left or right Control keys must be pressed (1) or must not be pressed (0).\r
+    ///\r
+    UINT32  ControlPressed  : 1;\r
+    ///\r
+    /// Either the left or right Alt keys must be pressed (1) or must not be pressed (0).\r
+    ///\r
+    UINT32  AltPressed      : 1;\r
+    ///\r
+    /// Either the left or right Logo keys must be pressed (1) or must not be pressed (0).\r
+    ///\r
+    UINT32  LogoPressed     : 1;\r
+    ///\r
+    /// The Menu key must be pressed (1) or must not be pressed (0).\r
+    ///\r
+    UINT32  MenuPressed     : 1;\r
+    ///\r
+    /// The SysReq key must be pressed (1) or must not be pressed (0).\r
+    ///\r
+    UINT32  SysReqPressed    : 1;\r
+    UINT32  Reserved        : 16;\r
+    ///\r
+    /// Specifies the actual number of entries in EFI_KEY_OPTION.Keys, from 0-3. If\r
+    /// zero, then only the shift state is considered. If more than one, then the boot option will\r
+    /// only be launched if all of the specified keys are pressed with the same shift state.\r
+    ///\r
+    UINT32  InputKeyCount   : 2;\r
+  } Options;\r
+  UINT32  PackedValue;\r
+} EFI_BOOT_KEY_DATA;\r
 \r
 ///\r
 /// EFI Key Option.\r