From b70fc1ac984f9da0d9e4932b8a9e40b1ccf4da50 Mon Sep 17 00:00:00 2001 From: Jaymes Wilks Date: Wed, 13 Sep 2017 09:53:39 -0500 Subject: 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 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Michael Baiocchi Reviewed-by: Nicholas E. Bofferding Reviewed-by: William G. Hoffa --- src/usr/testcore/rtloader/loader.H | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/usr/testcore/rtloader') 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: -- cgit v1.2.3