mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-25 06:34:30 +02:00
MdeModulePkg Variable: Introduce PcdReclaimVariableSpaceAtEndOfDxe
for trying to reclaim variable space at EndOfDxe. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16687 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
db3c5441b1
commit
0fb5e515f2
@ -738,6 +738,12 @@
|
|||||||
# @Prompt Boottime reserved NV variable space size.
|
# @Prompt Boottime reserved NV variable space size.
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdBoottimeReservedNvVariableSpaceSize|0x00|UINT32|0x30000007
|
gEfiMdeModulePkgTokenSpaceGuid.PcdBoottimeReservedNvVariableSpaceSize|0x00|UINT32|0x30000007
|
||||||
|
|
||||||
|
## Reclaim variable space at EndOfDxe.<BR><BR>
|
||||||
|
# The value is FALSE as default for compatibility that variable driver tries to reclaim variable space at ReadyToBoot event.<BR>
|
||||||
|
# If the value is set to TRUE, variable driver tries to reclaim variable space at EndOfDxe event.<BR>
|
||||||
|
# @Prompt Reclaim variable space at EndOfDxe.
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdReclaimVariableSpaceAtEndOfDxe|FALSE|BOOLEAN|0x30000008
|
||||||
|
|
||||||
## The size of volatile buffer. This buffer is used to store VOLATILE attribute variables.
|
## The size of volatile buffer. This buffer is used to store VOLATILE attribute variables.
|
||||||
# @Prompt Variable storage size.
|
# @Prompt Variable storage size.
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x10000|UINT32|0x30000005
|
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x10000|UINT32|0x30000005
|
||||||
|
Binary file not shown.
@ -3124,6 +3124,15 @@ ReclaimForOS(
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINTN RemainingCommonRuntimeVariableSpace;
|
UINTN RemainingCommonRuntimeVariableSpace;
|
||||||
UINTN RemainingHwErrVariableSpace;
|
UINTN RemainingHwErrVariableSpace;
|
||||||
|
STATIC BOOLEAN Reclaimed;
|
||||||
|
|
||||||
|
//
|
||||||
|
// This function will be called only once at EndOfDxe or ReadyToBoot event.
|
||||||
|
//
|
||||||
|
if (Reclaimed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Reclaimed = TRUE;
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
|
@ -313,6 +313,9 @@ OnEndOfDxe (
|
|||||||
// The initialization for variable quota.
|
// The initialization for variable quota.
|
||||||
//
|
//
|
||||||
InitializeVariableQuota ();
|
InitializeVariableQuota ();
|
||||||
|
if (PcdGetBool (PcdReclaimVariableSpaceAtEndOfDxe)) {
|
||||||
|
ReclaimForOS ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -103,7 +103,8 @@
|
|||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdHwErrStorageSize ## CONSUMES
|
gEfiMdeModulePkgTokenSpaceGuid.PcdHwErrStorageSize ## CONSUMES
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxUserNvVariableSpaceSize ## CONSUMES
|
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxUserNvVariableSpaceSize ## CONSUMES
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdBoottimeReservedNvVariableSpaceSize ## CONSUMES
|
gEfiMdeModulePkgTokenSpaceGuid.PcdBoottimeReservedNvVariableSpaceSize ## CONSUMES
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdReclaimVariableSpaceAtEndOfDxe ## CONSUMES
|
||||||
|
|
||||||
[FeaturePcd]
|
[FeaturePcd]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableCollectStatistics ## CONSUMES # statistic the information of variable.
|
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableCollectStatistics ## CONSUMES # statistic the information of variable.
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLangDeprecate ## CONSUMES
|
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLangDeprecate ## CONSUMES
|
||||||
|
@ -832,6 +832,9 @@ SmmEndOfDxeCallback (
|
|||||||
// The initialization for variable quota.
|
// The initialization for variable quota.
|
||||||
//
|
//
|
||||||
InitializeVariableQuota ();
|
InitializeVariableQuota ();
|
||||||
|
if (PcdGetBool (PcdReclaimVariableSpaceAtEndOfDxe)) {
|
||||||
|
ReclaimForOS ();
|
||||||
|
}
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,8 @@
|
|||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdHwErrStorageSize ## CONSUMES
|
gEfiMdeModulePkgTokenSpaceGuid.PcdHwErrStorageSize ## CONSUMES
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxUserNvVariableSpaceSize ## CONSUMES
|
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxUserNvVariableSpaceSize ## CONSUMES
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdBoottimeReservedNvVariableSpaceSize ## CONSUMES
|
gEfiMdeModulePkgTokenSpaceGuid.PcdBoottimeReservedNvVariableSpaceSize ## CONSUMES
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdReclaimVariableSpaceAtEndOfDxe ## CONSUMES
|
||||||
|
|
||||||
[FeaturePcd]
|
[FeaturePcd]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableCollectStatistics ## CONSUMES # statistic the information of variable.
|
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableCollectStatistics ## CONSUMES # statistic the information of variable.
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLangDeprecate ## CONSUMES
|
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLangDeprecate ## CONSUMES
|
||||||
|
Loading…
x
Reference in New Issue
Block a user