diff options
author | Dean Sanner <dsanner@us.ibm.com> | 2016-07-07 13:09:42 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-08-24 14:41:08 -0400 |
commit | 3be87b5d73ece3921638e098de2131cb4aca301b (patch) | |
tree | f8046d18b6e24d520a0ec7a3871d0b9a039ddbc4 | |
parent | ab00e2c95959ff546d6da72bde6bf2e664f62aff (diff) | |
download | talos-hostboot-3be87b5d73ece3921638e098de2131cb4aca301b.tar.gz talos-hostboot-3be87b5d73ece3921638e098de2131cb4aca301b.zip |
Honor ISTEP/MPIPL MODE flag in mbox scratch 3 reg
Change-Id: Ia83f1abfe28d0418659aec7d0e2cd38a013fe8a9
RTC: 134431
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26730
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r-- | src/include/usr/initservice/mboxRegs.H | 4 | ||||
-rw-r--r-- | src/include/usr/util/utilmbox_scratch.H | 5 | ||||
-rw-r--r-- | src/usr/initservice/bootconfig/bootconfigif.C | 2 | ||||
-rwxr-xr-x | src/usr/targeting/targetservicestart.C | 34 |
4 files changed, 23 insertions, 22 deletions
diff --git a/src/include/usr/initservice/mboxRegs.H b/src/include/usr/initservice/mboxRegs.H index b000cc0d5..69b942757 100644 --- a/src/include/usr/initservice/mboxRegs.H +++ b/src/include/usr/initservice/mboxRegs.H @@ -33,6 +33,10 @@ namespace SPLESS const uint32_t MBOX_SCRATCH_REG2 = 0x00050039; const uint32_t MBOX_SCRATCH_REG3 = 0x0005003a; const uint32_t MBOX_SCRATCH_REG4 = 0x0005003b; + const uint32_t MBOX_SCRATCH_REG5 = 0x0005003c; + const uint32_t MBOX_SCRATCH_REG6 = 0x0005003d; + const uint32_t MBOX_SCRATCH_REG7 = 0x0005003e; + const uint32_t MBOX_SCRATCH_REG8 = 0x0005003f; }; }; #endif diff --git a/src/include/usr/util/utilmbox_scratch.H b/src/include/usr/util/utilmbox_scratch.H index b1111cd14..b995da557 100644 --- a/src/include/usr/util/utilmbox_scratch.H +++ b/src/include/usr/util/utilmbox_scratch.H @@ -60,6 +60,11 @@ namespace Util MSG_TYPE_TRACE = 0x00, MSG_TYPE_ATTRDUMP = 0x01, + + + ISTEP_CONFIG_BIT = 0x8000000000000000, + MPIPL_CONFIG_BIT = 0x2000000000000000, + }; /** diff --git a/src/usr/initservice/bootconfig/bootconfigif.C b/src/usr/initservice/bootconfig/bootconfigif.C index 7cdab29d7..488a8f537 100644 --- a/src/usr/initservice/bootconfig/bootconfigif.C +++ b/src/usr/initservice/bootconfig/bootconfigif.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ diff --git a/src/usr/targeting/targetservicestart.C b/src/usr/targeting/targetservicestart.C index 8fe354667..853db5ebd 100755 --- a/src/usr/targeting/targetservicestart.C +++ b/src/usr/targeting/targetservicestart.C @@ -44,6 +44,7 @@ #include <targeting/common/trace.H> #include <targeting/adapters/assertadapter.H> #include <initservice/taskargs.H> +#include <util/utilmbox_scratch.H> // This component #include <targeting/common/targetservice.H> @@ -56,6 +57,7 @@ #include <config.h> + //****************************************************************************** // targetService //****************************************************************************** @@ -242,34 +244,24 @@ static void initializeAttributes(TargetService& i_targetService) l_pMasterProcChip->setAttr<ATTR_I2C_SWITCHES>(l_i2c_switches); -#if 0 //@fixme RTC 134431 - errlHndl_t l_errl = NULL; - size_t l_size = sizeof(uint64_t); - uint64_t l_data; - - // Scratch register 2 is defined as 0x00050039.. - l_errl = DeviceFW::deviceRead(l_pMasterProcChip, - &(l_data), - l_size, - DEVICE_SCOM_ADDRESS(MBOX_SCRATCH2)); + // Check mbox scratch reg 3 for IPL boot options + // Specifically istep mode (bit 0) and MPIPL (bit 2) + uint64_t l_data = + Util::readScratchReg(INITSERVICE::SPLESS::MBOX_SCRATCH_REG3); - if(l_errl) + // Targeting data defaults to non istep, only turn "on" if bit + // is set so we don't tromp default setting + if ((l_data & Util::ISTEP_CONFIG_BIT) == Util::ISTEP_CONFIG_BIT) { - TARG_INF("Read of scratch register failed"); - errlCommit(l_errl,TARG_COMP_ID); + l_pTopLevel->setAttr<ATTR_ISTEP_MODE>(1); } - else + + if ((l_data & Util::MPIPL_CONFIG_BIT) == Util::MPIPL_CONFIG_BIT) { - // bit 0 on indicates MPIPL - if(l_data & 0x8000000000000000ull) - { - l_isMpipl = true; - } + l_isMpipl = true; } -#endif //@fixme RTC 134431 } - if(l_isMpipl) { l_pTopLevel->setAttr<ATTR_IS_MPIPL_HB>(1); |