summaryrefslogtreecommitdiffstats
path: root/SecurityPkg/Tcg/TcgPei
diff options
context:
space:
mode:
authorczhang46 <czhang46@6f19259b-4bc3-4df7-8a09-765794883524>2012-09-28 00:57:02 +0000
committerczhang46 <czhang46@6f19259b-4bc3-4df7-8a09-765794883524>2012-09-28 00:57:02 +0000
commit0758c830f7b4a388b15fb825b896f5f366985bbf (patch)
tree0e6ce4299e1a929087842bf6d6dfe42dea67d63d /SecurityPkg/Tcg/TcgPei
parent751915bcd949509590e7dcc4badca76833e2be8a (diff)
downloadedk2-0758c830f7b4a388b15fb825b896f5f366985bbf.tar.gz
edk2-0758c830f7b4a388b15fb825b896f5f366985bbf.tar.bz2
edk2-0758c830f7b4a388b15fb825b896f5f366985bbf.zip
Rename Trusted Hob to Measured FV hob and add Guided Hob layout structure
Signed-off-by : Chao Zhang<chao.b.zhang@intel.com> Reviewed-by : Dong Guo <guo.dong@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13762 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SecurityPkg/Tcg/TcgPei')
-rw-r--r--SecurityPkg/Tcg/TcgPei/TcgPei.c26
-rw-r--r--SecurityPkg/Tcg/TcgPei/TcgPei.inf2
2 files changed, 13 insertions, 15 deletions
diff --git a/SecurityPkg/Tcg/TcgPei/TcgPei.c b/SecurityPkg/Tcg/TcgPei/TcgPei.c
index e8fd1f12d0..60d9192103 100644
--- a/SecurityPkg/Tcg/TcgPei/TcgPei.c
+++ b/SecurityPkg/Tcg/TcgPei/TcgPei.c
@@ -23,7 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Ppi/EndOfPeiPhase.h>
#include <Guid/TcgEventHob.h>
-#include <Guid/TrustedFvHob.h>
+#include <Guid/MeasuredFvHob.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
@@ -148,35 +148,33 @@ EndofPeiSignalNotifyCallBack (
IN VOID *Ppi
)
{
- UINT8 *HobData;
+ MEASURED_HOB_DATA *MeasuredHobData;
- HobData = NULL;
+ MeasuredHobData = NULL;
//
- // Create a Guid hob to save all trusted Fv
+ // Create a Guid hob to save all measured Fv
//
- HobData = BuildGuidHob(
- &gTrustedFvHobGuid,
- sizeof(UINTN) + sizeof(EFI_PLATFORM_FIRMWARE_BLOB) * (mMeasuredBaseFvIndex + mMeasuredChildFvIndex)
- );
+ MeasuredHobData = BuildGuidHob(
+ &gMeasuredFvHobGuid,
+ sizeof(UINTN) + sizeof(EFI_PLATFORM_FIRMWARE_BLOB) * (mMeasuredBaseFvIndex + mMeasuredChildFvIndex)
+ );
- if (HobData != NULL){
+ if (MeasuredHobData != NULL){
//
// Save measured FV info enty number
//
- *(UINT32 *)HobData = mMeasuredBaseFvIndex + mMeasuredChildFvIndex;
+ MeasuredHobData->Num = mMeasuredBaseFvIndex + mMeasuredChildFvIndex;
- HobData += sizeof(UINT32);
//
// Save measured base Fv info
//
- CopyMem (HobData, mMeasuredBaseFvInfo, sizeof(EFI_PLATFORM_FIRMWARE_BLOB) * (mMeasuredBaseFvIndex));
+ CopyMem (MeasuredHobData->MeasuredFvBuf, mMeasuredBaseFvInfo, sizeof(EFI_PLATFORM_FIRMWARE_BLOB) * (mMeasuredBaseFvIndex));
- HobData += sizeof(EFI_PLATFORM_FIRMWARE_BLOB) * (mMeasuredBaseFvIndex);
//
// Save measured child Fv info
//
- CopyMem (HobData, mMeasuredChildFvInfo, sizeof(EFI_PLATFORM_FIRMWARE_BLOB) * (mMeasuredChildFvIndex));
+ CopyMem (&MeasuredHobData->MeasuredFvBuf[mMeasuredBaseFvIndex] , mMeasuredChildFvInfo, sizeof(EFI_PLATFORM_FIRMWARE_BLOB) * (mMeasuredChildFvIndex));
}
return EFI_SUCCESS;
diff --git a/SecurityPkg/Tcg/TcgPei/TcgPei.inf b/SecurityPkg/Tcg/TcgPei/TcgPei.inf
index 0143baa687..48d4efce5c 100644
--- a/SecurityPkg/Tcg/TcgPei/TcgPei.inf
+++ b/SecurityPkg/Tcg/TcgPei/TcgPei.inf
@@ -51,7 +51,7 @@
[Guids]
gTcgEventEntryHobGuid
- gTrustedFvHobGuid
+ gMeasuredFvHobGuid
[Ppis]
gPeiLockPhysicalPresencePpiGuid