summaryrefslogtreecommitdiffstats
path: root/src/usr/runtime
diff options
context:
space:
mode:
authorStephen Cprek <smcprek@us.ibm.com>2017-12-05 16:46:54 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-12-12 17:16:19 -0500
commit82f341573515e1dd39c622a955e08d3ab669b458 (patch)
tree6fce1174aa6d97efd8d84101216f1cc6cc1ee0db /src/usr/runtime
parentfa2acdeb7202692ab0153579b007c70b372a88b4 (diff)
downloadtalos-hostboot-82f341573515e1dd39c622a955e08d3ab669b458.tar.gz
talos-hostboot-82f341573515e1dd39c622a955e08d3ab669b458.zip
Fix incorrect size for entries going into hb resv memory
Sections that do not have Secure Headers and need one injected were not passing in the correct size to preverifiedlidmgr. e.g. RINGOVD section or when SB is compiled out Change-Id: I6e8c775a9a1d3f89473c55af6efc8109fb378c99 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50545 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@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> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/runtime')
-rw-r--r--src/usr/runtime/populate_hbruntime.C13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/usr/runtime/populate_hbruntime.C b/src/usr/runtime/populate_hbruntime.C
index e7ebbea54..b4c700de2 100644
--- a/src/usr/runtime/populate_hbruntime.C
+++ b/src/usr/runtime/populate_hbruntime.C
@@ -605,21 +605,22 @@ errlHndl_t hbResvLoadSecureSection (const PNOR::SectionId i_sec,
// Check if the section is expected to have a secure header regardless
// of compile options
+#ifdef CONFIG_SECUREBOOT
if (i_secHdrExpected)
{
-#ifdef CONFIG_SECUREBOOT
// If section is signed, only the protected size was loaded into memory
l_imgSize = l_info.secureProtectedPayloadSize;
// Include secure header
// NOTE: we do not preserve the header in virtual memory when SB
// is compiled out. So "-PAGESIZE" only works when SB is compiled in
l_pnorVaddr -= PAGESIZE;
-#endif
- // Add size for secure header.
- // NOTE: if SB compiled out, a header will be injected later so
- // preserve space for the header.
- l_imgSize += PAGESIZE;
}
+#endif
+ // Add size for secure header, as a header is REQUIRED for lid load
+ // from hostboot reserved memory to work in every scenario.
+ // NOTE: if SB compiled out or a header is never added, one will be
+ // injected later with min information. So preserve space for the header.
+ l_imgSize += PAGESIZE;
// Load Pnor section into HB reserved memory
l_elog = PreVerifiedLidMgr::loadFromPnor(i_sec, l_pnorVaddr, l_imgSize);
OpenPOWER on IntegriCloud