Remove unnecessary use of FixedPcdxxx() functions and [FixedPcd] INF sections. These should only be used for PCDs that are used to pre-init global variables, pre-init global structures, or size arrays.

Do some minor clean ups to INF files
 


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9868 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
mdkinney 2010-01-29 23:39:48 +00:00
parent c37f052fe9
commit 188e4e8444
14 changed files with 85 additions and 90 deletions

View File

@ -5,7 +5,7 @@
# space for these devices. Please use PCD feature flag PcdPciBusHotplugDeviceSupport to enable # space for these devices. Please use PCD feature flag PcdPciBusHotplugDeviceSupport to enable
# hot plug supporting. # hot plug supporting.
# #
# Copyright (c) 2006 - 2009, Intel Corporation # Copyright (c) 2006 - 2010, Intel Corporation
# #
# All rights reserved. This program and the accompanying materials # All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # are licensed and made available under the terms and conditions of the BSD License
@ -23,7 +23,6 @@
FILE_GUID = 93B80004-9FB3-11d4-9A3A-0090273FC14D FILE_GUID = 93B80004-9FB3-11d4-9A3A-0090273FC14D
MODULE_TYPE = UEFI_DRIVER MODULE_TYPE = UEFI_DRIVER
VERSION_STRING = 1.0 VERSION_STRING = 1.0
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = PciBusEntryPoint ENTRY_POINT = PciBusEntryPoint
# #
@ -36,7 +35,7 @@
# COMPONENT_NAME2 = gPciBusComponentName2 # COMPONENT_NAME2 = gPciBusComponentName2
# #
[Sources.common] [Sources]
PciLib.c PciLib.c
PciIo.c PciIo.c
PciBus.c PciBus.c
@ -99,14 +98,14 @@
gEfiIncompatiblePciDeviceSupportProtocolGuid ## CONSUMED gEfiIncompatiblePciDeviceSupportProtocolGuid ## CONSUMED
gEfiLoadFile2ProtocolGuid ## CONSUMED gEfiLoadFile2ProtocolGuid ## CONSUMED
[FeaturePcd.common] [FeaturePcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdPciBusHotplugDeviceSupport gEfiMdeModulePkgTokenSpaceGuid.PcdPciBusHotplugDeviceSupport
gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport
gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport
gEfiMdeModulePkgTokenSpaceGuid.PcdMrIovSupport gEfiMdeModulePkgTokenSpaceGuid.PcdMrIovSupport
gEfiMdeModulePkgTokenSpaceGuid.PcdPciBridgeIoAlignmentProbe gEfiMdeModulePkgTokenSpaceGuid.PcdPciBridgeIoAlignmentProbe
[FixedPcd.common] [Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize
# [Event] # [Event]

View File

@ -2040,7 +2040,7 @@ CreatePciIoDevice (
); );
DEBUG ((EFI_D_INFO, "PCI-IOV B%x.D%x.F%x - SupportedPageSize - 0x%x\n", (UINTN)Bus, (UINTN)Device, (UINTN)Func, PciIoDevice->SystemPageSize)); DEBUG ((EFI_D_INFO, "PCI-IOV B%x.D%x.F%x - SupportedPageSize - 0x%x\n", (UINTN)Bus, (UINTN)Device, (UINTN)Func, PciIoDevice->SystemPageSize));
PciIoDevice->SystemPageSize = (FixedPcdGet32(PcdSrIovSystemPageSize) & PciIoDevice->SystemPageSize); PciIoDevice->SystemPageSize = (PcdGet32 (PcdSrIovSystemPageSize) & PciIoDevice->SystemPageSize);
ASSERT (PciIoDevice->SystemPageSize != 0); ASSERT (PciIoDevice->SystemPageSize != 0);
PciIo->Pci.Write ( PciIo->Pci.Write (

View File

@ -75,7 +75,7 @@ DiscoverPeimsAndOrderWithApriori (
// //
// Go ahead to scan this Fv, and cache FileHandles within it. // Go ahead to scan this Fv, and cache FileHandles within it.
// //
for (PeimCount = 0; PeimCount < FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv); PeimCount++) { for (PeimCount = 0; PeimCount < PcdGet32 (PcdPeiCoreMaxPeimPerFv); PeimCount++) {
Status = FvPpi->FindFileByType (FvPpi, PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE, CoreFileHandle->FvHandle, &FileHandle); Status = FvPpi->FindFileByType (FvPpi, PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE, CoreFileHandle->FvHandle, &FileHandle);
if (Status != EFI_SUCCESS) { if (Status != EFI_SUCCESS) {
break; break;
@ -88,7 +88,7 @@ DiscoverPeimsAndOrderWithApriori (
// Check whether the count of Peims exceeds the max support PEIMs in a FV image // Check whether the count of Peims exceeds the max support PEIMs in a FV image
// If more Peims are required in a FV image, PcdPeiCoreMaxPeimPerFv can be set to a larger value in DSC file. // If more Peims are required in a FV image, PcdPeiCoreMaxPeimPerFv can be set to a larger value in DSC file.
// //
ASSERT (PeimCount < FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)); ASSERT (PeimCount < PcdGet32 (PcdPeiCoreMaxPeimPerFv));
// //
// Get Apriori File handle // Get Apriori File handle
@ -293,7 +293,7 @@ PeiDispatcher (
SaveCurrentFileHandle = Private->CurrentFileHandle; SaveCurrentFileHandle = Private->CurrentFileHandle;
for (Index1 = 0; Index1 <= SaveCurrentFvCount; Index1++) { for (Index1 = 0; Index1 <= SaveCurrentFvCount; Index1++) {
for (Index2 = 0; (Index2 < FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)) && (Private->Fv[Index1].FvFileHandles[Index2] != NULL); Index2++) { for (Index2 = 0; (Index2 < PcdGet32 (PcdPeiCoreMaxPeimPerFv)) && (Private->Fv[Index1].FvFileHandles[Index2] != NULL); Index2++) {
if (Private->Fv[Index1].PeimState[Index2] == PEIM_STATE_REGISITER_FOR_SHADOW) { if (Private->Fv[Index1].PeimState[Index2] == PEIM_STATE_REGISITER_FOR_SHADOW) {
PeimFileHandle = Private->Fv[Index1].FvFileHandles[Index2]; PeimFileHandle = Private->Fv[Index1].FvFileHandles[Index2];
Status = PeiLoadImage ( Status = PeiLoadImage (
@ -379,7 +379,7 @@ PeiDispatcher (
// Start to dispatch all modules within the current Fv. // Start to dispatch all modules within the current Fv.
// //
for (PeimCount = Private->CurrentPeimCount; for (PeimCount = Private->CurrentPeimCount;
(PeimCount < FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)) && (Private->CurrentFvFileHandles[PeimCount] != NULL); (PeimCount < PcdGet32 (PcdPeiCoreMaxPeimPerFv)) && (Private->CurrentFvFileHandles[PeimCount] != NULL);
PeimCount++) { PeimCount++) {
Private->CurrentPeimCount = PeimCount; Private->CurrentPeimCount = PeimCount;
PeimFileHandle = Private->CurrentFileHandle = Private->CurrentFvFileHandles[PeimCount]; PeimFileHandle = Private->CurrentFileHandle = Private->CurrentFvFileHandles[PeimCount];

View File

@ -368,8 +368,8 @@ FirmwareVolmeInfoPpiNotifyCallback (
Status = EFI_SUCCESS; Status = EFI_SUCCESS;
PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices); PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);
if (PrivateData->FvCount >= FixedPcdGet32 (PcdPeiCoreMaxFvSupported)) { if (PrivateData->FvCount >= PcdGet32 (PcdPeiCoreMaxFvSupported)) {
DEBUG ((EFI_D_ERROR, "The number of Fv Images (%d) exceed the max supported FVs (%d) in Pei", PrivateData->FvCount + 1, FixedPcdGet32 (PcdPeiCoreMaxFvSupported))); DEBUG ((EFI_D_ERROR, "The number of Fv Images (%d) exceed the max supported FVs (%d) in Pei", PrivateData->FvCount + 1, PcdGet32 (PcdPeiCoreMaxFvSupported)));
DEBUG ((EFI_D_ERROR, "PcdPeiCoreMaxFvSupported value need be reconfigurated in DSC")); DEBUG ((EFI_D_ERROR, "PcdPeiCoreMaxFvSupported value need be reconfigurated in DSC"));
ASSERT (FALSE); ASSERT (FALSE);
} }
@ -1417,7 +1417,7 @@ PeiReinitializeFv (
// //
// Fixup all FvPpi pointers for the implementation in flash to permanent memory. // Fixup all FvPpi pointers for the implementation in flash to permanent memory.
// //
for (Index = 0; Index < FixedPcdGet32 (PcdPeiCoreMaxFvSupported); Index ++) { for (Index = 0; Index < PcdGet32 (PcdPeiCoreMaxFvSupported); Index ++) {
if (PrivateData->Fv[Index].FvPpi == OldFfs2FvPpi) { if (PrivateData->Fv[Index].FvPpi == OldFfs2FvPpi) {
PrivateData->Fv[Index].FvPpi = &mPeiFfs2FvPpi; PrivateData->Fv[Index].FvPpi = &mPeiFfs2FvPpi;
} }
@ -1452,7 +1452,7 @@ AddUnknownFormatFvInfo (
{ {
PEI_CORE_UNKNOW_FORMAT_FV_INFO *NewUnknownFv; PEI_CORE_UNKNOW_FORMAT_FV_INFO *NewUnknownFv;
if (PrivateData->UnknownFvInfoCount + 1 >= FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)) { if (PrivateData->UnknownFvInfoCount + 1 >= PcdGet32 (PcdPeiCoreMaxPeimPerFv)) {
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }

View File

@ -1,7 +1,7 @@
/** @file /** @file
EFI PEI Core PPI services EFI PEI Core PPI services
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -30,9 +30,9 @@ InitializePpiServices (
) )
{ {
if (OldCoreData == NULL) { if (OldCoreData == NULL) {
PrivateData->PpiData.NotifyListEnd = FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1; PrivateData->PpiData.NotifyListEnd = PcdGet32 (PcdPeiCoreMaxPpiSupported)-1;
PrivateData->PpiData.DispatchListEnd = FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1; PrivateData->PpiData.DispatchListEnd = PcdGet32 (PcdPeiCoreMaxPpiSupported)-1;
PrivateData->PpiData.LastDispatchedNotify = FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1; PrivateData->PpiData.LastDispatchedNotify = PcdGet32 (PcdPeiCoreMaxPpiSupported)-1;
} }
} }
@ -60,7 +60,7 @@ ConvertPpiPointers (
UINT8 Index; UINT8 Index;
PEI_PPI_LIST_POINTERS *PpiPointer; PEI_PPI_LIST_POINTERS *PpiPointer;
for (Index = 0; Index < FixedPcdGet32 (PcdPeiCoreMaxPpiSupported); Index++) { for (Index = 0; Index < PcdGet32 (PcdPeiCoreMaxPpiSupported); Index++) {
if (Index < PrivateData->PpiData.PpiListEnd || if (Index < PrivateData->PpiData.PpiListEnd ||
Index > PrivateData->PpiData.NotifyListEnd) { Index > PrivateData->PpiData.NotifyListEnd) {
PpiPointer = &PrivateData->PpiData.PpiListPtrs[Index]; PpiPointer = &PrivateData->PpiData.PpiListPtrs[Index];
@ -254,7 +254,7 @@ PeiReInstallPpi (
// Remove the old PPI from the database, add the new one. // Remove the old PPI from the database, add the new one.
// //
DEBUG((EFI_D_INFO, "Reinstall PPI: %g\n", NewPpi->Guid)); DEBUG((EFI_D_INFO, "Reinstall PPI: %g\n", NewPpi->Guid));
ASSERT (Index < FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)); ASSERT (Index < (INTN)(PcdGet32 (PcdPeiCoreMaxPpiSupported)));
PrivateData->PpiData.PpiListPtrs[Index].Ppi = (EFI_PEI_PPI_DESCRIPTOR *) NewPpi; PrivateData->PpiData.PpiListPtrs[Index].Ppi = (EFI_PEI_PPI_DESCRIPTOR *) NewPpi;
// //
@ -512,7 +512,7 @@ ProcessNotifyList (
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH, EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH,
PrivateData->PpiData.LastDispatchedInstall, PrivateData->PpiData.LastDispatchedInstall,
PrivateData->PpiData.PpiListEnd, PrivateData->PpiData.PpiListEnd,
FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)-1, PcdGet32 (PcdPeiCoreMaxPpiSupported)-1,
PrivateData->PpiData.DispatchListEnd PrivateData->PpiData.DispatchListEnd
); );
PrivateData->PpiData.LastDispatchedInstall = TempValue; PrivateData->PpiData.LastDispatchedInstall = TempValue;

View File

@ -1,7 +1,7 @@
/** @file /** @file
Sample ACPI Platform Driver Sample ACPI Platform Driver
Copyright (c) 2008 - 2009, Intel Corporation<BR> Copyright (c) 2008 - 2010, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -93,7 +93,7 @@ LocateFvInstanceWithTables (
// //
Status = FvInstance->ReadFile ( Status = FvInstance->ReadFile (
FvInstance, FvInstance,
(EFI_GUID*)FixedPcdGetPtr (PcdAcpiTableStorageFile), (EFI_GUID*)PcdGetPtr (PcdAcpiTableStorageFile),
NULL, NULL,
&Size, &Size,
&FileType, &FileType,
@ -207,7 +207,7 @@ AcpiPlatformEntryPoint (
Status = FwVol->ReadSection ( Status = FwVol->ReadSection (
FwVol, FwVol,
(EFI_GUID*)FixedPcdGetPtr (PcdAcpiTableStorageFile), (EFI_GUID*)PcdGetPtr (PcdAcpiTableStorageFile),
EFI_SECTION_RAW, EFI_SECTION_RAW,
Instance, Instance,
(VOID**) &CurrentTable, (VOID**) &CurrentTable,

View File

@ -1,7 +1,7 @@
#/** @file #/** @file
# Sample ACPI Platform Driver # Sample ACPI Platform Driver
# #
# Copyright (c) 2008 - 2009, Intel Corporation. <BR> # Copyright (c) 2008 - 2010, Intel Corporation. <BR>
# All rights reserved. This program and the accompanying materials # All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # 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 # which accompanies this distribution. The full text of the license may be found at
@ -18,8 +18,6 @@
FILE_GUID = cb933912-df8f-4305-b1f9-7b44fa11395c FILE_GUID = cb933912-df8f-4305-b1f9-7b44fa11395c
MODULE_TYPE = DXE_DRIVER MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0 VERSION_STRING = 1.0
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = AcpiPlatformEntryPoint ENTRY_POINT = AcpiPlatformEntryPoint
# #
@ -28,7 +26,7 @@
# VALID_ARCHITECTURES = IA32 X64 IPF EBC # VALID_ARCHITECTURES = IA32 X64 IPF EBC
# #
[Sources.common] [Sources]
AcpiPlatform.c AcpiPlatform.c
[Packages] [Packages]
@ -47,7 +45,7 @@
[Protocols] [Protocols]
gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED
[FixedPcd.common] [Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiTableStorageFile gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiTableStorageFile
[Depex] [Depex]

View File

@ -598,7 +598,7 @@ TerminalDriverBindingStart (
goto Error; goto Error;
} }
TerminalType = FixedPcdGet8 (PcdDefaultTerminalType); TerminalType = PcdGet8 (PcdDefaultTerminalType);
// //
// Must be between PCANSITYPE (0) and VTUTF8TYPE (3) // Must be between PCANSITYPE (0) and VTUTF8TYPE (3)
// //

View File

@ -276,7 +276,7 @@
# - Variable GUID for HII type PCD # - Variable GUID for HII type PCD
# - Token space GUID for dynamicex type PCD # - Token space GUID for dynamicex type PCD
# #
# Copyright (c) 2006 - 2009, Intel Corporation # Copyright (c) 2006 - 2010, Intel Corporation
# #
# All rights reserved. This program and the accompanying materials # All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # are licensed and made available under the terms and conditions of the BSD License
@ -303,7 +303,7 @@
# VALID_ARCHITECTURES = IA32 X64 IPF EBC # VALID_ARCHITECTURES = IA32 X64 IPF EBC
# #
[Sources.common] [Sources]
Pcd.c Pcd.c
Service.c Service.c
Service.h Service.h
@ -331,7 +331,7 @@
gPcdProtocolGuid ## PRODUCES gPcdProtocolGuid ## PRODUCES
gEfiPcdProtocolGuid ## PRODUCES gEfiPcdProtocolGuid ## PRODUCES
[FixedPcd.common] [Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress
[Depex] [Depex]

View File

@ -119,7 +119,7 @@ GetWorker (
switch (LocalTokenNumber & PCD_TYPE_ALL_SET) { switch (LocalTokenNumber & PCD_TYPE_ALL_SET) {
case PCD_TYPE_VPD: case PCD_TYPE_VPD:
VpdHead = (VPD_HEAD *) ((UINT8 *) PcdDb + Offset); VpdHead = (VPD_HEAD *) ((UINT8 *) PcdDb + Offset);
RetPtr = (VOID *) (UINTN) (FixedPcdGet32(PcdVpdBaseAddress) + VpdHead->Offset); RetPtr = (VOID *) (UINTN) (PcdGet32 (PcdVpdBaseAddress) + VpdHead->Offset);
break; break;
case PCD_TYPE_HII: case PCD_TYPE_HII:

View File

@ -271,7 +271,7 @@
# - Variable GUID for HII type PCD # - Variable GUID for HII type PCD
# - Token space GUID for dynamicex type PCD # - Token space GUID for dynamicex type PCD
# #
# Copyright (c) 2006 - 2009, Intel Corporation # Copyright (c) 2006 - 2010, Intel Corporation
# #
# All rights reserved. This program and the accompanying materials # All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # are licensed and made available under the terms and conditions of the BSD License
@ -298,7 +298,7 @@
# VALID_ARCHITECTURES = IA32 X64 IPF EBC (EBC is for build only) # VALID_ARCHITECTURES = IA32 X64 IPF EBC (EBC is for build only)
# #
[Sources.common] [Sources]
Service.c Service.c
Service.h Service.h
Pcd.c Pcd.c
@ -328,7 +328,7 @@
[FeaturePcd] [FeaturePcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiFullPcdDatabaseEnable gEfiMdeModulePkgTokenSpaceGuid.PcdPeiFullPcdDatabaseEnable
[FixedPcd] [Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPcdCallBackNumberPerPcdEntry || PcdPeiFullPcdDatabaseEnable gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPcdCallBackNumberPerPcdEntry || PcdPeiFullPcdDatabaseEnable

View File

@ -87,13 +87,13 @@ PeiRegisterCallBackWorker (
ASSERT (GuidHob != NULL); ASSERT (GuidHob != NULL);
CallbackTable = GET_GUID_HOB_DATA (GuidHob); CallbackTable = GET_GUID_HOB_DATA (GuidHob);
CallbackTable = CallbackTable + (TokenNumber * FixedPcdGet32(PcdMaxPeiPcdCallBackNumberPerPcdEntry)); CallbackTable = CallbackTable + (TokenNumber * PcdGet32 (PcdMaxPeiPcdCallBackNumberPerPcdEntry));
Compare = Register? NULL: CallBackFunction; Compare = Register? NULL: CallBackFunction;
Assign = Register? CallBackFunction: NULL; Assign = Register? CallBackFunction: NULL;
for (Idx = 0; Idx < FixedPcdGet32(PcdMaxPeiPcdCallBackNumberPerPcdEntry); Idx++) { for (Idx = 0; Idx < PcdGet32 (PcdMaxPeiPcdCallBackNumberPerPcdEntry); Idx++) {
if (CallbackTable[Idx] == Compare) { if (CallbackTable[Idx] == Compare) {
CallbackTable[Idx] = Assign; CallbackTable[Idx] = Assign;
return EFI_SUCCESS; return EFI_SUCCESS;
@ -126,7 +126,7 @@ BuildPcdDatabase (
CopyMem (&Database->Init, &gPEIPcdDbInit, sizeof (gPEIPcdDbInit)); CopyMem (&Database->Init, &gPEIPcdDbInit, sizeof (gPEIPcdDbInit));
SizeOfCallbackFnTable = PEI_LOCAL_TOKEN_NUMBER * sizeof (PCD_PPI_CALLBACK) * FixedPcdGet32(PcdMaxPeiPcdCallBackNumberPerPcdEntry); SizeOfCallbackFnTable = PEI_LOCAL_TOKEN_NUMBER * sizeof (PCD_PPI_CALLBACK) * PcdGet32 (PcdMaxPeiPcdCallBackNumberPerPcdEntry);
CallbackFnTable = BuildGuidHob (&gEfiCallerIdGuid, SizeOfCallbackFnTable); CallbackFnTable = BuildGuidHob (&gEfiCallerIdGuid, SizeOfCallbackFnTable);
@ -300,9 +300,9 @@ InvokeCallbackOnSet (
CallbackTable = GET_GUID_HOB_DATA (GuidHob); CallbackTable = GET_GUID_HOB_DATA (GuidHob);
CallbackTable += (TokenNumber * FixedPcdGet32(PcdMaxPeiPcdCallBackNumberPerPcdEntry)); CallbackTable += (TokenNumber * PcdGet32 (PcdMaxPeiPcdCallBackNumberPerPcdEntry));
for (Idx = 0; Idx < FixedPcdGet32(PcdMaxPeiPcdCallBackNumberPerPcdEntry); Idx++) { for (Idx = 0; Idx < PcdGet32 (PcdMaxPeiPcdCallBackNumberPerPcdEntry); Idx++) {
if (CallbackTable[Idx] != NULL) { if (CallbackTable[Idx] != NULL) {
CallbackTable[Idx] (Guid, CallbackTable[Idx] (Guid,
(Guid == NULL)? TokenNumber: ExTokenNumber, (Guid == NULL)? TokenNumber: ExTokenNumber,
@ -621,7 +621,7 @@ GetWorker (
{ {
VPD_HEAD *VpdHead; VPD_HEAD *VpdHead;
VpdHead = (VPD_HEAD *) ((UINT8 *)PeiPcdDb + Offset); VpdHead = (VPD_HEAD *) ((UINT8 *)PeiPcdDb + Offset);
return (VOID *) (UINTN) (FixedPcdGet32(PcdVpdBaseAddress) + VpdHead->Offset); return (VOID *) (UINTN) (PcdGet32 (PcdVpdBaseAddress) + VpdHead->Offset);
} }
case PCD_TYPE_HII: case PCD_TYPE_HII:

View File

@ -3,7 +3,7 @@
Emulation Variable services operate on the runtime volatile memory. Emulation Variable services operate on the runtime volatile memory.
The nonvolatile variable space doesn't exist. The nonvolatile variable space doesn't exist.
Copyright (c) 2006 - 2008, Intel Corporation Copyright (c) 2006 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -767,9 +767,9 @@ UpdateVariable (
if ((Attributes & EFI_VARIABLE_NON_VOLATILE) != 0) { if ((Attributes & EFI_VARIABLE_NON_VOLATILE) != 0) {
NonVolatileVarableStoreSize = ((VARIABLE_STORE_HEADER *)(UINTN)(Global->NonVolatileVariableBase))->Size; NonVolatileVarableStoreSize = ((VARIABLE_STORE_HEADER *)(UINTN)(Global->NonVolatileVariableBase))->Size;
if ((((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) != 0) if ((((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) != 0)
&& ((VarSize + mVariableModuleGlobal->HwErrVariableTotalSize) > FixedPcdGet32(PcdHwErrStorageSize))) && ((VarSize + mVariableModuleGlobal->HwErrVariableTotalSize) > PcdGet32 (PcdHwErrStorageSize)))
|| (((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == 0) || (((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == 0)
&& ((VarSize + mVariableModuleGlobal->CommonVariableTotalSize) > NonVolatileVarableStoreSize - sizeof (VARIABLE_STORE_HEADER) - FixedPcdGet32(PcdHwErrStorageSize)))) { && ((VarSize + mVariableModuleGlobal->CommonVariableTotalSize) > NonVolatileVarableStoreSize - sizeof (VARIABLE_STORE_HEADER) - PcdGet32 (PcdHwErrStorageSize)))) {
Status = EFI_OUT_OF_RESOURCES; Status = EFI_OUT_OF_RESOURCES;
goto Done; goto Done;
} }
@ -1166,12 +1166,12 @@ EmuSetVariable (
} }
// //
// The size of the VariableName, including the Unicode Null in bytes plus // The size of the VariableName, including the Unicode Null in bytes plus
// the DataSize is limited to maximum size of FixedPcdGet32(PcdMaxHardwareErrorVariableSize) // the DataSize is limited to maximum size of PcdGet32 (PcdMaxHardwareErrorVariableSize)
// bytes for HwErrRec, and FixedPcdGet32(PcdMaxVariableSize) bytes for the others. // bytes for HwErrRec, and PcdGet32 (PcdMaxVariableSize) bytes for the others.
// //
if ((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) { if ((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {
if ((DataSize > FixedPcdGet32(PcdMaxHardwareErrorVariableSize)) || if ((DataSize > PcdGet32 (PcdMaxHardwareErrorVariableSize)) ||
(sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > FixedPcdGet32(PcdMaxHardwareErrorVariableSize))) { (sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > PcdGet32 (PcdMaxHardwareErrorVariableSize))) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
// //
@ -1183,10 +1183,10 @@ EmuSetVariable (
} else { } else {
// //
// The size of the VariableName, including the Unicode Null in bytes plus // The size of the VariableName, including the Unicode Null in bytes plus
// the DataSize is limited to maximum size of FixedPcdGet32(PcdMaxVariableSize) bytes. // the DataSize is limited to maximum size of PcdGet32 (PcdMaxVariableSize) bytes.
// //
if ((DataSize > FixedPcdGet32(PcdMaxVariableSize)) || if ((DataSize > PcdGet32 (PcdMaxVariableSize)) ||
(sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > FixedPcdGet32(PcdMaxVariableSize))) { (sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > PcdGet32 (PcdMaxVariableSize))) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
} }
@ -1301,18 +1301,18 @@ EmuQueryVariableInfo (
// Harware error record variable needs larger size. // Harware error record variable needs larger size.
// //
if ((Attributes & (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_HARDWARE_ERROR_RECORD)) == (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_HARDWARE_ERROR_RECORD)) { if ((Attributes & (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_HARDWARE_ERROR_RECORD)) == (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_HARDWARE_ERROR_RECORD)) {
*MaximumVariableStorageSize = FixedPcdGet32(PcdHwErrStorageSize); *MaximumVariableStorageSize = PcdGet32 (PcdHwErrStorageSize);
*MaximumVariableSize = FixedPcdGet32(PcdMaxHardwareErrorVariableSize) - sizeof (VARIABLE_HEADER); *MaximumVariableSize = PcdGet32 (PcdMaxHardwareErrorVariableSize) - sizeof (VARIABLE_HEADER);
} else { } else {
if ((Attributes & EFI_VARIABLE_NON_VOLATILE) != 0) { if ((Attributes & EFI_VARIABLE_NON_VOLATILE) != 0) {
ASSERT (FixedPcdGet32(PcdHwErrStorageSize) < VariableStoreHeader->Size); ASSERT (PcdGet32 (PcdHwErrStorageSize) < VariableStoreHeader->Size);
*MaximumVariableStorageSize = VariableStoreHeader->Size - sizeof (VARIABLE_STORE_HEADER) - FixedPcdGet32(PcdHwErrStorageSize); *MaximumVariableStorageSize = VariableStoreHeader->Size - sizeof (VARIABLE_STORE_HEADER) - PcdGet32 (PcdHwErrStorageSize);
} }
// //
// Let *MaximumVariableSize be FixedPcdGet32(PcdMaxVariableSize) with the exception of the variable header size. // Let *MaximumVariableSize be PcdGet32 (PcdMaxVariableSize) with the exception of the variable header size.
// //
*MaximumVariableSize = FixedPcdGet32(PcdMaxVariableSize) - sizeof (VARIABLE_HEADER); *MaximumVariableSize = PcdGet32 (PcdMaxVariableSize) - sizeof (VARIABLE_HEADER);
} }
// //
@ -1392,15 +1392,13 @@ InitializeVariableStore (
// ensure that the value of PcdHwErrStorageSize is less than or equal to the value of // ensure that the value of PcdHwErrStorageSize is less than or equal to the value of
// PcdVariableStoreSize. // PcdVariableStoreSize.
// //
ASSERT (FixedPcdGet32(PcdHwErrStorageSize) <= FixedPcdGet32(PcdVariableStoreSize)); ASSERT (PcdGet32 (PcdHwErrStorageSize) <= PcdGet32 (PcdVariableStoreSize));
// //
// Allocate memory for variable store. // Allocate memory for variable store.
// //
if (VolatileStore || (PcdGet64 (PcdEmuVariableNvStoreReserved) == 0)) { if (VolatileStore || (PcdGet64 (PcdEmuVariableNvStoreReserved) == 0)) {
VariableStore = (VARIABLE_STORE_HEADER *) AllocateRuntimePool ( VariableStore = (VARIABLE_STORE_HEADER *) AllocateRuntimePool (PcdGet32 (PcdVariableStoreSize));
FixedPcdGet32(PcdVariableStoreSize)
);
} else { } else {
// //
// A memory location has been reserved for the NV variable store. Certain // A memory location has been reserved for the NV variable store. Certain
@ -1411,7 +1409,7 @@ InitializeVariableStore (
(VARIABLE_STORE_HEADER *)(VOID*)(UINTN) (VARIABLE_STORE_HEADER *)(VOID*)(UINTN)
PcdGet64 (PcdEmuVariableNvStoreReserved); PcdGet64 (PcdEmuVariableNvStoreReserved);
if ( if (
(VariableStore->Size == FixedPcdGet32(PcdVariableStoreSize)) && (VariableStore->Size == PcdGet32 (PcdVariableStoreSize)) &&
(VariableStore->Format == VARIABLE_STORE_FORMATTED) && (VariableStore->Format == VARIABLE_STORE_FORMATTED) &&
(VariableStore->State == VARIABLE_STORE_HEALTHY) (VariableStore->State == VARIABLE_STORE_HEALTHY)
) { ) {
@ -1429,7 +1427,7 @@ InitializeVariableStore (
} }
if (FullyInitializeStore) { if (FullyInitializeStore) {
SetMem (VariableStore, FixedPcdGet32(PcdVariableStoreSize), 0xff); SetMem (VariableStore, PcdGet32 (PcdVariableStoreSize), 0xff);
} }
// //
@ -1439,7 +1437,7 @@ InitializeVariableStore (
InitializeLocationForLastVariableOffset (VariableStore, LastVariableOffset); InitializeLocationForLastVariableOffset (VariableStore, LastVariableOffset);
CopyGuid (&VariableStore->Signature, &gEfiVariableGuid); CopyGuid (&VariableStore->Signature, &gEfiVariableGuid);
VariableStore->Size = FixedPcdGet32(PcdVariableStoreSize); VariableStore->Size = PcdGet32 (PcdVariableStoreSize);
VariableStore->Format = VARIABLE_STORE_FORMATTED; VariableStore->Format = VARIABLE_STORE_FORMATTED;
VariableStore->State = VARIABLE_STORE_HEALTHY; VariableStore->State = VARIABLE_STORE_HEALTHY;
VariableStore->Reserved = 0; VariableStore->Reserved = 0;

View File

@ -3,7 +3,7 @@
Implement all four UEFI Runtime Variable services for the nonvolatile Implement all four UEFI Runtime Variable services for the nonvolatile
and volatile storage space and install variable architecture protocol. and volatile storage space and install variable architecture protocol.
Copyright (c) 2006 - 2009, Intel Corporation Copyright (c) 2006 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -1475,7 +1475,7 @@ UpdateVariable (
// as a temporary storage. // as a temporary storage.
// //
NextVariable = GetEndPointer ((VARIABLE_STORE_HEADER *) ((UINTN) mVariableModuleGlobal->VariableGlobal.VolatileVariableBase)); NextVariable = GetEndPointer ((VARIABLE_STORE_HEADER *) ((UINTN) mVariableModuleGlobal->VariableGlobal.VolatileVariableBase));
ScratchSize = MAX(FixedPcdGet32(PcdMaxVariableSize), FixedPcdGet32(PcdMaxHardwareErrorVariableSize)); ScratchSize = MAX (PcdGet32 (PcdMaxVariableSize), PcdGet32 (PcdMaxHardwareErrorVariableSize));
SetMem (NextVariable, ScratchSize, 0xff); SetMem (NextVariable, ScratchSize, 0xff);
@ -1519,9 +1519,9 @@ UpdateVariable (
Volatile = FALSE; Volatile = FALSE;
NonVolatileVarableStoreSize = ((VARIABLE_STORE_HEADER *)(UINTN)(mVariableModuleGlobal->VariableGlobal.NonVolatileVariableBase))->Size; NonVolatileVarableStoreSize = ((VARIABLE_STORE_HEADER *)(UINTN)(mVariableModuleGlobal->VariableGlobal.NonVolatileVariableBase))->Size;
if ((((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) != 0) if ((((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) != 0)
&& ((VarSize + mVariableModuleGlobal->HwErrVariableTotalSize) > FixedPcdGet32(PcdHwErrStorageSize))) && ((VarSize + mVariableModuleGlobal->HwErrVariableTotalSize) > PcdGet32 (PcdHwErrStorageSize)))
|| (((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == 0) || (((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == 0)
&& ((VarSize + mVariableModuleGlobal->CommonVariableTotalSize) > NonVolatileVarableStoreSize - sizeof (VARIABLE_STORE_HEADER) - FixedPcdGet32(PcdHwErrStorageSize)))) { && ((VarSize + mVariableModuleGlobal->CommonVariableTotalSize) > NonVolatileVarableStoreSize - sizeof (VARIABLE_STORE_HEADER) - PcdGet32 (PcdHwErrStorageSize)))) {
if (EfiAtRuntime ()) { if (EfiAtRuntime ()) {
Status = EFI_OUT_OF_RESOURCES; Status = EFI_OUT_OF_RESOURCES;
goto Done; goto Done;
@ -1538,9 +1538,9 @@ UpdateVariable (
// If still no enough space, return out of resources // If still no enough space, return out of resources
// //
if ((((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) != 0) if ((((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) != 0)
&& ((VarSize + mVariableModuleGlobal->HwErrVariableTotalSize) > FixedPcdGet32(PcdHwErrStorageSize))) && ((VarSize + mVariableModuleGlobal->HwErrVariableTotalSize) > PcdGet32 (PcdHwErrStorageSize)))
|| (((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == 0) || (((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == 0)
&& ((VarSize + mVariableModuleGlobal->CommonVariableTotalSize) > NonVolatileVarableStoreSize - sizeof (VARIABLE_STORE_HEADER) - FixedPcdGet32(PcdHwErrStorageSize)))) { && ((VarSize + mVariableModuleGlobal->CommonVariableTotalSize) > NonVolatileVarableStoreSize - sizeof (VARIABLE_STORE_HEADER) - PcdGet32 (PcdHwErrStorageSize)))) {
Status = EFI_OUT_OF_RESOURCES; Status = EFI_OUT_OF_RESOURCES;
goto Done; goto Done;
} }
@ -1943,12 +1943,12 @@ RuntimeServiceSetVariable (
// //
// The size of the VariableName, including the Unicode Null in bytes plus // The size of the VariableName, including the Unicode Null in bytes plus
// the DataSize is limited to maximum size of FixedPcdGet32(PcdMaxHardwareErrorVariableSize) // the DataSize is limited to maximum size of PcdGet32 (PcdMaxHardwareErrorVariableSize)
// bytes for HwErrRec, and FixedPcdGet32(PcdMaxVariableSize) bytes for the others. // bytes for HwErrRec, and PcdGet32 (PcdMaxVariableSize) bytes for the others.
// //
if ((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) { if ((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {
if ((DataSize > FixedPcdGet32(PcdMaxHardwareErrorVariableSize)) || if ((DataSize > PcdGet32 (PcdMaxHardwareErrorVariableSize)) ||
(sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > FixedPcdGet32(PcdMaxHardwareErrorVariableSize))) { (sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > PcdGet32 (PcdMaxHardwareErrorVariableSize))) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
// //
@ -1960,10 +1960,10 @@ RuntimeServiceSetVariable (
} else { } else {
// //
// The size of the VariableName, including the Unicode Null in bytes plus // The size of the VariableName, including the Unicode Null in bytes plus
// the DataSize is limited to maximum size of FixedPcdGet32(PcdMaxVariableSize) bytes. // the DataSize is limited to maximum size of PcdGet32 (PcdMaxVariableSize) bytes.
// //
if ((DataSize > FixedPcdGet32(PcdMaxVariableSize)) || if ((DataSize > PcdGet32 (PcdMaxVariableSize)) ||
(sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > FixedPcdGet32(PcdMaxVariableSize))) { (sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > PcdGet32 (PcdMaxVariableSize))) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
} }
@ -2091,18 +2091,18 @@ RuntimeServiceQueryVariableInfo (
// Harware error record variable needs larger size. // Harware error record variable needs larger size.
// //
if ((Attributes & (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_HARDWARE_ERROR_RECORD)) == (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_HARDWARE_ERROR_RECORD)) { if ((Attributes & (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_HARDWARE_ERROR_RECORD)) == (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_HARDWARE_ERROR_RECORD)) {
*MaximumVariableStorageSize = FixedPcdGet32(PcdHwErrStorageSize); *MaximumVariableStorageSize = PcdGet32 (PcdHwErrStorageSize);
*MaximumVariableSize = FixedPcdGet32(PcdMaxHardwareErrorVariableSize) - sizeof (VARIABLE_HEADER); *MaximumVariableSize = PcdGet32 (PcdMaxHardwareErrorVariableSize) - sizeof (VARIABLE_HEADER);
} else { } else {
if ((Attributes & EFI_VARIABLE_NON_VOLATILE) != 0) { if ((Attributes & EFI_VARIABLE_NON_VOLATILE) != 0) {
ASSERT (FixedPcdGet32(PcdHwErrStorageSize) < VariableStoreHeader->Size); ASSERT (PcdGet32 (PcdHwErrStorageSize) < VariableStoreHeader->Size);
*MaximumVariableStorageSize = VariableStoreHeader->Size - sizeof (VARIABLE_STORE_HEADER) - FixedPcdGet32(PcdHwErrStorageSize); *MaximumVariableStorageSize = VariableStoreHeader->Size - sizeof (VARIABLE_STORE_HEADER) - PcdGet32 (PcdHwErrStorageSize);
} }
// //
// Let *MaximumVariableSize be FixedPcdGet32(PcdMaxVariableSize) with the exception of the variable header size. // Let *MaximumVariableSize be PcdGet32 (PcdMaxVariableSize) with the exception of the variable header size.
// //
*MaximumVariableSize = FixedPcdGet32(PcdMaxVariableSize) - sizeof (VARIABLE_HEADER); *MaximumVariableSize = PcdGet32 (PcdMaxVariableSize) - sizeof (VARIABLE_HEADER);
} }
// //
@ -2259,19 +2259,19 @@ VariableCommonInitialize (
// ensure that the value of PcdHwErrStorageSize is less than or equal to the value of // ensure that the value of PcdHwErrStorageSize is less than or equal to the value of
// PcdFlashNvStorageVariableSize. // PcdFlashNvStorageVariableSize.
// //
ASSERT (FixedPcdGet32(PcdHwErrStorageSize) <= FixedPcdGet32(PcdFlashNvStorageVariableSize)); ASSERT (PcdGet32 (PcdHwErrStorageSize) <= PcdGet32 (PcdFlashNvStorageVariableSize));
// //
// Allocate memory for volatile variable store, note that there is a scratch space to store scratch data. // Allocate memory for volatile variable store, note that there is a scratch space to store scratch data.
// //
ScratchSize = MAX(FixedPcdGet32(PcdMaxVariableSize), FixedPcdGet32(PcdMaxHardwareErrorVariableSize)); ScratchSize = MAX (PcdGet32 (PcdMaxVariableSize), PcdGet32 (PcdMaxHardwareErrorVariableSize));
VolatileVariableStore = AllocateRuntimePool (FixedPcdGet32(PcdVariableStoreSize) + ScratchSize); VolatileVariableStore = AllocateRuntimePool (PcdGet32 (PcdVariableStoreSize) + ScratchSize);
if (VolatileVariableStore == NULL) { if (VolatileVariableStore == NULL) {
FreePool (mVariableModuleGlobal); FreePool (mVariableModuleGlobal);
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
SetMem (VolatileVariableStore, FixedPcdGet32(PcdVariableStoreSize) + ScratchSize, 0xff); SetMem (VolatileVariableStore, PcdGet32 (PcdVariableStoreSize) + ScratchSize, 0xff);
// //
// Variable Specific Data // Variable Specific Data
@ -2281,7 +2281,7 @@ VariableCommonInitialize (
mVariableModuleGlobal->FvbInstance = FvbProtocol; mVariableModuleGlobal->FvbInstance = FvbProtocol;
CopyGuid (&VolatileVariableStore->Signature, &gEfiVariableGuid); CopyGuid (&VolatileVariableStore->Signature, &gEfiVariableGuid);
VolatileVariableStore->Size = FixedPcdGet32(PcdVariableStoreSize); VolatileVariableStore->Size = PcdGet32 (PcdVariableStoreSize);
VolatileVariableStore->Format = VARIABLE_STORE_FORMATTED; VolatileVariableStore->Format = VARIABLE_STORE_FORMATTED;
VolatileVariableStore->State = VARIABLE_STORE_HEALTHY; VolatileVariableStore->State = VARIABLE_STORE_HEALTHY;
VolatileVariableStore->Reserved = 0; VolatileVariableStore->Reserved = 0;