]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.h
SecurityPkg Variable: Support the new introduced PcdMaxAuthVariableSize.
[mirror_edk2.git] / SecurityPkg / VariableAuthenticated / RuntimeDxe / Variable.h
index f86b202fda40208a8deaad4971001bcb6a419e6c..4a4595fe4cb3c700eb0b6ac16cb38e3f89d2807f 100644 (file)
@@ -61,6 +61,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define VARIABLE_ATTRIBUTE_NV_BS_RT_HR  (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_HARDWARE_ERROR_RECORD)\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_AT_HR_AW  (VARIABLE_ATTRIBUTE_NV_BS_RT_AT | EFI_VARIABLE_HARDWARE_ERROR_RECORD | EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS)\r
+#define VARIABLE_ATTRIBUTE_AT_AW        (EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS | EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS)\r
+\r
+#define MAX_NV_VARIABLE_SIZE (MAX (MAX (PcdGet32 (PcdMaxVariableSize), \\r
+                                        PcdGet32 (PcdMaxAuthVariableSize)), \\r
+                                   PcdGet32 (PcdMaxHardwareErrorVariableSize)))\r
 \r
 ///\r
 /// The size of a 3 character ISO639 language code.\r
@@ -106,6 +111,9 @@ typedef struct {
   UINTN           CommonVariableTotalSize;\r
   UINTN           CommonUserVariableTotalSize;\r
   UINTN           HwErrVariableTotalSize;\r
+  UINTN           MaxVariableSize;\r
+  UINTN           MaxAuthVariableSize;\r
+  UINTN           ScratchBufferSize;\r
   CHAR8           *PlatformLangCodes;\r
   CHAR8           *LangCodes;\r
   CHAR8           *PlatformLang;\r
@@ -194,6 +202,23 @@ FindVariable (
   IN  BOOLEAN                 IgnoreRtCheck\r
   );\r
 \r
+/**\r
+\r
+  Gets the pointer to the end of the variable storage area.\r
+\r
+  This function gets pointer to the end of the variable storage\r
+  area, according to the input variable store header.\r
+\r
+  @param VarStoreHeader  Pointer to the Variable Store Header.\r
+\r
+  @return Pointer to the end of the variable storage area.\r
+\r
+**/\r
+VARIABLE_HEADER *\r
+GetEndPointer (\r
+  IN VARIABLE_STORE_HEADER       *VarStoreHeader\r
+  );\r
+\r
 /**\r
 \r
   This code gets the pointer to the variable data.\r