summaryrefslogtreecommitdiffstats
path: root/src/usr/sbe
diff options
context:
space:
mode:
authorStephen Cprek <smcprek@us.ibm.com>2017-03-01 10:44:16 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-04-10 17:46:57 -0400
commita7bf050d4ddba121d7502939fc0c4ce517ef8e42 (patch)
treee2f58591ec40a0f113d258f5b69dbbfcb1b397ab /src/usr/sbe
parentb8169717c26a8eb780569c50cce29ca47d3bb9fa (diff)
downloadtalos-hostboot-a7bf050d4ddba121d7502939fc0c4ce517ef8e42.tar.gz
talos-hostboot-a7bf050d4ddba121d7502939fc0c4ce517ef8e42.zip
Add header to and verify Hostboot Bootloader for sbe update
Change-Id: I2704ad9a110a52fe0ff0e290fdd9205a42bbd050 RTC:159915 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38326 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/sbe')
-rw-r--r--src/usr/sbe/sbe_update.C21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/usr/sbe/sbe_update.C b/src/usr/sbe/sbe_update.C
index c602fbf9b..4a85db350 100644
--- a/src/usr/sbe/sbe_update.C
+++ b/src/usr/sbe/sbe_update.C
@@ -1821,6 +1821,7 @@ namespace SBE
}
const void* hbblPnorPtr = reinterpret_cast<const void*>(
pnorInfo.vaddr);
+
// Use max hbbl size and not the PNOR size. The PNOR size can grow
// to add a secure header, but the code size limit is still 20K.
TRACFCOMP( g_trac_sbe, "getSbeInfoState() - "
@@ -3623,6 +3624,16 @@ namespace SBE
break;
}
+ // Load the Bootloader PNOR section into secure memory
+#ifdef CONFIG_SECUREBOOT
+ err = loadSecureSection(PNOR::HB_BOOTLOADER);
+ if(err)
+ {
+ TRACFCOMP( g_trac_sbe, ERR_MRK,"createSbeImageVmmSpace() - Error from loadSecureSection(PNOR::HB_BOOTLOADER)");
+ break;
+ }
+#endif
+
}while(0);
TRACDCOMP( g_trac_sbe,
@@ -3709,6 +3720,16 @@ namespace SBE
PNOR::flush( PNOR::SBE_IPL );
+ // Unload the Bootloader PNOR section from secure memory
+#ifdef CONFIG_SECUREBOOT
+ err = unloadSecureSection(PNOR::HB_BOOTLOADER);
+ if (err)
+ {
+ TRACFCOMP( g_trac_sbe, ERR_MRK,"cleanupSbeImageVmmSpace() - Error from unloadSecureSection(PNOR::HB_BOOTLOADER)");
+ break;
+ }
+#endif
+
}while(0);
OpenPOWER on IntegriCloud