]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/ToBeRemoved/Variable.h
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@511 6f19259b...
[mirror_edk2.git] / MdePkg / Include / ToBeRemoved / Variable.h
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. 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 #define MAX_VARIABLE_SIZE 1024
28
29 #define VARIABLE_DATA 0x55AA
30
31 //
32 // Variable Store Header flags
33 //
34 #define VARIABLE_STORE_FORMATTED 0x5a
35 #define VARIABLE_STORE_HEALTHY 0xfe
36
37 //
38 // Variable Store Status
39 //
40 typedef enum {
41 EfiRaw,
42 EfiValid,
43 EfiInvalid,
44 EfiUnknown
45 } VARIABLE_STORE_STATUS;
46
47 //
48 // Variable State flags
49 //
50 #define VAR_IN_DELETED_TRANSITION 0xfe // Variable is in obsolete transistion
51 #define VAR_DELETED 0xfd // Variable is obsolete
52 #define VAR_ADDED 0x7f // Variable has been completely added
53 #define IS_VARIABLE_STATE(_c, _Mask) (BOOLEAN) (((~_c) & (~_Mask)) != 0)
54
55 #pragma pack(1)
56
57 typedef struct {
58 UINT32 Signature;
59 UINT32 Size;
60 UINT8 Format;
61 UINT8 State;
62 UINT16 Reserved;
63 UINT32 Reserved1;
64 } VARIABLE_STORE_HEADER;
65
66 typedef struct {
67 UINT16 StartId;
68 UINT8 State;
69 UINT8 Reserved;
70 UINT32 Attributes;
71 UINTN NameSize;
72 UINTN DataSize;
73 EFI_GUID VendorGuid;
74 } VARIABLE_HEADER;
75
76 #pragma pack()
77
78 #endif // _EFI_VARIABLE_H_