Skip to content

Commit

Permalink
Slave SBE scratch regs must be up to date before continueMPIPL called
Browse files Browse the repository at this point in the history
There was a hole in the MPIPL path where we were not updating the
slave SBE scratch registers prior to rebooting them with the
continueMPIPL chip op. Without this we ran the risk of not having
correct information in the registers when the slave sbe restarted.

Change-Id: Ib666388ef8773cd16c3f403fa83750da3e551c55
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59070
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
crgeddes authored and dcrowell77 committed Jun 2, 2018
1 parent d41e6f6 commit 54080e1
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 4 deletions.
53 changes: 50 additions & 3 deletions src/usr/isteps/istep06/host_discover_targets.C
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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;
}


Expand Down Expand Up @@ -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)
{
Expand Down
6 changes: 5 additions & 1 deletion src/usr/isteps/istep06/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2015,2017
# Contributors Listed Below - COPYRIGHT 2015,2018
# [+] International Business Machines Corp.
#
#
Expand Down Expand Up @@ -36,13 +36,15 @@ 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
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}
Expand All @@ -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/
Expand All @@ -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
Expand Down

0 comments on commit 54080e1

Please sign in to comment.