diff options
author | sfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-02-21 01:35:22 +0000 |
---|---|---|
committer | sfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-02-21 01:35:22 +0000 |
commit | ca5a7d87e372ad8897881a543cb3e2beb8b1ec01 (patch) | |
tree | 61c689c4f6dec6a3681557d5acd37983f32260a6 /SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.h | |
parent | fb5278ef782a253cdb0daabe2184e165d889ce68 (diff) | |
download | edk2-platforms-ca5a7d87e372ad8897881a543cb3e2beb8b1ec01.tar.xz |
Add error handling code to prevent variable store corruption in release build.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Dong Guo <guo.dong@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14139 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.h')
-rw-r--r-- | SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.h b/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.h index 8e292f36b2..4501583648 100644 --- a/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.h +++ b/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.h @@ -381,27 +381,28 @@ VariableCommonInitialize ( 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.
+ @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_OUT_OF_RESOURCES No enough memory resources.
@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
+ IN EFI_PHYSICAL_ADDRESS VariableBase,
+ OUT UINTN *LastVariableOffset,
+ IN BOOLEAN IsVolatile,
+ IN OUT VARIABLE_POINTER_TRACK *UpdatingPtrTrack,
+ IN BOOLEAN ReclaimPubKeyStore,
+ IN BOOLEAN ReclaimAnyway
);
/**
|