diff options
author | Star Zeng <star.zeng@intel.com> | 2013-11-18 02:56:04 +0000 |
---|---|---|
committer | lzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-11-18 02:56:04 +0000 |
commit | fddbbc661eeff8e9f94942fa2d47fb637404a040 (patch) | |
tree | 2c8a83ed6f7a232d103abc55c8ddd0b2d8d88d69 /SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c | |
parent | e82edcf914c188271a9f6ebca6205c7e5c6b1276 (diff) | |
download | edk2-platforms-fddbbc661eeff8e9f94942fa2d47fb637404a040.tar.xz |
SecurityPkg Variable: Remove mStorageData buffer allocation and use Scratch buffer instead to reduce SMRAM consumption.
It can reduce MAX (PcdGet32 (PcdMaxVariableSize), PcdGet32 (PcdMaxHardwareErrorVariableSize)) size of SMRAM consumption.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14855 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c')
-rw-r--r-- | SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c b/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c index 90a5d51a9e..ee45ec9776 100644 --- a/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c +++ b/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c @@ -49,14 +49,6 @@ CONST UINT8 mRsaE[] = { 0x01, 0x00, 0x01 }; VOID *mHashCtx = NULL;
//
-// Pointer to runtime buffer.
-// For "Append" operation to an existing variable, a read/modify/write operation
-// is supported by firmware internally. Reserve runtime buffer to cache previous
-// variable data in runtime phase because memory allocation is forbidden in virtual mode.
-//
-VOID *mStorageArea = NULL;
-
-//
// The serialization of the values of the VariableName, VendorGuid and Attributes
// parameters of the SetVariable() call and the TimeStamp component of the
// EFI_VARIABLE_AUTHENTICATION_2 descriptor followed by the variable's new value
@@ -192,14 +184,6 @@ AutenticatedVariableServiceInitialize ( }
//
- // Reserved runtime buffer for "Append" operation in virtual mode.
- //
- mStorageArea = AllocateRuntimePool (MAX (PcdGet32 (PcdMaxVariableSize), PcdGet32 (PcdMaxHardwareErrorVariableSize)));
- if (mStorageArea == NULL) {
- return EFI_OUT_OF_RESOURCES;
- }
-
- //
// Prepare runtime buffer for serialized data of time-based authenticated
// Variable, i.e. (VariableName, VendorGuid, Attributes, TimeStamp, Data).
//
|