From 381c866a951c241346a1d985341718874b3dd405 Mon Sep 17 00:00:00 2001 From: Claudio Carvalho Date: Wed, 28 Sep 2016 05:01:25 -0300 Subject: libstb/tss/tpmLogMgr: add support for EV_SEPARATOR events The TpmLogMgr_genLogEventPcrExtend() function is used to generate EV_ACTION events that will be recorded in the event log. However, skiboot must also create and record an EV_SEPARATOR event for a clean handover to skiroot kernel. This adds the i_logType parameter to the TpmLogMgr_genLogEventPcrExtend() function, thus it can also be used to generate EV_SEPARATOR events. Signed-off-by: Claudio Carvalho Signed-off-by: Stewart Smith --- libstb/tss/tpmLogMgr.C | 3 ++- libstb/tss/tpmLogMgr.H | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'libstb/tss') diff --git a/libstb/tss/tpmLogMgr.C b/libstb/tss/tpmLogMgr.C index 95f4810..063f432 100644 --- a/libstb/tss/tpmLogMgr.C +++ b/libstb/tss/tpmLogMgr.C @@ -458,6 +458,7 @@ namespace TRUSTEDBOOT TPM_Alg_Id i_algId_2, const uint8_t* i_digest_2, size_t i_digestSize_2, + uint32_t i_logType, const char* i_logMsg) { TCG_PCR_EVENT2 eventLog; @@ -472,7 +473,7 @@ namespace TRUSTEDBOOT memset(&eventLog, 0, sizeof(eventLog)); eventLog.pcrIndex = i_pcr; - eventLog.eventType = EV_ACTION; + eventLog.eventType = i_logType; // Update digest information eventLog.digests.count = 1; diff --git a/libstb/tss/tpmLogMgr.H b/libstb/tss/tpmLogMgr.H index 26b8604..21cd3ba 100644 --- a/libstb/tss/tpmLogMgr.H +++ b/libstb/tss/tpmLogMgr.H @@ -210,6 +210,7 @@ namespace TRUSTEDBOOT * @param[in] i_algId_2 Algorithm to use * @param[in] i_digest_2 Digest value to write to PCR, NULL if not used * @param[in] i_digestSize_2 Byte size of i_digest array + * @param[in] i_logType Event type * @param[in] i_logMsg Null terminated Log message * * @return TCG_PCR_EVENT2 PCR event log @@ -221,6 +222,7 @@ namespace TRUSTEDBOOT TPM_Alg_Id i_algId_2, const uint8_t* i_digest_2, size_t i_digestSize_2, + uint32_t i_logType, const char* i_logMsg); #ifdef __HOSTBOOT_MODULE /** -- cgit v1.1