summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Variable
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-27 05:35:08 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-27 05:35:08 +0000
commit3709c4cd5bc3956fee59f31bdd1b7dc5b61a039a (patch)
tree2787bfad81002d6b2b5139e79889dc69e488b835 /MdeModulePkg/Universal/Variable
parentaa19fa57db2a32a2cf41c6e1dee033129840ff1a (diff)
downloadedk2-platforms-3709c4cd5bc3956fee59f31bdd1b7dc5b61a039a.tar.xz
1. delete Include/Guid/VariableInfo.h
2. move VariableFormat.h into GUID directory and change the “Signature” field of the VARIABLE_STORE_HEADER to gEfiVariableGuid value. 3. merging VARIABLE_INFO_ENTRY structure into the new Include/Guid/VariableFormat.h 4. change gEfiVariableInfoGuid into gEfiVariableGuid. 5. modify FDF files to use new guid value instead of the original signature. 6. all code related to signature is changed to use guid value. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7728 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Variable')
-rw-r--r--MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c2
-rw-r--r--MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf1
-rw-r--r--MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h2
-rw-r--r--MdeModulePkg/Universal/Variable/Pei/Variable.c8
-rw-r--r--MdeModulePkg/Universal/Variable/Pei/Variable.h2
-rw-r--r--MdeModulePkg/Universal/Variable/Pei/VariablePei.inf3
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c17
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h3
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf2
9 files changed, 25 insertions, 15 deletions
diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
index 76f9f09260..1fdf25de27 100644
--- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
+++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
@@ -822,7 +822,7 @@ InitializeVariableStore (
*VariableBase = (EFI_PHYSICAL_ADDRESS) (UINTN) VariableStore;
*LastVariableOffset = sizeof (VARIABLE_STORE_HEADER);
- VariableStore->Signature = VARIABLE_STORE_SIGNATURE;
+ CopyGuid (&VariableStore->Signature, &gEfiVariableGuid);
VariableStore->Size = FixedPcdGet32(PcdVariableStoreSize);
VariableStore->Format = VARIABLE_STORE_FORMATTED;
VariableStore->State = VARIABLE_STORE_HEALTHY;
diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf
index 12cbbc929a..5e25d1efae 100644
--- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf
+++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf
@@ -56,6 +56,7 @@
[Guids]
gEfiEventVirtualAddressChangeGuid ## PRODUCES ## Event
+ gEfiVariableGuid
[Pcd.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize
diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h
index 482a192a38..a3fc9d1eeb 100644
--- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h
+++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h
@@ -31,7 +31,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/UefiLib.h>
#include <Library/BaseLib.h>
#include <Library/PcdLib.h>
-#include <VariableFormat.h>
+#include <Guid/VariableFormat.h>
#include <Guid/EventGroup.h>
diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.c b/MdeModulePkg/Universal/Variable/Pei/Variable.c
index f98d236443..7f4b4f68d7 100644
--- a/MdeModulePkg/Universal/Variable/Pei/Variable.c
+++ b/MdeModulePkg/Universal/Variable/Pei/Variable.c
@@ -268,7 +268,8 @@ GetVariableStoreStatus (
IN VARIABLE_STORE_HEADER *VarStoreHeader
)
{
- if (VarStoreHeader->Signature == VARIABLE_STORE_SIGNATURE &&
+
+ if (CompareGuid (&VarStoreHeader->Signature, &gEfiVariableGuid) &&
VarStoreHeader->Format == VARIABLE_STORE_FORMATTED &&
VarStoreHeader->State == VARIABLE_STORE_HEALTHY
) {
@@ -276,7 +277,10 @@ GetVariableStoreStatus (
return EfiValid;
}
- if (VarStoreHeader->Signature == 0xffffffff &&
+ if (((UINT32 *)(&VarStoreHeader->Signature))[0] == 0xffffffff &&
+ ((UINT32 *)(&VarStoreHeader->Signature))[1] == 0xffffffff &&
+ ((UINT32 *)(&VarStoreHeader->Signature))[2] == 0xffffffff &&
+ ((UINT32 *)(&VarStoreHeader->Signature))[3] == 0xffffffff &&
VarStoreHeader->Size == 0xffffffff &&
VarStoreHeader->Format == 0xff &&
VarStoreHeader->State == 0xff
diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.h b/MdeModulePkg/Universal/Variable/Pei/Variable.h
index 7641a760d0..7cee1f08b5 100644
--- a/MdeModulePkg/Universal/Variable/Pei/Variable.h
+++ b/MdeModulePkg/Universal/Variable/Pei/Variable.h
@@ -28,7 +28,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/PeiServicesTablePointerLib.h>
#include <Library/PeiServicesLib.h>
-#include <VariableFormat.h>
+#include <Guid/VariableFormat.h>
typedef struct {
VARIABLE_HEADER *CurrPtr;
diff --git a/MdeModulePkg/Universal/Variable/Pei/VariablePei.inf b/MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
index 46e29b2cca..2e5580bde6 100644
--- a/MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
+++ b/MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
@@ -57,6 +57,9 @@
PeiServicesTablePointerLib
PeiServicesLib
+[Guids]
+ gEfiVariableGuid
+
[Ppis]
gEfiPeiReadOnlyVariable2PpiGuid ## SOMETIMES_PRODUCES (Not for boot mode RECOVERY)
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index 0d03376359..d25fe038aa 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -137,7 +137,7 @@ UpdateVariableInfo (
StrCpy (gVariableInfo->Name, VariableName);
gVariableInfo->Volatile = Volatile;
- gBS->InstallConfigurationTable (&gEfiVariableInfoGuid, gVariableInfo);
+ gBS->InstallConfigurationTable (&gEfiVariableGuid, gVariableInfo);
}
@@ -362,16 +362,19 @@ GetVariableStoreStatus (
IN VARIABLE_STORE_HEADER *VarStoreHeader
)
{
- if (VarStoreHeader->Signature == VARIABLE_STORE_SIGNATURE &&
+ if (CompareGuid (&VarStoreHeader->Signature, &gEfiVariableGuid) &&
VarStoreHeader->Format == VARIABLE_STORE_FORMATTED &&
VarStoreHeader->State == VARIABLE_STORE_HEALTHY
) {
return EfiValid;
- } else if (VarStoreHeader->Signature == 0xffffffff &&
- VarStoreHeader->Size == 0xffffffff &&
- VarStoreHeader->Format == 0xff &&
- VarStoreHeader->State == 0xff
+ } else if (((UINT32 *)(&VarStoreHeader->Signature))[0] == 0xffffffff &&
+ ((UINT32 *)(&VarStoreHeader->Signature))[1] == 0xffffffff &&
+ ((UINT32 *)(&VarStoreHeader->Signature))[2] == 0xffffffff &&
+ ((UINT32 *)(&VarStoreHeader->Signature))[3] == 0xffffffff &&
+ VarStoreHeader->Size == 0xffffffff &&
+ VarStoreHeader->Format == 0xff &&
+ VarStoreHeader->State == 0xff
) {
return EfiRaw;
@@ -1849,7 +1852,7 @@ VariableCommonInitialize (
mVariableModuleGlobal->VariableGlobal.VolatileVariableBase = (EFI_PHYSICAL_ADDRESS) (UINTN) VolatileVariableStore;
mVariableModuleGlobal->VolatileLastVariableOffset = (UINTN) GetStartPointer (VolatileVariableStore) - (UINTN) VolatileVariableStore;
- VolatileVariableStore->Signature = VARIABLE_STORE_SIGNATURE;
+ CopyGuid (&VolatileVariableStore->Signature, &gEfiVariableGuid);
VolatileVariableStore->Size = FixedPcdGet32(PcdVariableStoreSize);
VolatileVariableStore->Format = VARIABLE_STORE_FORMATTED;
VolatileVariableStore->State = VARIABLE_STORE_HEALTHY;
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
index ec35a7dfcf..4e861dccbc 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
@@ -34,10 +34,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/BaseLib.h>
#include <Library/SynchronizationLib.h>
#include <Library/MemoryAllocationLib.h>
-#include <Guid/VariableInfo.h>
#include <Guid/GlobalVariable.h>
#include <Guid/EventGroup.h>
-#include <VariableFormat.h>
+#include <Guid/VariableFormat.h>
#define VARIABLE_RECLAIM_THRESHOLD (1024)
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
index c7ba49b11f..44063224a7 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
@@ -60,7 +60,7 @@
gEfiVariableArchProtocolGuid ## ALWAYS_PRODUCES
[Guids]
- gEfiVariableInfoGuid ## PRODUCES ## Configuration Table Guid
+ gEfiVariableGuid ## PRODUCES ## Configuration Table Guid
gEfiGlobalVariableGuid ## PRODUCES ## Variable Guid
gEfiEventVirtualAddressChangeGuid ## PRODUCES ## Event