summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal
diff options
context:
space:
mode:
authorsfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-07 04:49:10 +0000
committersfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-07 04:49:10 +0000
commit9725730b65c97e61769f9c818564b407cb9b5f43 (patch)
tree7b5a85f1bc00390552e4ee63c59eb77ce8445a95 /MdeModulePkg/Universal
parent63947cc4d01f92209a92cbe3987f324a85a39034 (diff)
downloadedk2-platforms-9725730b65c97e61769f9c818564b407cb9b5f43.tar.xz
Remove duplicated definitions EFI_VARIABLE_INDEX_TABLE_GUID in variable PEI drivers.
Reviewed-by: lgao4, gdong1 Signed-off-by: sfu5 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11755 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r--MdeModulePkg/Universal/Variable/Pei/Variable.c6
-rw-r--r--MdeModulePkg/Universal/Variable/Pei/Variable.h29
-rw-r--r--MdeModulePkg/Universal/Variable/Pei/VariablePei.inf1
3 files changed, 4 insertions, 32 deletions
diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.c b/MdeModulePkg/Universal/Variable/Pei/Variable.c
index 0db9521239..a20600b8b4 100644
--- a/MdeModulePkg/Universal/Variable/Pei/Variable.c
+++ b/MdeModulePkg/Universal/Variable/Pei/Variable.c
@@ -32,8 +32,6 @@ EFI_PEI_PPI_DESCRIPTOR mPpiListVariable = {
&mVariablePpi
};
-EFI_GUID mEfiVariableIndexTableGuid = EFI_VARIABLE_INDEX_TABLE_GUID;
-
/**
Check if it runs in Recovery mode.
@@ -393,7 +391,7 @@ FindVariable (
MaxIndex = 0;
StopRecord = FALSE;
- GuidHob = GetFirstGuidHob (&mEfiVariableIndexTableGuid);
+ GuidHob = GetFirstGuidHob (&gEfiVariableIndexTableGuid);
if (GuidHob == NULL) {
//
// If it's the first time to access variable region in flash, create a guid hob to record
@@ -401,7 +399,7 @@ FindVariable (
// Note that as the resource of PEI phase is limited, only store the number of
// VARIABLE_INDEX_TABLE_VOLUME of VAR_ADDED type variables to reduce access time.
//
- IndexTable = BuildGuidHob (&mEfiVariableIndexTableGuid, sizeof (VARIABLE_INDEX_TABLE));
+ IndexTable = BuildGuidHob (&gEfiVariableIndexTableGuid, sizeof (VARIABLE_INDEX_TABLE));
IndexTable->Length = 0;
IndexTable->StartPtr = NULL;
IndexTable->EndPtr = NULL;
diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.h b/MdeModulePkg/Universal/Variable/Pei/Variable.h
index 430a3544dc..f89bcae630 100644
--- a/MdeModulePkg/Universal/Variable/Pei/Variable.h
+++ b/MdeModulePkg/Universal/Variable/Pei/Variable.h
@@ -29,34 +29,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/PeiServicesLib.h>
#include <Guid/VariableFormat.h>
-
-typedef struct {
- VARIABLE_HEADER *CurrPtr;
- VARIABLE_HEADER *EndPtr;
- VARIABLE_HEADER *StartPtr;
-} VARIABLE_POINTER_TRACK;
-
-#define VARIABLE_INDEX_TABLE_VOLUME 122
-
-#define EFI_VARIABLE_INDEX_TABLE_GUID \
- { 0x8cfdb8c8, 0xd6b2, 0x40f3, { 0x8e, 0x97, 0x02, 0x30, 0x7c, 0xc9, 0x8b, 0x7c } }
-
-///
-/// Use this data structure to store variable-related info, which can decrease
-/// the cost of access to NV.
-///
-typedef struct {
- UINT16 Length;
- UINT16 GoneThrough;
- VARIABLE_HEADER *EndPtr;
- VARIABLE_HEADER *StartPtr;
- ///
- /// This field is used to store the distance of two neighbouring VAR_ADDED type variables.
- /// The meaning of the field is implement-dependent.
- UINT16 Index[VARIABLE_INDEX_TABLE_VOLUME];
-} VARIABLE_INDEX_TABLE;
-
-
+#include <Guid/VariableIndexTable.h>
//
// Functions
//
diff --git a/MdeModulePkg/Universal/Variable/Pei/VariablePei.inf b/MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
index 41b87b71e1..b86c0d1554 100644
--- a/MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
+++ b/MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
@@ -47,6 +47,7 @@
[Guids]
gEfiVariableGuid
+ gEfiVariableIndexTableGuid
[Ppis]
gEfiPeiReadOnlyVariable2PpiGuid ## SOMETIMES_PRODUCES (Not for boot mode RECOVERY)