diff options
29 files changed, 115 insertions, 90 deletions
diff --git a/DuetPkg/DxeIpl/DxeIpl.h b/DuetPkg/DxeIpl/DxeIpl.h index c8c6794..8b6e9a8 100644 --- a/DuetPkg/DxeIpl/DxeIpl.h +++ b/DuetPkg/DxeIpl/DxeIpl.h @@ -18,6 +18,7 @@ #include <Guid/Mps.h>
#include <Guid/FlashMapHob.h>
#include <Guid/SystemNvDataGuid.h>
+#include <Guid/VariableFormat.h>
#include <Protocol/Decompress.h>
#include <Protocol/StatusCode.h>
@@ -29,7 +30,6 @@ #include <Library/PrintLib.h>
#include <Library/IoLib.h>
-#include <VariableFormat.h>
#include <CpuIA32.h>
#endif // _DUET_DXEIPL_H_
diff --git a/DuetPkg/DxeIpl/DxeIpl.inf b/DuetPkg/DxeIpl/DxeIpl.inf index 6a2ba5d..826aee1 100644 --- a/DuetPkg/DxeIpl/DxeIpl.inf +++ b/DuetPkg/DxeIpl/DxeIpl.inf @@ -39,6 +39,9 @@ ReportStatusCodeLib
IoLib
+[Guids]
+ gEfiVariableGuid
+
[Sources.common]
DxeIpl.h
DxeInit.c
diff --git a/DuetPkg/DxeIpl/HobGeneration.c b/DuetPkg/DxeIpl/HobGeneration.c index 0b215eb..93bf289 100644 --- a/DuetPkg/DxeIpl/HobGeneration.c +++ b/DuetPkg/DxeIpl/HobGeneration.c @@ -738,7 +738,7 @@ PrepareHobNvStorage ( */
{
STATIC VARIABLE_STORE_HEADER VarStoreHeader = {
- VARIABLE_STORE_SIGNATURE,
+ gEfiVariableGuid,
0xffffffff, // will be fixed in Variable driver
VARIABLE_STORE_FORMATTED,
VARIABLE_STORE_HEALTHY,
diff --git a/DuetPkg/FSVariable/FSVariable.c b/DuetPkg/FSVariable/FSVariable.c index 18b93c0..d20b3a7 100644 --- a/DuetPkg/FSVariable/FSVariable.c +++ b/DuetPkg/FSVariable/FSVariable.c @@ -22,7 +22,7 @@ Abstract: #include "FSVariable.h"
VARIABLE_STORE_HEADER mStoreHeaderTemplate = {
- VARIABLE_STORE_SIGNATURE,
+ gEfiVariableGuid,
VOLATILE_VARIABLE_STORE_SIZE,
VARIABLE_STORE_FORMATTED,
VARIABLE_STORE_HEALTHY,
@@ -100,15 +100,18 @@ Returns: --*/
{
- if ((VarStoreHeader->Signature == mStoreHeaderTemplate.Signature) &&
+ if (CompareGuid (&VarStoreHeader->Signature, &mStoreHeaderTemplate.Signature) &&
(VarStoreHeader->Format == mStoreHeaderTemplate.Format) &&
(VarStoreHeader->State == mStoreHeaderTemplate.State)
) {
return EfiValid;
- } else if (VarStoreHeader->Signature == VAR_DEFAULT_VALUE_32 &&
- VarStoreHeader->Size == VAR_DEFAULT_VALUE_32 &&
- VarStoreHeader->Format == VAR_DEFAULT_VALUE &&
- VarStoreHeader->State == VAR_DEFAULT_VALUE
+ } else if (((UINT32 *)(&VarStoreHeader->Signature))[0] == VAR_DEFAULT_VALUE_32 &&
+ ((UINT32 *)(&VarStoreHeader->Signature))[1] == VAR_DEFAULT_VALUE_32 &&
+ ((UINT32 *)(&VarStoreHeader->Signature))[2] == VAR_DEFAULT_VALUE_32 &&
+ ((UINT32 *)(&VarStoreHeader->Signature))[3] == VAR_DEFAULT_VALUE_32 &&
+ VarStoreHeader->Size == VAR_DEFAULT_VALUE_32 &&
+ VarStoreHeader->Format == VAR_DEFAULT_VALUE &&
+ VarStoreHeader->State == VAR_DEFAULT_VALUE
) {
return EfiRaw;
diff --git a/DuetPkg/FSVariable/FSVariable.h b/DuetPkg/FSVariable/FSVariable.h index 9fdd0a7..6da525c 100644 --- a/DuetPkg/FSVariable/FSVariable.h +++ b/DuetPkg/FSVariable/FSVariable.h @@ -38,6 +38,7 @@ Abstract: #include <Guid/HobList.h>
#include <Guid/FlashMapHob.h>
+#include <Guid/VariableFormat.h>
#include <Protocol/Variable.h>
#include <Protocol/VariableWrite.h>
@@ -46,7 +47,6 @@ Abstract: #include "EfiFlashMap.h"
-#include "VariableFormat.h"
#include "VariableStorage.h"
#define VOLATILE_VARIABLE_STORE_SIZE (64 * 1024)
diff --git a/DuetPkg/FSVariable/FSVariable.inf b/DuetPkg/FSVariable/FSVariable.inf index 52a805d..c2a8c84 100644 --- a/DuetPkg/FSVariable/FSVariable.inf +++ b/DuetPkg/FSVariable/FSVariable.inf @@ -57,6 +57,7 @@ [Guids]
gEfiHobListGuid
gEfiFlashMapHobGuid
+ gEfiVariableGuid
[Protocols]
gEfiVariableArchProtocolGuid
diff --git a/DuetPkg/FSVariable/FileStorage.c b/DuetPkg/FSVariable/FileStorage.c index df11ae1..0c25efa 100644 --- a/DuetPkg/FSVariable/FileStorage.c +++ b/DuetPkg/FSVariable/FileStorage.c @@ -247,7 +247,7 @@ FileStorageConstructor ( ASSERT_EFI_ERROR (Status);
ZeroMem (Dev, sizeof(VS_DEV));
- Dev->Signature = VARIABLE_STORE_SIGNATURE;
+ CopyGuid (&Dev->Signature, &gEfiVariableGuid);
Dev->Size = Size;
VAR_DATA_PTR (Dev) = (UINT8 *) (UINTN) NvStorageBase;
VAR_FILE_VOLUMEID (Dev) = VolumeId;
diff --git a/DuetPkg/FSVariable/MemStorage.c b/DuetPkg/FSVariable/MemStorage.c index cb8c864..02582d9 100644 --- a/DuetPkg/FSVariable/MemStorage.c +++ b/DuetPkg/FSVariable/MemStorage.c @@ -59,7 +59,7 @@ MemStorageConstructor ( ZeroMem (Dev, sizeof(VS_DEV));
- Dev->Signature = VARIABLE_STORE_SIGNATURE;
+ CopyGuid (&Dev->Signature, &gEfiVariableGuid);
Dev->Size = Size;
Dev->VarStore.Erase = MemEraseStore;
diff --git a/DuetPkg/FSVariable/VariableStorage.h b/DuetPkg/FSVariable/VariableStorage.h index 2c4a3f9..d5423bb 100644 --- a/DuetPkg/FSVariable/VariableStorage.h +++ b/DuetPkg/FSVariable/VariableStorage.h @@ -100,7 +100,8 @@ typedef struct _VS_DEV { } VS_DEV;
-#define DEV_FROM_THIS(a) CR (a, VS_DEV, VarStore, VARIABLE_STORE_SIGNATURE)
+#define VS_DEV_SIGNATURE SIGNATURE_32 ('$', 'V', 'S', 'D')
+#define DEV_FROM_THIS(a) CR (a, VS_DEV, VarStore, VS_DEV_SIGNATURE)
#define VAR_DATA_PTR(a) ((a)->Info.Data)
#define VAR_FILE_DEVICEPATH(a) ((a)->Info.FileInfo.DevicePath)
diff --git a/IntelFrameworkModulePkg/Universal/VariablePei/Variable.c b/IntelFrameworkModulePkg/Universal/VariablePei/Variable.c index d5881f5..aa43ae1 100644 --- a/IntelFrameworkModulePkg/Universal/VariablePei/Variable.c +++ b/IntelFrameworkModulePkg/Universal/VariablePei/Variable.c @@ -277,7 +277,8 @@ GetVariableStoreStatus ( )
{
- if (VarStoreHeader->Signature == VARIABLE_STORE_SIGNATURE &&
+
+ if (CompareGuid (&VarStoreHeader->Signature, &gEfiVariableGuid) &&
VarStoreHeader->Format == VARIABLE_STORE_FORMATTED &&
VarStoreHeader->State == VARIABLE_STORE_HEALTHY
) {
@@ -285,7 +286,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/IntelFrameworkModulePkg/Universal/VariablePei/Variable.h b/IntelFrameworkModulePkg/Universal/VariablePei/Variable.h index 73cb491..31c855d 100644 --- a/IntelFrameworkModulePkg/Universal/VariablePei/Variable.h +++ b/IntelFrameworkModulePkg/Universal/VariablePei/Variable.h @@ -23,7 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Library/PcdLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/PeiServicesTablePointerLib.h>
-#include <VariableFormat.h>
+#include <Guid/VariableFormat.h>
typedef struct {
VARIABLE_HEADER *CurrPtr;
diff --git a/IntelFrameworkModulePkg/Universal/VariablePei/VariablePei.inf b/IntelFrameworkModulePkg/Universal/VariablePei/VariablePei.inf index 48e9efc..a83c310 100644 --- a/IntelFrameworkModulePkg/Universal/VariablePei/VariablePei.inf +++ b/IntelFrameworkModulePkg/Universal/VariablePei/VariablePei.inf @@ -99,6 +99,9 @@ gEfiPeiReadOnlyVariablePpiGuid # PPI ALWAYS_PRODUCED
gEfiPeiReadOnlyVariable2PpiGuid # PPI ALWAYS_PRODUCED
+[Guids]
+ gEfiVariableGuid
+
################################################################################
#
# Pcd DYNAMIC - list of PCDs that this module is coded for.
diff --git a/MdeModulePkg/Application/VariableInfo/VariableInfo.c b/MdeModulePkg/Application/VariableInfo/VariableInfo.c index 86117a6..ba4f553 100644 --- a/MdeModulePkg/Application/VariableInfo/VariableInfo.c +++ b/MdeModulePkg/Application/VariableInfo/VariableInfo.c @@ -18,7 +18,7 @@ #include <Uefi.h>
#include <Library/UefiLib.h>
#include <Library/UefiApplicationEntryPoint.h>
-#include <Guid/VariableInfo.h>
+#include <Guid/VariableFormat.h>
/**
@@ -45,7 +45,7 @@ UefiMain ( VARIABLE_INFO_ENTRY *VariableInfo;
VARIABLE_INFO_ENTRY *Entry;
- Status = EfiGetSystemConfigurationTable (&gEfiVariableInfoGuid, (VOID **)&Entry);
+ Status = EfiGetSystemConfigurationTable (&gEfiVariableGuid, (VOID **)&Entry);
if (!EFI_ERROR (Status) && (Entry != NULL)) {
Print (L"Non-Volatile EFI Variables:\n");
VariableInfo = Entry;
diff --git a/MdeModulePkg/Application/VariableInfo/VariableInfo.inf b/MdeModulePkg/Application/VariableInfo/VariableInfo.inf index 46e35bd..f963db5 100644 --- a/MdeModulePkg/Application/VariableInfo/VariableInfo.inf +++ b/MdeModulePkg/Application/VariableInfo/VariableInfo.inf @@ -42,4 +42,4 @@ UefiLib
[Guids]
- gEfiVariableInfoGuid ## CONSUMES ## Configuration Table Guid
+ gEfiVariableGuid ## CONSUMES ## Configuration Table Guid
diff --git a/MdeModulePkg/Include/VariableFormat.h b/MdeModulePkg/Include/Guid/VariableFormat.h index 40bd461..b5491e4 100644 --- a/MdeModulePkg/Include/VariableFormat.h +++ b/MdeModulePkg/Include/Guid/VariableFormat.h @@ -16,6 +16,11 @@ #ifndef __VARIABLE_FORMAT_H__
#define __VARIABLE_FORMAT_H__
+#define EFI_VARIABLE_GUID \
+ { 0xddcf3616, 0x3275, 0x4164, { 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d } }
+
+extern EFI_GUID gEfiVariableGuid;
+
///
/// Alignment of variable name and data.
/// For IA32/X64 architecture, the alignment is set to 1, and 8 is for IPF archtecture.
@@ -53,7 +58,7 @@ typedef enum { #pragma pack(1)
-#define VARIABLE_STORE_SIGNATURE SIGNATURE_32 ('$', 'V', 'S', 'S')
+#define VARIABLE_STORE_SIGNATURE EFI_VARIABLE_GUID
///
/// Variable Store Header Format and State
@@ -68,9 +73,10 @@ typedef struct { ///
/// Variable store region signature.
///
- UINT32 Signature;
+ EFI_GUID Signature;
///
- /// Size of variable store region including this header
+ /// Size of entire variable store,
+ /// including size of variable store header but not including the size of FvHeader.
///
UINT32 Size;
///
@@ -131,4 +137,23 @@ typedef struct { #pragma pack()
+typedef struct _VARIABLE_INFO_ENTRY VARIABLE_INFO_ENTRY;
+
+///
+/// This structure contains the variable list that is put in EFI system table.
+/// The variable driver collects all used variables at boot service time and produce this list.
+/// This is an optional feature to dump all used variables in shell environment.
+///
+struct _VARIABLE_INFO_ENTRY {
+ VARIABLE_INFO_ENTRY *Next; ///> Pointer to next entry
+ EFI_GUID VendorGuid; ///> Guid of Variable
+ CHAR16 *Name; ///> Name of Variable
+ UINT32 Attributes; ///> Attributes of variable defined in UEFI spec
+ UINT32 ReadCount; ///> Times to read this variable
+ UINT32 WriteCount; ///> Times to write this variable
+ UINT32 DeleteCount; ///> Times to delete this variable
+ UINT32 CacheCount; ///> Times that cache hits this variable
+ BOOLEAN Volatile; ///> TRUE if volatile FALSE if non-volatile
+};
+
#endif // _EFI_VARIABLE_H_
diff --git a/MdeModulePkg/Include/Guid/VariableInfo.h b/MdeModulePkg/Include/Guid/VariableInfo.h deleted file mode 100644 index 27a4daf..0000000 --- a/MdeModulePkg/Include/Guid/VariableInfo.h +++ /dev/null @@ -1,44 +0,0 @@ -/** @file
- This file defines variable info guid and variable info entry.
- This guid is used to specify the variable list put in the EFI system table.
-
-Copyright (c) 2006 - 2009, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which 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_INFO_GUID_H__
-#define __VARIABLE_INFO_GUID_H__
-
-#define EFI_VARIABLE_INFO_GUID \
- { 0xddcf3616, 0x3275, 0x4164, { 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d } }
-
-extern EFI_GUID gEfiVariableInfoGuid;
-
-
-typedef struct _VARIABLE_INFO_ENTRY VARIABLE_INFO_ENTRY;
-
-///
-/// This structure contains the variable list that is put in EFI system table.
-/// The variable driver collects all used variables at boot service time and produce this list.
-/// This is an optional feature to dump all used variables in shell environment.
-///
-struct _VARIABLE_INFO_ENTRY {
- VARIABLE_INFO_ENTRY *Next; ///> Pointer to next entry
- EFI_GUID VendorGuid; ///> Guid of Variable
- CHAR16 *Name; ///> Name of Variable
- UINT32 Attributes; ///> Attributes of variable defined in UEFI spec
- UINT32 ReadCount; ///> Times to read this variable
- UINT32 WriteCount; ///> Times to write this variable
- UINT32 DeleteCount; ///> Times to delete this variable
- UINT32 CacheCount; ///> Times that cache hits this variable
- BOOLEAN Volatile; ///> TRUE if volatile FALSE if non-volatile
-};
-
-#endif
diff --git a/MdeModulePkg/Library/DxePlatDriOverLib/PlatDriOver.h b/MdeModulePkg/Library/DxePlatDriOverLib/PlatDriOver.h index 1efb493..7cede71 100644 --- a/MdeModulePkg/Library/DxePlatDriOverLib/PlatDriOver.h +++ b/MdeModulePkg/Library/DxePlatDriOverLib/PlatDriOver.h @@ -36,7 +36,7 @@ #include <Library/PlatformDriverOverrideLib.h>
#include <Guid/OverrideVariable.h>
-#include <VariableFormat.h>
+#include <Guid/VariableFormat.h>
#define PLATFORM_OVERRIDE_ITEM_SIGNATURE SIGNATURE_32('p','d','o','i')
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 86754ad..871611c 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -153,9 +153,9 @@ ## Include/Guid/PeiPeCoffLoader.h
gEfiPeiPeCoffLoaderGuid = { 0xD8117CFF, 0x94A6, 0x11D4, { 0x9A, 0x3A, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D }}
- ## Guid specify the variable list entries put in the EFI system table.
- ## Include/Guid/VariableInfo.h
- gEfiVariableInfoGuid = { 0xddcf3616, 0x3275, 0x4164, { 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d }}
+ ## Guid acted as variable store header's signature and to specify the variable list entries put in the EFI system table.
+ ## Include/Guid/VariableFormat.h
+ gEfiVariableGuid = { 0xddcf3616, 0x3275, 0x4164, { 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d }}
## Platform Override Variable guid
## Include/Guid/OverrideVariable.h
diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c index 76f9f09..1fdf25d 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 12cbbc9..5e25d1e 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 482a192..a3fc9d1 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 f98d236..7f4b4f6 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 7641a76..7cee1f0 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 46e29b2..2e5580b 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 0d03376..d25fe03 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 ec35a7d..4e861dc 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 c7ba49b..4406322 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
diff --git a/Nt32Pkg/Nt32Pkg.fdf b/Nt32Pkg/Nt32Pkg.fdf index 0442116..41563de 100644 --- a/Nt32Pkg/Nt32Pkg.fdf +++ b/Nt32Pkg/Nt32Pkg.fdf @@ -73,9 +73,13 @@ DATA = { #Blockmap[1]: End
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
## This is the VARIABLE_STORE_HEADER
- #Signature: "$VSS" #Size: 0xc000 (gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize) - 0x48 (HeaderLength) = 0xBFB8
- # This can speed up the Variable Dispatch a bit.
- 0x24, 0x56, 0x53, 0x53, 0xB8, 0xBF, 0x00, 0x00,
+ #Signature: gEfiVariableGuid =
+ # { 0xddcf3616, 0x3275, 0x4164, { 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d }}
+ 0x16, 0x36, 0xcf, 0xdd, 0x75, 0x32, 0x64, 0x41,
+ 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d,
+ #Size: 0xc000 (gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize) - 0x48 (size of EFI_FIRMWARE_VOLUME_HEADER) = 0xBFB8
+ # This can speed up the Variable Dispatch a bit.
+ 0xB8, 0xBF, 0x00, 0x00,
#FORMATTED: 0x5A #HEALTHY: 0xFE #Reserved: UINT16 #Reserved1: UINT32
0x5A, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}
@@ -216,6 +220,17 @@ INF Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystemDxe.inf INF MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf
INF MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatformDriOverrideDxe.inf
+INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
+INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
+INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
+INF MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxe.inf
+INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
+INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
+INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
+INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
+INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+INF Nt32Pkg/SnpNt32Dxe/SnpNt32Dxe.inf
+INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
################################################################################
#
# FILE statements are provided so that a platform integrator can include
diff --git a/UnixPkg/UnixPkg.fdf b/UnixPkg/UnixPkg.fdf index 9568956..b54537c 100644 --- a/UnixPkg/UnixPkg.fdf +++ b/UnixPkg/UnixPkg.fdf @@ -73,9 +73,13 @@ DATA = { # Blockmap[1]: End
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
## This is the VARIABLE_STORE_HEADER
- #Signature: "$VSS" #Size: 0xc000 (gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize) - 0x48 (HeaderLength) = 0xBFB8
- # This can speed up the Variable Dispatch a bit.
- 0x24, 0x56, 0x53, 0x53, 0xB8, 0xBF, 0x00, 0x00,
+ #Signature: gEfiVariableGuid =
+ # { 0xddcf3616, 0x3275, 0x4164, { 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d }}
+ 0x16, 0x36, 0xcf, 0xdd, 0x75, 0x32, 0x64, 0x41,
+ 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d,
+ #Size: 0xc000 (gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize) - 0x48 (size of EFI_FIRMWARE_VOLUME_HEADER) = 0xBFB8
+ # This can speed up the Variable Dispatch a bit.
+ 0xB8, 0xBF, 0x00, 0x00,
#FORMATTED: 0x5A #HEALTHY: 0xFE #Reserved: UINT16 #Reserved1: UINT32
0x5A, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}
|