diff options
author | Andrew Geissler <andrewg@us.ibm.com> | 2016-07-26 09:37:10 -0500 |
---|---|---|
committer | Matthew A. Ploetz <maploetz@us.ibm.com> | 2016-08-01 17:42:15 -0400 |
commit | 5320654ff092cedeac94b65cfd70b88de72807ec (patch) | |
tree | 14075eb97d3cfeffa8f7bf7aa1930fb22a196ffa /src/usr | |
parent | d7be36ed86143f98cbd1edb0b10246c071c52e91 (diff) | |
download | talos-hostboot-5320654ff092cedeac94b65cfd70b88de72807ec.tar.gz talos-hostboot-5320654ff092cedeac94b65cfd70b88de72807ec.zip |
Quiesce mailbox prior to starting deadman timer
With continuous trace enabled, quiescing the mailbox in istep16
can take a bit of time. We don't want this counting against
the deadman timeout.
Change-Id: I39b868a9367b0ae2318bf921c172e84d3b3454a1
RTC: 150923
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27453
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: William G. Hoffa <wghoffa@us.ibm.com>
Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/isteps/istep16/call_host_activate_master.C | 63 |
1 files changed, 32 insertions, 31 deletions
diff --git a/src/usr/isteps/istep16/call_host_activate_master.C b/src/usr/isteps/istep16/call_host_activate_master.C index fade3e991..37ab4300d 100644 --- a/src/usr/isteps/istep16/call_host_activate_master.C +++ b/src/usr/isteps/istep16/call_host_activate_master.C @@ -82,15 +82,28 @@ void* call_host_activate_master (void *io_pArgs) const fapi2::Target<fapi2::TARGET_TYPE_CORE> l_fapi2_coreTarget( const_cast<TARGETING::Target*> (l_masterCore)); + //Because of a bug in how the SBE injects the IPI used to wake + //up the master core, need to ensure no mailbox traffic + //or even an interrupt in the interrupt presenter + // 1) suspend the mailbox with interrupt disable + // 2) tell the SBE to start the deadman timer + // 3) ensure that interrupt presenter is drained + l_errl = MBOX::suspend(true, true); + if (l_errl) + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_activate_master ERROR : MBOX::suspend"); + break; + } + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_activate_master: About to start deadman loop... " "Target HUID %.8X", TARGETING::get_huid(l_proc_target)); - //In the future possibly move default "waitTime" value to SBEIO code - uint64_t waitTime = 10000; - l_errl = SBEIO::startDeadmanLoop(waitTime); - + //In the future possibly move default "waitTime" value to SBEIO code + uint64_t waitTime = 10000; + l_errl = SBEIO::startDeadmanLoop(waitTime); if ( l_errl ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, @@ -107,27 +120,15 @@ void* call_host_activate_master (void *io_pArgs) TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "startDeadManLoop SUCCESS" ); } + //Need to indicate to PHYP to save HRMOR and other SPR Data to be // applied during wakeup MAGIC_INSTRUCTION(MAGIC_SIMICS_CORESTATESAVE); - //Because of a bug in how the SBE injects the IPI used to wake - //up the master core, need to ensure no mailbox traffic - //or even an interrupt in the interrupt presenter - // 1) suspend the mailbox with interrupt disable - // 2) ensure that interrupt presenter is drained - l_errl = MBOX::suspend(true, true); - if (l_errl) - { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_host_activate_master ERROR : MBOX::suspend"); - break; - } TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "draining interrupt Q"); INTR::drainQueue(); - // Call p9_block_wakeup_intr to prevent stray interrupts from // popping core out of winkle before SBE sees it. @@ -226,21 +227,7 @@ void* call_host_activate_master (void *io_pArgs) TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Returned from Winkle." ); - //Re-enable the mailbox - l_errl = MBOX::resume(); - if (l_errl) - { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_host_activate_master ERROR : MBOX::resume"); - break; - } - - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Call proc_stop_deadman_timer. Target %.8X", - TARGETING::get_huid(l_proc_target) ); - l_errl = SBEIO::stopDeadmanLoop(); - if ( l_errl ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, @@ -258,6 +245,20 @@ void* call_host_activate_master (void *io_pArgs) TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "stopDeadmanLoop SUCCESS" ); } + + //Re-enable the mailbox + l_errl = MBOX::resume(); + if (l_errl) + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_activate_master ERROR : MBOX::resume"); + break; + } + + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Call proc_stop_deadman_timer. Target %.8X", + TARGETING::get_huid(l_proc_target) ); + TARGETING::Target* sys = NULL; TARGETING::targetService().getTopLevelTarget(sys); |