]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Guid/VariableFormat.h
MdeModulePkg: Add AuthVariableLib LibraryClass
[mirror_edk2.git] / MdeModulePkg / Include / Guid / VariableFormat.h
index c52eaf3f12ec39c0cab8ee4e2079341211aae0b8..5fa75e6ca9c7eddf1a9fec70c736299ddd2029ca 100644 (file)
@@ -3,12 +3,12 @@
   VariableFormat.h defines variable data headers and variable storage region headers.\r
 \r
 Copyright (c) 2006 - 2015, 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
+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
+http://opensource.org/licenses/bsd-license.php.\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -81,7 +81,7 @@ typedef struct {
   ///\r
   EFI_GUID  Signature;\r
   ///\r
-  /// Size of entire variable store, \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
@@ -110,6 +110,18 @@ typedef struct {
 #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_AT_AW        (EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS | EFI_VARIABLE_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_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
 ///\r
@@ -184,6 +196,12 @@ typedef struct {
   EFI_GUID    VendorGuid;\r
 } AUTHENTICATED_VARIABLE_HEADER;\r
 \r
+typedef struct {\r
+  EFI_GUID    *Guid;\r
+  CHAR16      *Name;\r
+  UINTN       VariableSize;\r
+} VARIABLE_ENTRY_CONSISTENCY;\r
+\r
 #pragma pack()\r
 \r
 typedef struct _VARIABLE_INFO_ENTRY  VARIABLE_INFO_ENTRY;\r
@@ -191,12 +209,12 @@ typedef struct _VARIABLE_INFO_ENTRY  VARIABLE_INFO_ENTRY;
 ///\r
 /// This structure contains the variable list that is put in EFI system table.\r
 /// The variable driver collects all variables that were used at boot service time and produces this list.\r
-/// This is an optional feature to dump all used variables in shell environment. \r
+/// 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
+  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