diff options
author | Jaymes Wilks <mjwilks@us.ibm.com> | 2017-09-13 09:53:39 -0500 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2017-10-20 12:50:04 -0400 |
commit | b70fc1ac984f9da0d9e4932b8a9e40b1ccf4da50 (patch) | |
tree | 509a1189bbbb420583dadd61603a08eb6691e2c3 /src/usr/pnor/pnorrp.C | |
parent | 3f4963bae6821005c0d355587e43ca17512e5a3b (diff) | |
download | talos-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/pnor/pnorrp.C')
-rw-r--r-- | src/usr/pnor/pnorrp.C | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/usr/pnor/pnorrp.C b/src/usr/pnor/pnorrp.C index 5a79879e2..0d4915ed0 100644 --- a/src/usr/pnor/pnorrp.C +++ b/src/usr/pnor/pnorrp.C @@ -118,8 +118,17 @@ errlHndl_t PNOR::flush( PNOR::SectionId i_section) " secId: %d", (int)i_section); break; } - int l_rc = mm_remove_pages (RELEASE, - reinterpret_cast<void*>(l_info.vaddr), l_info.size); + uint8_t* l_vaddr = reinterpret_cast<uint8_t*>(l_info.vaddr); + #ifdef CONFIG_SECUREBOOT + if (l_info.secure) + { + // subtract 2 deltas to get the PNOR unsecured address + l_vaddr = l_vaddr + - VMM_VADDR_SPNOR_DELTA + - VMM_VADDR_SPNOR_DELTA; + } + #endif + int l_rc = mm_remove_pages (RELEASE, l_vaddr, l_info.size); if (l_rc) { TRACFCOMP(g_trac_pnor, "PNOR::flush: mm_remove_pages errored," |