]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Include/EfiVariable.h
Program SD Cards into 4-bit mode (support for this is required in the spec). This...
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Include / EfiVariable.h
CommitLineData
3eb9473e 1/*++\r
2\r
f57387d5
HT
3Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 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
43cefa34 27#ifndef MAX_VARIABLE_SIZE\r
3eb9473e 28#define MAX_VARIABLE_SIZE 1024\r
43cefa34 29#endif\r
3eb9473e 30\r
31//\r
32// Enlarges the hardware error record maximum variable size to 32K bytes\r
33//\r
34#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)\r
43cefa34 35#ifndef MAX_HARDWARE_ERROR_VARIABLE_SIZE\r
3eb9473e 36#define MAX_HARDWARE_ERROR_VARIABLE_SIZE 0x8000\r
37#endif\r
43cefa34 38#endif\r
3eb9473e 39\r
40#define VARIABLE_DATA 0x55AA\r
41\r
42//\r
43// Variable Store Header flags\r
44//\r
45#define VARIABLE_STORE_FORMATTED 0x5a\r
46#define VARIABLE_STORE_HEALTHY 0xfe\r
47\r
48//\r
49// Variable Store Status\r
50//\r
51typedef enum {\r
52 EfiRaw,\r
53 EfiValid,\r
54 EfiInvalid,\r
55 EfiUnknown\r
56} VARIABLE_STORE_STATUS;\r
57\r
58//\r
59// Variable State flags\r
60//\r
61#define VAR_IN_DELETED_TRANSITION 0xfe // Variable is in obsolete transistion\r
62#define VAR_DELETED 0xfd // Variable is obsolete\r
63#define VAR_ADDED 0x7f // Variable has been completely added\r
64#define IS_VARIABLE_STATE(_c, _Mask) (BOOLEAN) (((~_c) & (~_Mask)) != 0)\r
65\r
66#pragma pack(1)\r
67\r
68typedef struct {\r
69 UINT32 Signature;\r
70 UINT32 Size;\r
71 UINT8 Format;\r
72 UINT8 State;\r
73 UINT16 Reserved;\r
74 UINT32 Reserved1;\r
75} VARIABLE_STORE_HEADER;\r
76\r
77typedef struct {\r
78 UINT16 StartId;\r
79 UINT8 State;\r
80 UINT8 Reserved;\r
81 UINT32 Attributes;\r
82 UINT32 NameSize;\r
83 UINT32 DataSize;\r
84 EFI_GUID VendorGuid;\r
85} VARIABLE_HEADER;\r
86\r
87#pragma pack()\r
88\r
89#endif // _EFI_VARIABLE_H_\r