[Skiboot] [PATCH 20/40] libstb/tss/tpmLogMgr: add support for EV_SEPARATOR events

Stewart Smith stewart at linux.vnet.ibm.com
Mon Oct 10 19:44:01 AEDT 2016


From: Claudio Carvalho <cclaudio at linux.vnet.ibm.com>

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 <cclaudio at linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 libstb/tss/tpmLogMgr.C | 3 ++-
 libstb/tss/tpmLogMgr.H | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

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
     /**
-- 
2.7.4



More information about the Skiboot mailing list