summaryrefslogtreecommitdiff
path: root/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.h
diff options
context:
space:
mode:
authorLinaro Packagers <linaro-pkg@lists.launchpad.net>2013-04-18 16:42:12 +0000
committerFathi Boudra <fathi.boudra@linaro.org>2013-04-20 10:20:05 +0300
commit0485fa28a08e3a1e6549dc4e28d5418212f89a14 (patch)
treea444ce65afaf7f43a8e0077681e107fb8c2e79b3 /SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.h
parent3ecb0687d28957a309ad40f47469ddd2e0ab5836 (diff)
parent60ea5c770707cf8e5be160aef2bb2f1e707e1926 (diff)
Imported Debian patch 1:0.1+git15+20130418+09259ca-0linaro1HEADdebian/1%0.1+git15+20130418+09259ca-0linaro1master
Diffstat (limited to 'SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.h')
-rw-r--r--SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.h45
1 files changed, 42 insertions, 3 deletions
diff --git a/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.h b/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.h
index 6a51bcce..45015836 100644
--- a/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.h
+++ b/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.h
@@ -2,7 +2,7 @@
The internal header file includes the common header files, defines
internal structure and functions used by Variable modules.
-Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
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
@@ -65,6 +65,13 @@ typedef enum {
typedef struct {
VARIABLE_HEADER *CurrPtr;
+ //
+ // If both ADDED and IN_DELETED_TRANSITION variable are present,
+ // InDeletedTransitionPtr will point to the IN_DELETED_TRANSITION one.
+ // Otherwise, CurrPtr will point to the ADDED or IN_DELETED_TRANSITION one,
+ // and InDeletedTransitionPtr will be NULL at the same time.
+ //
+ VARIABLE_HEADER *InDeletedTransitionPtr;
VARIABLE_HEADER *EndPtr;
VARIABLE_HEADER *StartPtr;
BOOLEAN Volatile;
@@ -209,7 +216,7 @@ DataSizeOfVariable (
@param[in] Attributes Attributes of the variable.
@param[in] KeyIndex Index of associated public key.
@param[in] MonotonicCount Value of associated monotonic count.
- @param[in] Variable The variable information that is used to keep track of variable usage.
+ @param[in, out] Variable The variable information that is used to keep track of variable usage.
@param[in] TimeStamp Value of associated TimeStamp.
@@ -226,7 +233,7 @@ UpdateVariable (
IN UINT32 Attributes OPTIONAL,
IN UINT32 KeyIndex OPTIONAL,
IN UINT64 MonotonicCount OPTIONAL,
- IN VARIABLE_POINTER_TRACK *Variable,
+ IN OUT VARIABLE_POINTER_TRACK *Variable,
IN EFI_TIME *TimeStamp OPTIONAL
);
@@ -367,6 +374,38 @@ VariableCommonInitialize (
);
/**
+
+ Variable store garbage collection and reclaim operation.
+
+ If ReclaimPubKeyStore is FALSE, reclaim variable space by deleting the obsoleted varaibles.
+ If ReclaimPubKeyStore is TRUE, reclaim invalid key in public key database and update the PubKeyIndex
+ for all the count-based authenticate variable in NV storage.
+
+ @param[in] VariableBase Base address of variable store.
+ @param[out] LastVariableOffset Offset of last variable.
+ @param[in] IsVolatile The variable store is volatile or not;
+ if it is non-volatile, need FTW.
+ @param[in, out] UpdatingPtrTrack Pointer to updating variable pointer track structure.
+ @param[in] ReclaimPubKeyStore Reclaim for public key database or not.
+ @param[in] ReclaimAnyway If TRUE, do reclaim anyway.
+
+ @return EFI_SUCCESS Reclaim operation has finished successfully.
+ @return EFI_OUT_OF_RESOURCES No enough memory resources.
+ @return EFI_DEVICE_ERROR The public key database doesn't exist.
+ @return Others Unexpect error happened during reclaim operation.
+
+**/
+EFI_STATUS
+Reclaim (
+ IN EFI_PHYSICAL_ADDRESS VariableBase,
+ OUT UINTN *LastVariableOffset,
+ IN BOOLEAN IsVolatile,
+ IN OUT VARIABLE_POINTER_TRACK *UpdatingPtrTrack,
+ IN BOOLEAN ReclaimPubKeyStore,
+ IN BOOLEAN ReclaimAnyway
+ );
+
+/**
This function reclaims variable storage if free size is below the threshold.
**/