From 465c463bd32aa12c417e2e26e44832a6de4b661e Mon Sep 17 00:00:00 2001 From: Corey Swenson Date: Wed, 28 Sep 2016 16:39:50 -0500 Subject: Special wakeup updates for P9 power-on Change-Id: I851e854eed0fa273d6b1e6cea6d6ff3e1ed007ae RTC:161674 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/30439 Tested-by: Jenkins Server Reviewed-by: Martin Gloff Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- src/usr/isteps/istep21/call_host_start_payload.C | 69 ++++++++++++++++++++++-- src/usr/isteps/istep21/makefile | 8 ++- 2 files changed, 71 insertions(+), 6 deletions(-) (limited to 'src/usr/isteps/istep21') diff --git a/src/usr/isteps/istep21/call_host_start_payload.C b/src/usr/isteps/istep21/call_host_start_payload.C index 004e95976..e1eb52d86 100644 --- a/src/usr/isteps/istep21/call_host_start_payload.C +++ b/src/usr/isteps/istep21/call_host_start_payload.C @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -45,14 +46,16 @@ #include #include #include - -#include +#include +#include +#include using namespace ERRORLOG; using namespace ISTEP; using namespace ISTEP_ERROR; using namespace TARGETING; +using namespace p9specialWakeup; namespace ISTEP_21 { @@ -77,6 +80,14 @@ errlHndl_t callShutdown ( uint64_t i_hbInstance, bool i_masterIntance ); */ errlHndl_t broadcastShutdown ( uint64_t i_hbInstance ); +/** + * @brief This function disables the special wakeup that allows scom + * operations on napped cores + * + * @return errlHndl_t error handle + */ +errlHndl_t disableSpecialWakeup(); + /** * @brief Re-enables the local core checkstop function * @@ -179,10 +190,7 @@ void* call_host_start_payload (void *io_pArgs) if( l_errl == NULL ) { -// todo RTC:132413 Special Wakeup updates for P9 -#if (0) l_errl = disableSpecialWakeup(); -#endif } if( l_errl == NULL ) @@ -468,6 +476,57 @@ errlHndl_t broadcastShutdown ( uint64_t i_hbInstance ) return err; } + + +errlHndl_t disableSpecialWakeup() +{ + errlHndl_t l_errl = NULL; + + TargetHandleList l_cores; + getAllChiplets(l_cores, TYPE_CORE); + uint32_t l_numCores = 0; + + for( const auto & l_core: l_cores ) + { + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Iterating all cores in system - " + "This is core: %d", l_numCores); + l_numCores += 1; + + const fapi2::Target + l_fapi2_coreTarget(l_core); + + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "Running p9_cpu_special_wakeup_core (DISABLE) target HUID %.8X", + TARGETING::get_huid(l_core)); + + // Disable special wakeup on core + FAPI_INVOKE_HWP( l_errl, + p9_cpu_special_wakeup_core, + l_fapi2_coreTarget, + SPCWKUP_ENABLE, + HOST); + if( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : disable p9_cpu_special_wakeup_core, " + "PLID=0x%x", l_errl->plid() ); + + ErrlUserDetailsTarget(l_core).addToLog( l_errl ); + + break; + } + else + { + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS: disable p9_cpu_special_wakeup_core"); + } + } + + return l_errl; +} + + /** * @brief Re-enables the local core checkstop function */ diff --git a/src/usr/isteps/istep21/makefile b/src/usr/isteps/istep21/makefile index 05fa4ac23..eed55ba52 100644 --- a/src/usr/isteps/istep21/makefile +++ b/src/usr/isteps/istep21/makefile @@ -5,7 +5,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2015 +# Contributors Listed Below - COPYRIGHT 2015,2016 # [+] International Business Machines Corp. # # @@ -25,6 +25,12 @@ ROOTPATH = ../../../.. MODULE = istep21 +EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/pm/ +EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/ffdc/ +EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/imageProcs/ +EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include/ +EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/ + OBJS += call_host_runtime_setup.o OBJS += call_host_verify_hdat.o OBJS += call_host_start_payload.o -- cgit v1.2.1