Initialize a local work space header to be used by IsValidWorkSpace() and InitWorkSpaceHeader() to avoid executing code(gBS->CalculateCrc32 ()) outside SMRAM while inside SMM.
Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14012 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
The internal header file includes the common header files, defines
|
||||
internal structure and functions used by FtwLite module.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2012, 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
|
||||
@@ -20,6 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include <PiDxe.h>
|
||||
|
||||
#include <Guid/SystemNvDataGuid.h>
|
||||
#include <Guid/ZeroGuid.h>
|
||||
#include <Protocol/FaultTolerantWrite.h>
|
||||
#include <Protocol/FirmwareVolumeBlock.h>
|
||||
#include <Protocol/SwapAddressRange.h>
|
||||
@@ -736,5 +737,16 @@ EFI_STATUS
|
||||
InitFtwProtocol (
|
||||
IN OUT EFI_FTW_DEVICE *FtwDevice
|
||||
);
|
||||
|
||||
/**
|
||||
Initialize a local work space header.
|
||||
|
||||
Since Signature and WriteQueueSize have been known, Crc can be calculated out,
|
||||
then the work space header will be fixed.
|
||||
**/
|
||||
VOID
|
||||
InitializeLocalWorkSpaceHeader (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user