summaryrefslogtreecommitdiffstats
path: root/src/usr/isteps/istep21/call_host_start_payload.C
diff options
context:
space:
mode:
authorCorey Swenson <cswenson@us.ibm.com>2016-09-28 16:39:50 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-10-05 10:53:10 -0400
commit465c463bd32aa12c417e2e26e44832a6de4b661e (patch)
tree4bef6e46c4c61fe60269556b80c1d93eb32b6448 /src/usr/isteps/istep21/call_host_start_payload.C
parent4415fb37f923bfeb63f1f81c55fe177d2e0adb95 (diff)
downloadtalos-hostboot-465c463bd32aa12c417e2e26e44832a6de4b661e.tar.gz
talos-hostboot-465c463bd32aa12c417e2e26e44832a6de4b661e.zip
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 <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/isteps/istep21/call_host_start_payload.C')
-rw-r--r--src/usr/isteps/istep21/call_host_start_payload.C69
1 files changed, 64 insertions, 5 deletions
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 <errl/errlentry.H>
#include <errl/errlmanager.H>
+#include <errl/errludtarget.H>
#include <initservice/isteps_trace.H>
#include <isteps/hwpisteperror.H>
#include <isteps/istep_reasoncodes.H>
@@ -45,14 +46,16 @@
#include <devicefw/userif.H>
#include <arch/pirformat.H>
#include <isteps/hwpf_reasoncodes.H>
-
-#include <errl/errludtarget.H>
+#include <fapi2/target.H>
+#include <fapi2/plat_hwp_invoker.H>
+#include <p9_cpu_special_wakeup.H>
using namespace ERRORLOG;
using namespace ISTEP;
using namespace ISTEP_ERROR;
using namespace TARGETING;
+using namespace p9specialWakeup;
namespace ISTEP_21
{
@@ -78,6 +81,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
*
* @return errlHndl_t error handle
@@ -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<fapi2::TARGET_TYPE_CORE>
+ 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
*/
OpenPOWER on IntegriCloud