diff options
author | sfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-07 04:49:10 +0000 |
---|---|---|
committer | sfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-07 04:49:10 +0000 |
commit | 9725730b65c97e61769f9c818564b407cb9b5f43 (patch) | |
tree | 7b5a85f1bc00390552e4ee63c59eb77ce8445a95 /MdeModulePkg | |
parent | 63947cc4d01f92209a92cbe3987f324a85a39034 (diff) | |
download | edk2-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')
-rw-r--r-- | MdeModulePkg/Include/Guid/VariableIndexTable.h | 47 | ||||
-rw-r--r-- | MdeModulePkg/MdeModulePkg.dec | 3 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Variable/Pei/Variable.c | 6 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Variable/Pei/Variable.h | 29 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Variable/Pei/VariablePei.inf | 1 |
5 files changed, 54 insertions, 32 deletions
diff --git a/MdeModulePkg/Include/Guid/VariableIndexTable.h b/MdeModulePkg/Include/Guid/VariableIndexTable.h new file mode 100644 index 0000000000..ee0722fd48 --- /dev/null +++ b/MdeModulePkg/Include/Guid/VariableIndexTable.h @@ -0,0 +1,47 @@ +/** @file
+ The variable data structures are related to EDK II-specific implementation of UEFI variables.
+ VariableFormat.h defines variable data headers and variable storage region headers.
+
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef __VARIABLE_INDEX_TABLE_H__
+#define __VARIABLE_INDEX_TABLE_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 } }
+
+extern EFI_GUID gEfiVariableIndexTableGuid;
+
+///
+/// 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;
+
+#endif // __VARIABLE_INDEX_TABLE_H__
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 97499b5c2c..e2b17fe559 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -131,6 +131,9 @@ # Include/Guid/VariableFormat.h
gEfiVariableGuid = { 0xddcf3616, 0x3275, 0x4164, { 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d }}
+ # Include/Guid/VariableIndexTable.h
+ gEfiVariableIndexTableGuid = { 0x8cfdb8c8, 0xd6b2, 0x40f3, { 0x8e, 0x97, 0x02, 0x30, 0x7c, 0xc9, 0x8b, 0x7c }}
+
## Guid is defined for SMM variable module to notify SMM variable wrapper module when variable write service was ready.
# Include/Guid/SmmVariableCommon.h
gSmmVariableWriteGuid = { 0x93ba1826, 0xdffb, 0x45dd, { 0x82, 0xa7, 0xe7, 0xdc, 0xaa, 0x3b, 0xbd, 0xf3 }}
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)
|