]>
git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/VariableFormat.h
2 The variable data structure related to EDK II specific UEFI variable implementation.
4 Copyright (c) 2006 - 2008 Intel Corporation. <BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef __VARIABLE_FORMAT_H__
16 #define __VARIABLE_FORMAT_H__
19 /// Maximum buffer for the single variable.
21 #ifndef MAX_VARIABLE_SIZE
22 #define MAX_VARIABLE_SIZE FixedPcdGet32(PcdMaxVariableSize)
26 /// Maximum buffer for Hardware error record variable
28 #ifndef MAX_HARDWARE_ERROR_VARIABLE_SIZE
29 #define MAX_HARDWARE_ERROR_VARIABLE_SIZE FixedPcdGet32(PcdMaxHardwareErrorVariableSize)
33 /// The alignment of variable's start offset.
34 /// For IA32/X64 architecture, the alignment is set to 1, and
35 /// 8 is for IPF archtecture.
37 #if defined (MDE_CPU_IPF)
43 #define HEADER_ALIGNMENT 4
46 /// Variable Store Status
53 } VARIABLE_STORE_STATUS
;
57 #define VARIABLE_STORE_SIGNATURE EFI_SIGNATURE_32 ('$', 'V', 'S', 'S')
60 /// Variable Store Header Format and State
62 #define VARIABLE_STORE_FORMATTED 0x5a
63 #define VARIABLE_STORE_HEALTHY 0xfe
66 /// Variable Store region header
70 /// Variable store region signature.
74 /// Size of variable store region including this header
78 /// variable region format state
82 /// variable region healthy state
87 } VARIABLE_STORE_HEADER
;
90 /// Variable data start flag
92 #define VARIABLE_DATA 0x55AA
95 /// Variable State flags
97 #define VAR_IN_DELETED_TRANSITION 0xfe /// Variable is in obsolete transistion
98 #define VAR_DELETED 0xfd /// Variable is obsolete
99 #define VAR_HEADER_VALID_ONLY 0x7f /// Variable header has been valid
100 #define VAR_ADDED 0x3f /// Variable has been completely added
105 #define IS_VARIABLE_STATE(_c, _Mask) (BOOLEAN) (((~_c) & (~_Mask)) != 0)
108 /// Variable Data Header Structure
112 /// Variable Data Start Flag
116 /// Variable State defined above
121 /// Attributes of variable defined in UEFI spec
125 /// Size of variable Null-terminated Unicode string name
129 /// Size of the variable data without this header
133 /// A unique identifier for the vendor.
140 #endif // _EFI_VARIABLE_H_