summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/include/usr/initservice/mboxRegs.H8
-rw-r--r--src/usr/isteps/istep07/call_mss_attr_update.C32
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
OpenPOWER on IntegriCloud