--- /dev/null
+/** @file\r
+ The variable data structures are related to EDK II-specific implementation of UEFI variables.\r
+ VariableFormat.h defines variable data headers and variable storage region headers.\r
+\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under \r
+the terms and conditions of the BSD License that accompanies this distribution. \r
+The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php. \r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef __VARIABLE_INDEX_TABLE_H__\r
+#define __VARIABLE_INDEX_TABLE_H__\r
+\r
+typedef struct {\r
+ VARIABLE_HEADER *CurrPtr;\r
+ VARIABLE_HEADER *EndPtr;\r
+ VARIABLE_HEADER *StartPtr;\r
+} VARIABLE_POINTER_TRACK;\r
+\r
+#define VARIABLE_INDEX_TABLE_VOLUME 122\r
+\r
+#define EFI_VARIABLE_INDEX_TABLE_GUID \\r
+ { 0x8cfdb8c8, 0xd6b2, 0x40f3, { 0x8e, 0x97, 0x02, 0x30, 0x7c, 0xc9, 0x8b, 0x7c } }\r
+\r
+extern EFI_GUID gEfiVariableIndexTableGuid;\r
+\r
+///\r
+/// Use this data structure to store variable-related info, which can decrease\r
+/// the cost of access to NV.\r
+///\r
+typedef struct {\r
+ UINT16 Length;\r
+ UINT16 GoneThrough;\r
+ VARIABLE_HEADER *EndPtr;\r
+ VARIABLE_HEADER *StartPtr;\r
+ ///\r
+ /// This field is used to store the distance of two neighbouring VAR_ADDED type variables.\r
+ /// The meaning of the field is implement-dependent.\r
+ UINT16 Index[VARIABLE_INDEX_TABLE_VOLUME];\r
+} VARIABLE_INDEX_TABLE;\r
+\r
+#endif // __VARIABLE_INDEX_TABLE_H__\r
# Include/Guid/VariableFormat.h\r
gEfiVariableGuid = { 0xddcf3616, 0x3275, 0x4164, { 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d }}\r
\r
+ # Include/Guid/VariableIndexTable.h\r
+ gEfiVariableIndexTableGuid = { 0x8cfdb8c8, 0xd6b2, 0x40f3, { 0x8e, 0x97, 0x02, 0x30, 0x7c, 0xc9, 0x8b, 0x7c }}\r
+\r
## Guid is defined for SMM variable module to notify SMM variable wrapper module when variable write service was ready.\r
# Include/Guid/SmmVariableCommon.h\r
gSmmVariableWriteGuid = { 0x93ba1826, 0xdffb, 0x45dd, { 0x82, 0xa7, 0xe7, 0xdc, 0xaa, 0x3b, 0xbd, 0xf3 }}\r
&mVariablePpi\r
};\r
\r
-EFI_GUID mEfiVariableIndexTableGuid = EFI_VARIABLE_INDEX_TABLE_GUID;\r
-\r
\r
/**\r
Check if it runs in Recovery mode.\r
MaxIndex = 0;\r
StopRecord = FALSE;\r
\r
- GuidHob = GetFirstGuidHob (&mEfiVariableIndexTableGuid);\r
+ GuidHob = GetFirstGuidHob (&gEfiVariableIndexTableGuid);\r
if (GuidHob == NULL) {\r
//\r
// If it's the first time to access variable region in flash, create a guid hob to record\r
// Note that as the resource of PEI phase is limited, only store the number of \r
// VARIABLE_INDEX_TABLE_VOLUME of VAR_ADDED type variables to reduce access time.\r
//\r
- IndexTable = BuildGuidHob (&mEfiVariableIndexTableGuid, sizeof (VARIABLE_INDEX_TABLE));\r
+ IndexTable = BuildGuidHob (&gEfiVariableIndexTableGuid, sizeof (VARIABLE_INDEX_TABLE));\r
IndexTable->Length = 0;\r
IndexTable->StartPtr = NULL;\r
IndexTable->EndPtr = NULL;\r
#include <Library/PeiServicesLib.h>\r
\r
#include <Guid/VariableFormat.h>\r
-\r
-typedef struct {\r
- VARIABLE_HEADER *CurrPtr;\r
- VARIABLE_HEADER *EndPtr;\r
- VARIABLE_HEADER *StartPtr;\r
-} VARIABLE_POINTER_TRACK;\r
-\r
-#define VARIABLE_INDEX_TABLE_VOLUME 122\r
-\r
-#define EFI_VARIABLE_INDEX_TABLE_GUID \\r
- { 0x8cfdb8c8, 0xd6b2, 0x40f3, { 0x8e, 0x97, 0x02, 0x30, 0x7c, 0xc9, 0x8b, 0x7c } }\r
-\r
-///\r
-/// Use this data structure to store variable-related info, which can decrease\r
-/// the cost of access to NV.\r
-///\r
-typedef struct {\r
- UINT16 Length;\r
- UINT16 GoneThrough;\r
- VARIABLE_HEADER *EndPtr;\r
- VARIABLE_HEADER *StartPtr;\r
- ///\r
- /// This field is used to store the distance of two neighbouring VAR_ADDED type variables.\r
- /// The meaning of the field is implement-dependent.\r
- UINT16 Index[VARIABLE_INDEX_TABLE_VOLUME];\r
-} VARIABLE_INDEX_TABLE;\r
-\r
-\r
+#include <Guid/VariableIndexTable.h>\r
//\r
// Functions\r
//\r
\r
[Guids]\r
gEfiVariableGuid\r
+ gEfiVariableIndexTableGuid\r
\r
[Ppis]\r
gEfiPeiReadOnlyVariable2PpiGuid ## SOMETIMES_PRODUCES (Not for boot mode RECOVERY)\r