summaryrefslogtreecommitdiffstats
path: root/src/usr
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
parent9e1be45e48abff56989cebe2372380d33108a2d1 (diff)
downloadtalos-hostboot-b18f35fb5748bb6caf7c81f3080a02bdc33e0347.tar.gz
talos-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')
-rw-r--r--src/usr/pnor/pnorrp.C23
-rw-r--r--src/usr/pnor/test/pnorrptest.H34
2 files changed, 57 insertions, 0 deletions
diff --git a/src/usr/pnor/pnorrp.C b/src/usr/pnor/pnorrp.C
index 725fa88e9..8a7b5457b 100644
--- a/src/usr/pnor/pnorrp.C
+++ b/src/usr/pnor/pnorrp.C
@@ -90,6 +90,29 @@ errlHndl_t PNOR::getSectionInfo( PNOR::SectionId i_section,
}
/**
+ * @brief Loads requested PNOR section to secure virtual address space
+ */
+errlHndl_t PNOR::loadSecureSection(const SectionId i_section)
+{
+ //@TODO RTC 156118
+ // Replace with call to secure provider to load the section
+ errlHndl_t pError=NULL;
+ return pError;
+}
+
+/**
+ * @brief Flushes any applicable pending writes and unloads requested PNOR
+ * section from secure virtual address space
+ */
+errlHndl_t PNOR::unloadSecureSection(const SectionId i_section)
+{
+ //@TODO RTC 156118
+ // Replace with call to secure provider to load the section
+ errlHndl_t pError=NULL;
+ return pError;
+}
+
+/**
* @brief Clear pnor section
*/
errlHndl_t PNOR::clearSection(PNOR::SectionId i_section)
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