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