]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdeModulePkg/Include/VariableFormat.h
1. Sync the latest network stack. Add NetLibCreateIPv4DPathNode () in netlib library.
[mirror_edk2.git] / MdeModulePkg / Include / VariableFormat.h
... / ...
CommitLineData
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 __VARIABLE_FORMAT_H__\r
16#define __VARIABLE_FORMAT_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//\r
23// Enlarges the hardware error record maximum variable size to 32K bytes\r
24//\r
25#define MAX_HARDWARE_ERROR_VARIABLE_SIZE 0x8000\r
26\r
27#define VARIABLE_DATA 0x55AA\r
28\r
29//\r
30// Variable Store Header flags\r
31//\r
32#define VARIABLE_STORE_FORMATTED 0x5a\r
33#define VARIABLE_STORE_HEALTHY 0xfe\r
34\r
35//\r
36// The alignment of variable's start offset.\r
37// For IA32/X64 architecture, the alignment is set to 1, and\r
38// 8 is for IPF archtecture.\r
39//\r
40#if defined (MDE_CPU_IPF)\r
41#define ALIGNMENT 8\r
42#else\r
43#define ALIGNMENT 1\r
44#endif\r
45\r
46//\r
47// Variable Store Status\r
48//\r
49typedef enum {\r
50 EfiRaw,\r
51 EfiValid,\r
52 EfiInvalid,\r
53 EfiUnknown\r
54} VARIABLE_STORE_STATUS;\r
55\r
56//\r
57// Variable State flags\r
58//\r
59#define VAR_IN_DELETED_TRANSITION 0xfe // Variable is in obsolete transistion\r
60#define VAR_DELETED 0xfd // Variable is obsolete\r
61#define VAR_ADDED 0x7f // Variable has been completely added\r
62#define IS_VARIABLE_STATE(_c, _Mask) (BOOLEAN) (((~_c) & (~_Mask)) != 0)\r
63\r
64#pragma pack(1)\r
65\r
66typedef struct {\r
67 UINT32 Signature;\r
68 UINT32 Size;\r
69 UINT8 Format;\r
70 UINT8 State;\r
71 UINT16 Reserved;\r
72 UINT32 Reserved1;\r
73} VARIABLE_STORE_HEADER;\r
74\r
75typedef struct {\r
76 UINT16 StartId;\r
77 UINT8 State;\r
78 UINT8 Reserved;\r
79 UINT32 Attributes;\r
80 UINT32 NameSize;\r
81 UINT32 DataSize;\r
82 EFI_GUID VendorGuid;\r
83} VARIABLE_HEADER;\r
84\r
85#pragma pack()\r
86\r
87#endif // _EFI_VARIABLE_H_\r