]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Guid/VariableFormat.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Include / Guid / VariableFormat.h
index c076cef7b466322af950a0fb3ec129cc3b2ab306..534007a710950b868dfc054add02a7ce97dfe35f 100644 (file)
@@ -3,13 +3,7 @@
   VariableFormat.h defines variable data headers and variable storage region headers.\r
 \r
 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under\r
-the terms and conditions of the BSD License that accompanies this distribution.\r
-The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -22,22 +16,22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define EFI_AUTHENTICATED_VARIABLE_GUID \\r
   { 0xaaf32c78, 0x947b, 0x439a, { 0xa1, 0x80, 0x2e, 0x14, 0x4e, 0xc3, 0x77, 0x92 } }\r
 \r
-extern EFI_GUID gEfiVariableGuid;\r
-extern EFI_GUID gEfiAuthenticatedVariableGuid;\r
+extern EFI_GUID  gEfiVariableGuid;\r
+extern EFI_GUID  gEfiAuthenticatedVariableGuid;\r
 \r
 ///\r
 /// Alignment of variable name and data, according to the architecture:\r
 /// * For IA-32 and Intel(R) 64 architectures: 1.\r
 ///\r
-#define ALIGNMENT         1\r
+#define ALIGNMENT  1\r
 \r
 //\r
 // GET_PAD_SIZE calculates the miminal pad bytes needed to make the current pad size satisfy the alignment requirement.\r
 //\r
 #if (ALIGNMENT == 1)\r
-#define GET_PAD_SIZE(a) (0)\r
+#define GET_PAD_SIZE(a)  (0)\r
 #else\r
-#define GET_PAD_SIZE(a) (((~a) + 1) & (ALIGNMENT - 1))\r
+#define GET_PAD_SIZE(a)  (((~a) + 1) & (ALIGNMENT - 1))\r
 #endif\r
 \r
 ///\r
