summaryrefslogtreecommitdiffstats
path: root/src/usr/pnor/test
diff options
context:
space:
mode:
authorNick Bofferding <bofferdn@us.ibm.com>2016-06-28 09:27:19 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2016-07-06 10:34:58 -0400
commitb18f35fb5748bb6caf7c81f3080a02bdc33e0347 (patch)
treebc05f8373dd993ab1f9428d04addbed023afc785 /src/usr/pnor/test
parent9e1be45e48abff56989cebe2372380d33108a2d1 (diff)
downloadblackbird-hostboot-b18f35fb5748bb6caf7c81f3080a02bdc33e0347.tar.gz
blackbird-hostboot-b18f35fb5748bb6caf7c81f3080a02bdc33e0347.zip
Support secure load and unload API prototype
- Implement API for load and unload of secure section - Implement test to ensure API is callable Change-Id: Ie82d7e39b6adca703c4cfa4f79fb77be54d0c88b Forwardport: yes RTC: 156118 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26358 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26658
Diffstat (limited to 'src/usr/pnor/test')
-rw-r--r--src/usr/pnor/test/pnorrptest.H34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/usr/pnor/test/pnorrptest.H b/src/usr/pnor/test/pnorrptest.H
index 92d82a397..4eee74072 100644
--- a/src/usr/pnor/test/pnorrptest.H
+++ b/src/usr/pnor/test/pnorrptest.H
@@ -803,6 +803,40 @@ class PnorRpTest : public CxxTest::TestSuite
delete [] l_goodData;
delete [] l_readData;
};
+
+ /**
+ * @brief Tests loading and unloading a secure section
+ */
+ void test_loadUnloadSecureSection()
+ {
+ // @RTC 156118 Right now these tests just ensure the
+ // APIs are callable; they should return success always
+ // until 156118 implements the real support. At that time
+ // this testcase should be updated.
+ errlHndl_t pError=NULL;
+
+ do {
+
+ pError = PNOR::loadSecureSection(PNOR::SBE_IPL);
+ if(pError != NULL)
+ {
+ TS_FAIL("PnorRpTest::test_loadUnloadSecureSection: "
+ "loadSecureSection returned an error");
+ ERRORLOG::errlCommit(pError,PNOR_COMP_ID);
+ break;
+ }
+
+ pError = PNOR::unloadSecureSection(PNOR::SBE_IPL);
+ if(pError != NULL)
+ {
+ TS_FAIL("PnorRpTest::test_loadUnloadSecureSection: "
+ "unloadSecureSection returned an error");
+ ERRORLOG::errlCommit(pError,PNOR_COMP_ID);
+ break;
+ }
+
+ } while (0);
+ }
};
OpenPOWER on IntegriCloud