--- /dev/null
+/**@file\r
+ Header file for EFI Variable Services.\r
+\r
+Copyright (c) 2006 - 2007 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
+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
+\r
+**/\r
+\r
+#ifndef __EFI_VARIABLE_H__\r
+#define __EFI_VARIABLE_H__\r
+\r
+#define VARIABLE_STORE_SIGNATURE EFI_SIGNATURE_32 ('$', 'V', 'S', 'S')\r
+\r
+#define MAX_VARIABLE_SIZE 1024\r
+\r
+//\r
+// Enlarges the hardware error record maximum variable size to 32K bytes\r
+//\r
+#define MAX_HARDWARE_ERROR_VARIABLE_SIZE 0x8000\r
+\r
+#define VARIABLE_DATA 0x55AA\r
+\r
+//\r
+// Variable Store Header flags\r
+//\r
+#define VARIABLE_STORE_FORMATTED 0x5a\r
+#define VARIABLE_STORE_HEALTHY 0xfe\r
+\r
+//\r
+// The alignment of variable's start offset.\r
+// For IA32/X64 architecture, the alignment is set to 1, and\r
+// 8 is for IPF archtecture.\r
+//\r
+#if defined (MDE_CPU_IPF)\r
+#define ALIGNMENT 8\r
+#else\r
+#define ALIGNMENT 1\r
+#endif\r
+\r
+//\r
+// Variable Store Status\r
+//\r
+typedef enum {\r
+ EfiRaw,\r
+ EfiValid,\r
+ EfiInvalid,\r
+ EfiUnknown\r
+} VARIABLE_STORE_STATUS;\r
+\r
+//\r
+// Variable State flags\r
+//\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 IS_VARIABLE_STATE(_c, _Mask) (BOOLEAN) (((~_c) & (~_Mask)) != 0)\r
+\r
+#pragma pack(1)\r
+\r
+typedef struct {\r
+ UINT32 Signature;\r
+ UINT32 Size;\r
+ UINT8 Format;\r
+ UINT8 State;\r
+ UINT16 Reserved;\r
+ UINT32 Reserved1;\r
+} VARIABLE_STORE_HEADER;\r
+\r
+typedef struct {\r
+ UINT16 StartId;\r
+ UINT8 State;\r
+ UINT8 Reserved;\r
+ UINT32 Attributes;\r
+ UINT32 NameSize;\r
+ UINT32 DataSize;\r
+ EFI_GUID VendorGuid;\r
+} VARIABLE_HEADER;\r
+\r
+#pragma pack()\r
+\r
+#endif // _EFI_VARIABLE_H_\r