@@ -58,14 +52,14 @@ typedef enum {
 \r
 #pragma pack(1)\r
 \r
-#define VARIABLE_STORE_SIGNATURE  EFI_VARIABLE_GUID\r
+#define VARIABLE_STORE_SIGNATURE                EFI_VARIABLE_GUID\r
 #define AUTHENTICATED_VARIABLE_STORE_SIGNATURE  EFI_AUTHENTICATED_VARIABLE_GUID\r
 \r
 ///\r
 /// Variable Store Header Format and State.\r
 ///\r
-#define VARIABLE_STORE_FORMATTED          0x5a\r
-#define VARIABLE_STORE_HEALTHY            0xfe\r
+#define VARIABLE_STORE_FORMATTED  0x5a\r
+#define VARIABLE_STORE_HEALTHY    0xfe\r
 \r
 ///\r
 /// Variable Store region header.\r
@@ -74,54 +68,54 @@ typedef struct {
   ///\r
   /// Variable store region signature.\r
   ///\r
-  EFI_GUID  Signature;\r
+  EFI_GUID    Signature;\r
   ///\r
   /// Size of entire variable store,\r
   /// including size of variable store header but not including the size of FvHeader.\r
   ///\r
-  UINT32  Size;\r
+  UINT32      Size;\r
   ///\r
   /// Variable region format state.\r
   ///\r
-  UINT8   Format;\r
+  UINT8       Format;\r
   ///\r
   /// Variable region healthy state.\r
   ///\r
-  UINT8   State;\r
-  UINT16  Reserved;\r
-  UINT32  Reserved1;\r
+  UINT8       State;\r
+  UINT16      Reserved;\r
+  UINT32      Reserved1;\r
 } VARIABLE_STORE_HEADER;\r
 \r
 ///\r
 /// Variable data start flag.\r
 ///\r
-#define VARIABLE_DATA                     0x55AA\r
+#define VARIABLE_DATA  0x55AA\r
 \r
 ///\r
 /// Variable State flags.\r
 ///\r
-#define VAR_IN_DELETED_TRANSITION     0xfe  ///< Variable is in obsolete transition.\r
-#define VAR_DELETED                   0xfd  ///< Variable is obsolete.\r
-#define VAR_HEADER_VALID_ONLY         0x7f  ///< Variable header has been valid.\r
-#define VAR_ADDED                     0x3f  ///< Variable has been completely added.\r
+#define VAR_IN_DELETED_TRANSITION  0xfe     ///< Variable is in obsolete transition.\r
+#define VAR_DELETED                0xfd     ///< Variable is obsolete.\r
+#define VAR_HEADER_VALID_ONLY      0x7f     ///< Variable header has been valid.\r
+#define VAR_ADDED                  0x3f     ///< Variable has been completely added.\r
 \r
 ///\r
 /// Variable Attribute combinations.\r
 ///\r
-#define VARIABLE_ATTRIBUTE_NV_BS        (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS)\r
-#define VARIABLE_ATTRIBUTE_BS_RT        (EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS)\r
-#define VARIABLE_ATTRIBUTE_BS_RT_AT     (VARIABLE_ATTRIBUTE_BS_RT | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS)\r
-#define VARIABLE_ATTRIBUTE_NV_BS_RT     (VARIABLE_ATTRIBUTE_BS_RT | EFI_VARIABLE_NON_VOLATILE)\r
-#define VARIABLE_ATTRIBUTE_NV_BS_RT_HR  (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_HARDWARE_ERROR_RECORD)\r
-#define VARIABLE_ATTRIBUTE_NV_BS_RT_AT  (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS)\r
-#define VARIABLE_ATTRIBUTE_AT           EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS\r
-#define VARIABLE_ATTRIBUTE_NV_BS_RT_HR_AT    (VARIABLE_ATTRIBUTE_NV_BS_RT_HR | VARIABLE_ATTRIBUTE_AT)\r
+#define VARIABLE_ATTRIBUTE_NV_BS           (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS)\r
+#define VARIABLE_ATTRIBUTE_BS_RT           (EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS)\r
+#define VARIABLE_ATTRIBUTE_BS_RT_AT        (VARIABLE_ATTRIBUTE_BS_RT | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS)\r
+#define VARIABLE_ATTRIBUTE_NV_BS_RT        (VARIABLE_ATTRIBUTE_BS_RT | EFI_VARIABLE_NON_VOLATILE)\r
+#define VARIABLE_ATTRIBUTE_NV_BS_RT_HR     (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_HARDWARE_ERROR_RECORD)\r
+#define VARIABLE_ATTRIBUTE_NV_BS_RT_AT     (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS)\r
+#define VARIABLE_ATTRIBUTE_AT              EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS\r
+#define VARIABLE_ATTRIBUTE_NV_BS_RT_HR_AT  (VARIABLE_ATTRIBUTE_NV_BS_RT_HR | VARIABLE_ATTRIBUTE_AT)\r
 ///\r
 /// EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and should be considered as reserved\r
 ///\r
-#define VARIABLE_ATTRIBUTE_AT_AW        (EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS | EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS)\r
-#define VARIABLE_ATTRIBUTE_NV_BS_RT_AW  (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS)\r
-#define VARIABLE_ATTRIBUTE_NV_BS_RT_HR_AT_AW    (VARIABLE_ATTRIBUTE_NV_BS_RT_HR | VARIABLE_ATTRIBUTE_AT_AW)\r
+#define VARIABLE_ATTRIBUTE_AT_AW              (EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS | EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS)\r
+#define VARIABLE_ATTRIBUTE_NV_BS_RT_AW        (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS)\r
+#define VARIABLE_ATTRIBUTE_NV_BS_RT_HR_AT_AW  (VARIABLE_ATTRIBUTE_NV_BS_RT_HR | VARIABLE_ATTRIBUTE_AT_AW)\r
 \r
 ///\r
 /// Single Variable Data Header Structure.\r
@@ -205,7 +199,7 @@ typedef struct {
 \r
 #pragma pack()\r
 \r
-typedef struct _VARIABLE_INFO_ENTRY  VARIABLE_INFO_ENTRY;\r
+typedef struct _VARIABLE_INFO_ENTRY VARIABLE_INFO_ENTRY;\r
 \r
 ///\r
 /// This structure contains the variable list that is put in EFI system table.\r
@@ -213,15 +207,15 @@ typedef struct _VARIABLE_INFO_ENTRY  VARIABLE_INFO_ENTRY;
 /// This is an optional feature to dump all used variables in shell environment.\r
 ///\r
 struct _VARIABLE_INFO_ENTRY {\r
-  VARIABLE_INFO_ENTRY *Next;       ///< Pointer to next entry.\r
-  EFI_GUID            VendorGuid;  ///< Guid of Variable.\r
-  CHAR16              *Name;       ///< Name of Variable.\r
-  UINT32              Attributes;  ///< Attributes of variable defined in UEFI specification.\r
-  UINT32              ReadCount;   ///< Number of times to read this variable.\r
-  UINT32              WriteCount;  ///< Number of times to write this variable.\r
-  UINT32              DeleteCount; ///< Number of times to delete this variable.\r
-  UINT32              CacheCount;  ///< Number of times that cache hits this variable.\r
-  BOOLEAN             Volatile;    ///< TRUE if volatile, FALSE if non-volatile.\r
+  VARIABLE_INFO_ENTRY    *Next;       ///< Pointer to next entry.\r
+  EFI_GUID               VendorGuid;  ///< Guid of Variable.\r
+  CHAR16                 *Name;       ///< Name of Variable.\r
+  UINT32                 Attributes;  ///< Attributes of variable defined in UEFI specification.\r
+  UINT32                 ReadCount;   ///< Number of times to read this variable.\r
+  UINT32                 WriteCount;  ///< Number of times to write this variable.\r
+  UINT32                 DeleteCount; ///< Number of times to delete this variable.\r
+  UINT32                 CacheCount;  ///< Number of times that cache hits this variable.\r
+  BOOLEAN                Volatile;    ///< TRUE if volatile, FALSE if non-volatile.\r
 };\r
 \r
 #endif // _EFI_VARIABLE_H_\r