]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/VariableFormat.h
Remove the package header files PiDxe.h/PiPei.h/Uefi.h included by Protocol/Ppi/Guid...
[mirror_edk2.git] / MdeModulePkg / Include / VariableFormat.h
index a4a37585ca5b35d1897126d986af767cfe13cab8..798bc411c3ee33d28131231ef8a4754fdece2902 100644 (file)
@@ -1,7 +1,7 @@
-/**@file\r
-  Header file for EFI Variable Services.\r
+/** @file\r
+  EDK II specific implementation of UEFI variable depend on data structure.\r
 \r
-  Copyright (c) 2006 - 2007 Intel Corporation. <BR>\r
+  Copyright (c) 2006 - 2008 Intel Corporation. <BR>\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 \r
 #define VARIABLE_STORE_SIGNATURE  EFI_SIGNATURE_32 ('$', 'V', 'S', 'S')\r
 \r
-#define MAX_VARIABLE_SIZE                 1024\r
+#define MAX_VARIABLE_SIZE                 FixedPcdGet32(PcdMaxVariableSize)\r
 \r
 //\r
 // Enlarges the hardware error record maximum variable size to 32K bytes\r
 //\r
-#define MAX_HARDWARE_ERROR_VARIABLE_SIZE  0x8000\r
+#define MAX_HARDWARE_ERROR_VARIABLE_SIZE  FixedPcdGet32(PcdMaxHardwareErrorVariableSize)\r
 \r
 #define VARIABLE_DATA                     0x55AA\r
 \r
 // 8 is for IPF archtecture.\r
 //\r
 #if defined (MDE_CPU_IPF)\r
-#define ALIGNMENT  8\r
+#define ALIGNMENT         8\r
 #else\r
-#define ALIGNMENT  1\r
+#define ALIGNMENT         1\r
 #endif\r
 \r
+#define HEADER_ALIGNMENT  4\r
+\r
 //\r
 // Variable Store Status\r
 //\r
@@ -58,11 +60,16 @@ typedef enum {
 //\r
 #define VAR_IN_DELETED_TRANSITION     0xfe  // Variable is in obsolete transistion\r
 #define VAR_DELETED                   0xfd  // Variable is obsolete\r
-#define VAR_ADDED                     0x7f  // Variable has been completely added\r
+#define VAR_HEADER_VALID_ONLY         0x7f  // Variable header has been valid\r
+#define VAR_ADDED                     0x3f  // Variable has been completely added\r
+                                            // \r
 #define IS_VARIABLE_STATE(_c, _Mask)  (BOOLEAN) (((~_c) & (~_Mask)) != 0)\r
 \r
 #pragma pack(1)\r
 \r
+//\r
+// Variable Store region header\r
+//\r
 typedef struct {\r
   UINT32  Signature;\r
   UINT32  Size;\r
@@ -72,6 +79,9 @@ typedef struct {
   UINT32  Reserved1;\r
 } VARIABLE_STORE_HEADER;\r
 \r
+//\r
+// Variable header structure\r
+//\r
 typedef struct {\r
   UINT16      StartId;\r
   UINT8       State;\r