summaryrefslogtreecommitdiff
path: root/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2015-02-02 09:31:08 +0000
committerlzeng14 <lzeng14@Edk2>2015-02-02 09:31:08 +0000
commit93626a53773246d3999446235dc826b92a249228 (patch)
treeab78b5807fada5d6e404d571b44928d68ddc9465 /SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c
parent0fb5e515f2f338c25679e2129ef81c4d230649b9 (diff)
downloadedk2-platforms-93626a53773246d3999446235dc826b92a249228.tar.xz
SecurityPkg 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@16688 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c')
-rw-r--r--SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c b/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c
index 32a218022d..ec857665fd 100644
--- a/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c
+++ b/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c
@@ -3603,6 +3603,15 @@ ReclaimForOS(
EFI_STATUS Status;
UINTN RemainingCommonRuntimeVariableSpace;
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;