diff options
author | Star Zeng <star.zeng@intel.com> | 2016-11-18 10:58:35 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2016-11-21 10:38:34 +0800 |
commit | 3cabe66b2065980d5084d5823404834e266efe66 (patch) | |
tree | 54bfb1d80e87d9f82b713bba228bf47903b0a10f /SecurityPkg | |
parent | a9f1b2e2d708ed98aa47d576a81d947dc7b79fac (diff) | |
download | edk2-platforms-3cabe66b2065980d5084d5823404834e266efe66.tar.xz |
SecurityPkg Tcg2Pei: Add comments into LogHashEvent()
Add comments into LogHashEvent() to describe the usage
of GetDigestListSize (DigestList).
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Diffstat (limited to 'SecurityPkg')
-rw-r--r-- | SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c index 377f8d9fe4..209d843245 100644 --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c @@ -317,6 +317,10 @@ LogHashEvent ( }
break;
case EFI_TCG2_EVENT_LOG_FORMAT_TCG_2:
+ //
+ // Use GetDigestListSize (DigestList) in the GUID HOB DataLength calculation
+ // to reserve enough buffer to hold TPML_DIGEST_VALUES compact binary.
+ //
HobData = BuildGuidHob (
&gTcgEvent2EntryHobGuid,
sizeof(TcgPcrEvent2->PCRIndex) + sizeof(TcgPcrEvent2->EventType) + GetDigestListSize (DigestList) + sizeof(TcgPcrEvent2->EventSize) + NewEventHdr->EventSize
|