summaryrefslogtreecommitdiffstats
path: root/src/usr/util
diff options
context:
space:
mode:
authorStephen Cprek <smcprek@us.ibm.com>2017-11-29 15:44:23 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-12-12 17:06:11 -0500
commitd527220c6ffe651548c3e002e0d473492c37ad27 (patch)
tree92f14865096743a03edaf2bb8575256d824d4bab /src/usr/util
parentba9cad2c031bcf85fd34f8f3e8c477d38ed1db71 (diff)
downloadtalos-hostboot-d527220c6ffe651548c3e002e0d473492c37ad27.tar.gz
talos-hostboot-d527220c6ffe651548c3e002e0d473492c37ad27.zip
Add component ID check for Master Container Lid Processing
Change-Id: Ie6d99d6f67f09861f0d09c8432cf90abc27400b8 RTC: 181848 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50156 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/util')
-rw-r--r--src/usr/util/test/testmclmgr.H6
-rw-r--r--src/usr/util/utilmclmgr.C29
2 files changed, 7 insertions, 28 deletions
diff --git a/src/usr/util/test/testmclmgr.H b/src/usr/util/test/testmclmgr.H
index 290c73d5c..97c606a9d 100644
--- a/src/usr/util/test/testmclmgr.H
+++ b/src/usr/util/test/testmclmgr.H
@@ -48,6 +48,8 @@ const ComponentID COMP_TEST3 {"TEST3"};
// ASCII: TESTMAXSIZEOFSTR
const ComponentID COMP_TEST4 {0x54,0x45,0x53,0x54,0x4d,0x41,0x58,0x53,
0x49,0x5a,0x45,0x4f,0x46,0x53,0x54,0x52};
+// Comp ID for pnor section TESTRO
+const ComponentID COMP_TESTRO {"TESTRO"};
// Define deault vectors to simplify syntax
const std::vector<uint32_t> defaultLids {0xA1234567, 0x89ABCDEF, 0x13579246};
@@ -293,7 +295,7 @@ public:
// Generate test MCL with Secure Lids
TestMcl l_TestMcl { {Util::TEST_LIDID},
- {{COMP_TEST2,true}}
+ {{COMP_TESTRO,true}}
};
// Pass test MCL to MCL manager
@@ -338,7 +340,7 @@ public:
// So we will get a mismatch between the Secure header's total container
// size and what the UtilLidMgr reads out.
TestMcl l_TestMcl { {Util::TEST_LIDID, Util::TEST_LIDID},
- {{COMP_TEST2,true}}
+ {{COMP_TESTRO,true}}
};
// Pass test MCL to MCL manager
diff --git a/src/usr/util/utilmclmgr.C b/src/usr/util/utilmclmgr.C
index 81e1c8cff..e6efc56e0 100644
--- a/src/usr/util/utilmclmgr.C
+++ b/src/usr/util/utilmclmgr.C
@@ -636,33 +636,10 @@ errlHndl_t MasterContainerLidMgr::verifyExtend(const ComponentID& i_compId,
io_compInfo.unprotectedSize = l_conHdr.totalContainerSize() -
l_conHdr.payloadTextSize();
- // @TODO RTC:181848 re-enable when component id is supported in lids
- if (0)// memcmp(l_conHdr.componentId(), i_compId.data(),
- // SW_HDR_COMP_ID_SIZE_BYTES) != 0 )
+ // Verify the component in the Secure Header matches the MCL
+ l_errl = SECUREBOOT::verifyComponentId(l_conHdr, iv_curCompIdStr);
+ if (l_errl)
{
- uint64_t l_secHdrCompId {};
- uint64_t l_mclCompId {};
- memcpy(&l_secHdrCompId, l_conHdr.componentId(), SW_HDR_COMP_ID_SIZE_BYTES);
- memcpy(&l_mclCompId, i_compId.data(), SW_HDR_COMP_ID_SIZE_BYTES);
-
- UTIL_FT(ERR_MRK"MasterContainerLidMgr::verifyExtend - ComponentID mismatch between secure header = %.16llX and master container lid %.16llX",
- l_secHdrCompId, l_mclCompId);
- /*@
- * @errortype
- * @moduleid Util::UTIL_MCL_VERIFY_EXT
- * @reasoncode Util::UTIL_MCL_COMPID_MISMATCH
- * @userdata1 Secure Header Comp ID
- * @userdata2 Master Container Lid Comp ID
- * @devdesc Error processing component for Mcl Mgr
- * @custdesc Firmware Error
- */
- l_errl = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_UNRECOVERABLE,
- Util::UTIL_MCL_VERIFY_EXT,
- Util::UTIL_MCL_COMPID_MISMATCH,
- l_secHdrCompId,
- l_mclCompId,
- true); //software callout
l_errl->collectTrace(UTIL_COMP_NAME);
break;
}
OpenPOWER on IntegriCloud