diff options
author | Stephen Cprek <smcprek@us.ibm.com> | 2017-04-20 11:02:58 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-04-28 15:46:38 -0400 |
commit | 942885a519471aa18706f6b48400beb9c009d329 (patch) | |
tree | 7016969be50671de1ba8ebabf68c95fd294e1261 /src/usr/testcore | |
parent | e53a2e5cd5b152d6e565f56867f1f8cd435e7556 (diff) | |
download | talos-hostboot-942885a519471aa18706f6b48400beb9c009d329.tar.gz talos-hostboot-942885a519471aa18706f6b48400beb9c009d329.zip |
Sign and Verify the hostboot runtime partition (port from p8)
Change-Id: I04d303b2fe08a9c3fff4e9f3cc0be9768279637d
RTC: 171706
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39521
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/testcore')
-rw-r--r-- | src/usr/testcore/rtloader/loader.H | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/usr/testcore/rtloader/loader.H b/src/usr/testcore/rtloader/loader.H index 8914c709b..a5167ff45 100644 --- a/src/usr/testcore/rtloader/loader.H +++ b/src/usr/testcore/rtloader/loader.H @@ -43,6 +43,7 @@ #include <pnor/ecc.H> #include <ipmi/ipmiif.H> #include <targeting/common/attributeTank.H> +#include <config.h> trace_desc_t* g_trac_hbrt = NULL; TRAC_INIT(&g_trac_hbrt, "HBRT_TEST", 2*KILOBYTE); @@ -54,11 +55,25 @@ class RuntimeLoaderTest : public CxxTest::TestSuite void testLoader() { static const uint64_t HEADER_OFFSET = 0x2000; - + errlHndl_t l_errl = nullptr; + +#ifdef CONFIG_SECUREBOOT + // load secure section + // TODO RTC: 157475 Since this is a test case and unload is + // merely a stub function at this point in time, add a call + // to unload later when the aforementioned story is implemented. + l_errl = loadSecureSection(PNOR::HB_RUNTIME); + if(l_errl) + { + TS_WARN("Could not securely load runtime section."); + delete l_errl; + l_errl = nullptr; + return; + } +#endif PNOR::SectionInfo_t runtimeSection; - errlHndl_t l_errl = - PNOR::getSectionInfo(PNOR::HB_RUNTIME, runtimeSection); + l_errl = PNOR::getSectionInfo(PNOR::HB_RUNTIME, runtimeSection); if (l_errl) { |