A typo in comments that alignment should be 8 for IPF
[mirror_edk2.git] / EdkModulePkg / Include / Common / Variable.h
CommitLineData
20798fc5 1/**@file\r
2 Header file for EFI Variable Services.\r
3 \r
4Copyright (c) 2006 - 2007 Intel Corporation. <BR>\r
878ddf1f 5All rights reserved. This program and the accompanying materials \r
6are licensed and made available under the terms and conditions of the BSD License \r
7which accompanies this distribution. The full text of the license may be found at \r
8http://opensource.org/licenses/bsd-license.php \r
9 \r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
20798fc5 13**/\r
878ddf1f 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
20798fc5 30//\r
31// The alignment of variable's start offset.\r
72c11e3a 32// For IA32/X64 architecture, the alignment is set to 1, and \r
39d03acf 33// 8 is for IPF archtecture.\r
20798fc5 34//\r
35#if defined (MDE_CPU_IPF)\r
36#define ALIGNMENT 8\r
37#else\r
72c11e3a 38#define ALIGNMENT 1\r
20798fc5 39#endif\r
40\r
878ddf1f 41//\r
42// Variable Store Status\r
43//\r
44typedef enum {\r
45 EfiRaw,\r
46 EfiValid,\r
47 EfiInvalid,\r
48 EfiUnknown\r
49} VARIABLE_STORE_STATUS;\r
50\r
51//\r
52// Variable State flags\r
53//\r
54#define VAR_IN_DELETED_TRANSITION 0xfe // Variable is in obsolete transistion\r
55#define VAR_DELETED 0xfd // Variable is obsolete\r
56#define VAR_ADDED 0x7f // Variable has been completely added\r
57#define IS_VARIABLE_STATE(_c, _Mask) (BOOLEAN) (((~_c) & (~_Mask)) != 0)\r
58\r
59#pragma pack(1)\r
60\r
61typedef struct {\r
62 UINT32 Signature;\r
63 UINT32 Size;\r
64 UINT8 Format;\r
65 UINT8 State;\r
66 UINT16 Reserved;\r
67 UINT32 Reserved1;\r
68} VARIABLE_STORE_HEADER;\r
69\r
70typedef struct {\r
71 UINT16 StartId;\r
72 UINT8 State;\r
73 UINT8 Reserved;\r
74 UINT32 Attributes;\r
75 UINT32 NameSize;\r
76 UINT32 DataSize;\r
77 EFI_GUID VendorGuid;\r
78} VARIABLE_HEADER;\r
79\r
80#pragma pack()\r
81\r
82#endif // _EFI_VARIABLE_H_\r