summaryrefslogtreecommitdiffstats
path: root/src/usr/testcore
diff options
context:
space:
mode:
authorJaymes Wilks <mjwilks@us.ibm.com>2017-09-13 09:53:39 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-10-20 12:50:04 -0400
commitb70fc1ac984f9da0d9e4932b8a9e40b1ccf4da50 (patch)
tree509a1189bbbb420583dadd61603a08eb6691e2c3 /src/usr/testcore
parent3f4963bae6821005c0d355587e43ca17512e5a3b (diff)
downloadtalos-hostboot-b70fc1ac984f9da0d9e4932b8a9e40b1ccf4da50.tar.gz
talos-hostboot-b70fc1ac984f9da0d9e4932b8a9e40b1ccf4da50.zip
Implement Secure unload
Implement Secure unload of secure sections within PNOR. Change-Id: I92a00013d23e0506f89f89ec41a193eac0b25d25 RTC:157475 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46203 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> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/testcore')
-rw-r--r--src/usr/testcore/rtloader/loader.H16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/usr/testcore/rtloader/loader.H b/src/usr/testcore/rtloader/loader.H
index 60056c633..62e251370 100644
--- a/src/usr/testcore/rtloader/loader.H
+++ b/src/usr/testcore/rtloader/loader.H
@@ -62,10 +62,6 @@ class RuntimeLoaderTest : public CxxTest::TestSuite
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)
{
@@ -178,6 +174,18 @@ class RuntimeLoaderTest : public CxxTest::TestSuite
mm_set_permission(imageArea, imageSize, WRITABLE);
free(imageArea);
+
+#ifdef CONFIG_SECUREBOOT
+ l_errl = unloadSecureSection(PNOR::HB_RUNTIME);
+ if(l_errl)
+ {
+ TS_FAIL("Could not securely load runtime section.");
+ delete l_errl;
+ l_errl = nullptr;
+ return;
+ }
+#endif
+
}
private:
OpenPOWER on IntegriCloud