diff options
author | Ilya Smirnov <ismirno@us.ibm.com> | 2019-08-07 09:07:45 -0500 |
---|---|---|
committer | Daniel M Crowell <dcrowell@us.ibm.com> | 2019-08-23 10:25:39 -0500 |
commit | 4ea0824d85620f3fd5a6fc8f6fcc1fb78cc1f0ad (patch) | |
tree | 3997779b81929fbb5200fa69625f3c33a5d673b5 | |
parent | ea5da88b0188b84b8097d977e5841d3113af8354 (diff) | |
download | blackbird-hostboot-4ea0824d85620f3fd5a6fc8f6fcc1fb78cc1f0ad.tar.gz blackbird-hostboot-4ea0824d85620f3fd5a6fc8f6fcc1fb78cc1f0ad.zip |
Update SBE In Istep7.5 In SMF Mode
A bug was discovered on OpenPOWER systems wherein if SMF
is enabled, we would checkstop in istep10.1 when trying
to XSCOM to the slave proc. The issue was that SBE at that
time didn't know we were booting in SMF mode and so didn't
set up the XSCOM BAR for the slave proc appropriately.
The solution is to force SBE update in istep7.5 if SMF is
enabled in the MRW (ATTR_SMF_CONFIG) but SBE doesn't yet
know about that (bit 16 in scratch reg6 is not set).
Change-Id: Ibaa2d1e5b441f378528443aa84e5cd61789792dd
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/81950
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
-rw-r--r-- | src/include/usr/initservice/mboxRegs.H | 8 | ||||
-rw-r--r-- | src/usr/isteps/istep07/call_mss_attr_update.C | 32 |
2 files changed, 36 insertions, 4 deletions
diff --git a/src/include/usr/initservice/mboxRegs.H b/src/include/usr/initservice/mboxRegs.H index 889f2126b..ce43a4d52 100644 --- a/src/include/usr/initservice/mboxRegs.H +++ b/src/include/usr/initservice/mboxRegs.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2018 */ +/* Contributors Listed Below - COPYRIGHT 2015,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -157,10 +157,12 @@ namespace SPLESS struct { uint32_t procMemToUse :7; //0:6 - uint32_t reserved1 :23; //7:22 + uint32_t reserved1 :9; //7:15 + uint32_t smfConfig :1; //16 + uint32_t reserved2 :6; //17:22 uint32_t groupPumpMode :1; //23 uint32_t isSlave :1; //24 - uint32_t reserved2 :1; //25 + uint32_t reserved3 :1; //25 uint32_t groupId :3; //26:28 uint32_t chipId :3; //29:31 } PACKED; diff --git a/src/usr/isteps/istep07/call_mss_attr_update.C b/src/usr/isteps/istep07/call_mss_attr_update.C index 4e015d7b8..3c1893273 100644 --- a/src/usr/isteps/istep07/call_mss_attr_update.C +++ b/src/usr/isteps/istep07/call_mss_attr_update.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2018 */ +/* Contributors Listed Below - COPYRIGHT 2015,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -72,6 +72,9 @@ #include <isteps/mem_utils.H> +#include <secureboot/smf_utils.H> +#include <initservice/mboxRegs.H> + namespace ISTEP_07 { @@ -307,6 +310,33 @@ errlHndl_t check_proc0_memory_config(IStepError & io_istepErr) (l_procIds[i].proc)->getAttr<ATTR_FABRIC_CHIP_ID>()); } + TARGETING::Target* l_sys = nullptr; + TARGETING::targetService().getTopLevelTarget(l_sys); + assert(l_sys != nullptr, "Top level target is nullptr!"); + + TARGETING::ATTR_MASTER_MBOX_SCRATCH_type l_scratchRegs; + assert( + l_sys->tryGetAttr<TARGETING::ATTR_MASTER_MBOX_SCRATCH>(l_scratchRegs), + "failed to get MASTER_MBOX_SCRATCH"); + INITSERVICE::SPLESS::MboxScratch6_t l_scratch6 { + l_scratchRegs[INITSERVICE::SPLESS::SCRATCH_6]}; + + // If the smfConfig bit in scratch reg6 does not match the SMF_ENABLED + // setting on the system, then the SBE is in disagreement with the system on + // whether SMF mode should be enabled. We need to force SBE update here so + // that the XSCOM BAR on the slave proc is set correctly before + // we try to perform XSCOM operations in istep10. + if(l_scratch6.smfConfig != SECUREBOOT::SMF::isSmfEnabled()) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "SBE and SYS disagree on the SMF setting; SBE thinks it " + "should be %s, but it should actually be %s;" + "requesting SBE update.", + l_scratch6.smfConfig ? "enabled" : "disabled", + SECUREBOOT::SMF::isSmfEnabled() ? "enabled" : "disabled"); + l_updateNeeded = true; + } + if(l_updateNeeded) { do |