Fix some cleanall issues
[mirror_edk2.git] / EdkModulePkg / Include / Common / Variable.h
CommitLineData
878ddf1f 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 EfiVariable.h\r
15 \r
16Abstract:\r
17 \r
18 Header file for EFI Variable Services\r
19\r
20--*/\r
21\r
22#ifndef _EFI_VARIABLE_H_\r
23#define _EFI_VARIABLE_H_\r
24\r
25#define VARIABLE_STORE_SIGNATURE EFI_SIGNATURE_32 ('$', 'V', 'S', 'S')\r
26\r
27#define MAX_VARIABLE_SIZE 1024\r
28\r
29#define VARIABLE_DATA 0x55AA\r
30\r
31//\r
32// Variable Store Header flags\r
33//\r
34#define VARIABLE_STORE_FORMATTED 0x5a\r
35#define VARIABLE_STORE_HEALTHY 0xfe\r
36\r
37//\r
38// Variable Store Status\r
39//\r
40typedef enum {\r
41 EfiRaw,\r
42 EfiValid,\r
43 EfiInvalid,\r
44 EfiUnknown\r
45} VARIABLE_STORE_STATUS;\r
46\r
47//\r
48// Variable State flags\r
49//\r
50#define VAR_IN_DELETED_TRANSITION 0xfe // Variable is in obsolete transistion\r
51#define VAR_DELETED 0xfd // Variable is obsolete\r
52#define VAR_ADDED 0x7f // Variable has been completely added\r
53#define IS_VARIABLE_STATE(_c, _Mask) (BOOLEAN) (((~_c) & (~_Mask)) != 0)\r
54\r
55#pragma pack(1)\r
56\r
57typedef struct {\r
58 UINT32 Signature;\r
59 UINT32 Size;\r
60 UINT8 Format;\r
61 UINT8 State;\r
62 UINT16 Reserved;\r
63 UINT32 Reserved1;\r
64} VARIABLE_STORE_HEADER;\r
65\r
66typedef struct {\r
67 UINT16 StartId;\r
68 UINT8 State;\r
69 UINT8 Reserved;\r
70 UINT32 Attributes;\r
71 UINT32 NameSize;\r
72 UINT32 DataSize;\r
73 EFI_GUID VendorGuid;\r
74} VARIABLE_HEADER;\r
75\r
76#pragma pack()\r
77\r
78#endif // _EFI_VARIABLE_H_\r