diff options
-rw-r--r-- | src/usr/isteps/istep06/host_discover_targets.C | 53 | ||||
-rw-r--r-- | src/usr/isteps/istep06/makefile | 6 |
2 files changed, 55 insertions, 4 deletions
diff --git a/src/usr/isteps/istep06/host_discover_targets.C b/src/usr/isteps/istep06/host_discover_targets.C index 65d38b839..a5447e72b 100644 --- a/src/usr/isteps/istep06/host_discover_targets.C +++ b/src/usr/isteps/istep06/host_discover_targets.C @@ -61,6 +61,7 @@ #include <sys/misc.h> #include <p9_query_core_access_state.H> +#include <p9_setup_sbe_config.H> #include <p9_query_cache_access_state.H> #include <p9_hcd_core_stopclocks.H> #include <p9_hcd_cache_stopclocks.H> @@ -207,8 +208,46 @@ errlHndl_t sendContinueMpiplChipOp() } } } + return l_err; +} + +/** +* @brief Walk through list of PROC chip targets and run p9_setup_sbe_config +* HWP on all of the slave PROC chips to ensure scratch regs are updated +* +* @return errlHndl_t +*/ +errlHndl_t updateSlaveSbeScratchRegs() +{ + errlHndl_t l_err = nullptr; + + TARGETING::TargetHandleList l_procChips; + TARGETING::getAllChips(l_procChips, TARGETING::TYPE_PROC, true); + TARGETING::PROC_SBE_MASTER_CHIP_ATTR l_is_master_chip = 1; + + for(const auto & l_chip : l_procChips) + { + l_is_master_chip = l_chip->getAttr<TARGETING::ATTR_PROC_SBE_MASTER_CHIP>(); + if(!l_is_master_chip) + { + fapi2::Target <fapi2::TARGET_TYPE_PROC_CHIP> l_fapi_proc_target (l_chip); + // Run the setup_sbe_config hwp on all of the slave procs to make sure + // the scratch registers are up to date prior to sending the continueMPIPL + // operation + FAPI_INVOKE_HWP(l_err, + p9_setup_sbe_config, + l_fapi_proc_target); -return l_err; + if(l_err) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "Failed during updateSlaveSbeScratchRegs request on this proc = %x", + l_chip->getAttr<TARGETING::ATTR_HUID>()); + break; + } + } + } + return l_err; } @@ -444,14 +483,22 @@ void* host_discover_targets( void *io_pArgs ) "when the targeting service started"); do { - //Need to power down the slave quads + // Need to power down the slave quads l_err = powerDownSlaveQuads(); if (l_err) { break; } - //Send continue mpipl op to slave procs + // Need to ensure slave SBE's scratch registers are + // up to date prior to sending continueMPIPL op + l_err = updateSlaveSbeScratchRegs(); + if (l_err) + { + break; + } + + // Send continue mpipl op to slave procs l_err = sendContinueMpiplChipOp(); if (l_err) { diff --git a/src/usr/isteps/istep06/makefile b/src/usr/isteps/istep06/makefile index 05d298b15..e5e273e18 100644 --- a/src/usr/isteps/istep06/makefile +++ b/src/usr/isteps/istep06/makefile @@ -5,7 +5,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2015,2017 +# Contributors Listed Below - COPYRIGHT 2015,2018 # [+] International Business Machines Corp. # # @@ -36,6 +36,7 @@ OBJS += call_host_voltage_config.o SUBDIRS += thread_activate.d +PERV_HWP_PATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/perv NEST_HWP_PATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/nest PM_HWP_PATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/pm CORE_HWP_PATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/core @@ -43,6 +44,7 @@ CACHE_HWP_PATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/cache LIB_HWP_PATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/lib VPATH += ${NEST_HWP_PATH} +VPATH += ${PERV_HWP_PATH} VPATH += ${PM_HWP_PATH} VPATH += ${LIB_HWP_PATH} VPATH += ${CORE_HWP_PATH} @@ -54,6 +56,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2 EXTRAINCDIR += ${ROOTPATH}/src/include/usr/secureboot EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/common/include EXTRAINCDIR += ${NEST_HWP_PATH} +EXTRAINCDIR += ${PERV_HWP_PATH} EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/imageProcs/ EXTRAINCDIR += ${ROOTPATH}/src/import/chips/common/utils/imageProcs/ @@ -74,6 +77,7 @@ include $(NEST_HWP_PATH)/p9_revert_sbe_mcs_setup.mk # Take another look at PM lib include $(PM_HWP_PATH)/p9_pm_utils.mk +include $(PERV_HWP_PATH)/p9_setup_sbe_config.mk include $(PM_HWP_PATH)/p9_query_core_access_state.mk include $(PM_HWP_PATH)/p9_query_cache_access_state.mk include $(PM_HWP_PATH)/p9_quad_power_off.mk |