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