]>
git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/VariableFormat.h
2 EDK II specific implementation of UEFI variable depend on data structure.
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__
18 #define VARIABLE_STORE_SIGNATURE EFI_SIGNATURE_32 ('$', 'V', 'S', 'S')
20 #ifndef MAX_VARIABLE_SIZE
21 #define MAX_VARIABLE_SIZE FixedPcdGet32(PcdMaxVariableSize)
24 // Enlarges the hardware error record maximum variable size to 32K bytes
26 #ifndef MAX_HARDWARE_ERROR_VARIABLE_SIZE
27 #define MAX_HARDWARE_ERROR_VARIABLE_SIZE FixedPcdGet32(PcdMaxHardwareErrorVariableSize)
30 #define VARIABLE_DATA 0x55AA
33 // Variable Store Header flags
35 #define VARIABLE_STORE_FORMATTED 0x5a
36 #define VARIABLE_STORE_HEALTHY 0xfe
39 // The alignment of variable's start offset.
40 // For IA32/X64 architecture, the alignment is set to 1, and
41 // 8 is for IPF archtecture.
43 #if defined (MDE_CPU_IPF)
49 #define HEADER_ALIGNMENT 4
52 // Variable Store Status
59 } VARIABLE_STORE_STATUS
;
62 // Variable State flags
64 #define VAR_IN_DELETED_TRANSITION 0xfe // Variable is in obsolete transistion
65 #define VAR_DELETED 0xfd // Variable is obsolete
66 #define VAR_HEADER_VALID_ONLY 0x7f // Variable header has been valid
67 #define VAR_ADDED 0x3f // Variable has been completely added
69 #define IS_VARIABLE_STATE(_c, _Mask) (BOOLEAN) (((~_c) & (~_Mask)) != 0)
74 // Variable Store region header
83 } VARIABLE_STORE_HEADER
;
86 // Variable header structure
100 #endif // _EFI_VARIABLE_H_