summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2016-10-21 22:27:19 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-10-26 22:57:22 -0400
commit097b78713b5afd3a0e5ec4fbe6233237f5b2319b (patch)
tree76dba0d829f4bbede9c563fee3c8a706283b3210
parent89e0ca4b192181932044cb4169dc6929a1a879cd (diff)
downloadtalos-hostboot-097b78713b5afd3a0e5ec4fbe6233237f5b2319b.tar.gz
talos-hostboot-097b78713b5afd3a0e5ec4fbe6233237f5b2319b.zip
Changes to get slave SBE working
Add flag to actually start SBE FW Set ATTR_NEST_PLL_BUCKET Increase timeout for SBE start Setup all required freq attributes before setting up SBE Change-Id: Ic3b7c8c6b482787b8c37b2b5b04a8344213119cf Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31682 Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r--src/include/usr/sbe/sbeif.H7
-rw-r--r--src/usr/isteps/istep06/call_host_voltage_config.C21
-rw-r--r--src/usr/isteps/istep08/call_host_cbs_start.C2
-rw-r--r--src/usr/isteps/istep08/call_host_slave_sbe_config.C8
-rw-r--r--src/usr/isteps/istep08/call_proc_check_slave_sbe_seeprom_complete.C49
5 files changed, 61 insertions, 26 deletions
diff --git a/src/include/usr/sbe/sbeif.H b/src/include/usr/sbe/sbeif.H
index e095250fa..780399005 100644
--- a/src/include/usr/sbe/sbeif.H
+++ b/src/include/usr/sbe/sbeif.H
@@ -141,6 +141,13 @@ namespace SBE
*/
errlHndl_t getBootMcSyncMode( uint8_t& o_mcSyncMode );
+ /**
+ * @brief Set all of the attributes that are based on the PB/Nest Freq
+ *
+ * @param[in] i_nestFreq - Nest/PB Frequency to base settings on.
+ */
+ void setNestFreqAttributes( uint32_t i_nestFreq );
+
} //end namespace SBE
#endif /* _SBEIF_H */
diff --git a/src/usr/isteps/istep06/call_host_voltage_config.C b/src/usr/isteps/istep06/call_host_voltage_config.C
index 1c5db7f76..f84edf1f8 100644
--- a/src/usr/isteps/istep06/call_host_voltage_config.C
+++ b/src/usr/isteps/istep06/call_host_voltage_config.C
@@ -43,6 +43,9 @@
//SBE
#include <sbe/sbeif.H>
+#include <initservice/mboxRegs.H>
+#include <p9_frequency_buckets.H>
+
using namespace TARGETING;
@@ -292,6 +295,24 @@ void* call_host_voltage_config( void *io_pArgs )
l_nominalFreq, l_floorFreq, l_ceilingFreq,
l_turboFreq, l_ultraTurboFreq );
+ // Setup the remaining attributes that are based on PB/Nest
+ SBE::setNestFreqAttributes(l_nestFreq);
+
+ //NEST_PLL_BUCKET
+ for( size_t l_bucket = 1; l_bucket <= NEST_PLL_FREQ_BUCKETS; l_bucket++ )
+ {
+ // The nest PLL bucket IDs are numbered 1 - 5. Subtract 1 to
+ // take zero-based indexing into account.
+ if( NEST_PLL_FREQ_LIST[l_bucket-1] == l_nestFreq )
+ {
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "ATTR_NEST_PLL_BUCKET getting set to %x",
+ l_bucket);
+ l_sys->setAttr<TARGETING::ATTR_NEST_PLL_BUCKET>(l_bucket);
+ break;
+ }
+ }
+
} while( 0 );
if( l_err )
diff --git a/src/usr/isteps/istep08/call_host_cbs_start.C b/src/usr/isteps/istep08/call_host_cbs_start.C
index 12678e75f..f4307f7ec 100644
--- a/src/usr/isteps/istep08/call_host_cbs_start.C
+++ b/src/usr/isteps/istep08/call_host_cbs_start.C
@@ -103,7 +103,7 @@ void* call_host_cbs_start(void *io_pArgs)
"Running p9_start_cbs HWP on processor target %.8X",
TARGETING::get_huid(l_cpu_target) );
- FAPI_INVOKE_HWP(l_errl, p9_start_cbs, l_fapi2_proc_target);
+ FAPI_INVOKE_HWP(l_errl, p9_start_cbs, l_fapi2_proc_target, true);
if(l_errl)
{
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
diff --git a/src/usr/isteps/istep08/call_host_slave_sbe_config.C b/src/usr/isteps/istep08/call_host_slave_sbe_config.C
index 536d5200e..b71016605 100644
--- a/src/usr/isteps/istep08/call_host_slave_sbe_config.C
+++ b/src/usr/isteps/istep08/call_host_slave_sbe_config.C
@@ -102,6 +102,12 @@ void* call_host_slave_sbe_config(void *io_pArgs)
// write the attribute
l_sys->setAttr<ATTR_BOOT_FLAGS>(l_scratch3.data32);
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "ATTR_BOOT_FLAGS=%.8X", l_scratch3.data32 );
+
+ // grab the boot flags from the master proc
+ INITSERVICE::SPLESS::MboxScratch5_t l_scratch5;
+ l_scratch5.data32 = l_scratchRegs[INITSERVICE::SPLESS::SCRATCH_5];
+
// execute p9_setup_sbe_config.C for non-primary processor targets
TARGETING::TargetHandleList l_cpuTargetList;
@@ -118,6 +124,8 @@ void* call_host_slave_sbe_config(void *io_pArgs)
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
l_fapi2_proc_target (l_cpu_target);
+ l_cpu_target->setAttr<ATTR_MC_SYNC_MODE>(l_scratch5.mcSyncMode);
+
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"Running p9_setup_sbe_config HWP on processor target %.8X",
TARGETING::get_huid(l_cpu_target) );
diff --git a/src/usr/isteps/istep08/call_proc_check_slave_sbe_seeprom_complete.C b/src/usr/isteps/istep08/call_proc_check_slave_sbe_seeprom_complete.C
index 2af371d9f..cb5a4404a 100644
--- a/src/usr/isteps/istep08/call_proc_check_slave_sbe_seeprom_complete.C
+++ b/src/usr/isteps/istep08/call_proc_check_slave_sbe_seeprom_complete.C
@@ -116,21 +116,20 @@ void* call_proc_check_slave_sbe_seeprom_complete( void *io_pArgs )
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> l_fapi2ProcTarget(
const_cast<TARGETING::Target*> (l_cpu_target));
- // Each slave sbe gets 1s to respond with the fact that it's
+ // Each slave sbe gets 60s to respond with the fact that it's
// booted and at runtime (stable state)
- const uint32_t SLAVE_SBE_TIMEOUT_1S = 1000000000;
- const uint32_t SLAVE_SBE_WAIT_SLEEP = (SLAVE_SBE_TIMEOUT_1S/10);
- uint32_t l_time = 0;
+ const uint64_t SBE_TIMEOUT_NSEC = 60*NS_PER_SEC; //60sec
+ const uint64_t SBE_NUM_LOOPS = 100;
+ const uint64_t SBE_WAIT_SLEEP = (SBE_TIMEOUT_NSEC/SBE_NUM_LOOPS);
sbeMsgReg_t l_sbeReg;
- for(l_time=0; l_time<SLAVE_SBE_TIMEOUT_1S; l_time+=SLAVE_SBE_WAIT_SLEEP)
- {
-
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "Running p9_get_sbe_msg_register HWP"
- " on processor target %.8X",
- TARGETING::get_huid(l_cpu_target));
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "Running p9_get_sbe_msg_register HWP"
+ " on processor target %.8X",
+ TARGETING::get_huid(l_cpu_target));
+ for( uint64_t l_loops = 0; l_loops < SBE_NUM_LOOPS; l_loops++ )
+ {
l_sbeReg.reg = 0;
FAPI_INVOKE_HWP(l_errl, p9_get_sbe_msg_register,
l_fapi2ProcTarget,l_sbeReg);
@@ -145,24 +144,25 @@ void* call_proc_check_slave_sbe_seeprom_complete( void *io_pArgs )
else if(l_sbeReg.currState == SBE_STATE_RUNTIME)
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SBE 0x%.8X booted and at runtime, l_sbeReg=0x%.8X",
- TARGETING::get_huid(l_cpu_target),l_sbeReg.reg);
+ "SBE 0x%.8X booted and at runtime, l_sbeReg=0x%.8X",
+ TARGETING::get_huid(l_cpu_target),l_sbeReg.reg);
break;
}
else
{
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SBE 0x%.8X NOT booted yet, l_sbeReg=0x%.8X",
- TARGETING::get_huid(l_cpu_target),l_sbeReg.reg);
-
- nanosleep(0,SLAVE_SBE_WAIT_SLEEP);
+ if( !(l_loops % 10) )
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "%d> SBE 0x%.8X NOT booted yet, l_sbeReg=0x%.8X",
+ l_loops, TARGETING::get_huid(l_cpu_target),l_sbeReg.reg);
+
+ }
+ l_loops++;
+ nanosleep(0,SBE_WAIT_SLEEP);
}
}
- if((!l_errl) && (l_time == SLAVE_SBE_TIMEOUT_1S))
+ if((!l_errl) && (l_sbeReg.currState != SBE_STATE_RUNTIME))
{
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- ERR_MRK"Timeout hit waiting for sbe slave 0x%.8X",
- TARGETING::get_huid(l_cpu_target));
/*@
* @errortype
* @reasoncode RC_SBE_SLAVE_TIMEOUT
@@ -197,8 +197,7 @@ void* call_proc_check_slave_sbe_seeprom_complete( void *io_pArgs )
// we can still at least boot with master proc
errlCommit(l_errl,ISTEP_COMP_ID);
}
-
- if (l_errl)
+ else if (l_errl)
{
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
"ERROR : call p9_check_slave_sbe_seeprom_complete, "
@@ -232,7 +231,7 @@ void* call_proc_check_slave_sbe_seeprom_complete( void *io_pArgs )
"Running p9_extract_sbe_rc HWP"
" on processor target %.8X",
TARGETING::get_huid(l_cpu_target) );
-
+
//@TODO-RTC:100963-Do something with the RETURN_ACTION
P9_EXTRACT_SBE_RC::RETURN_ACTION l_rcAction
= P9_EXTRACT_SBE_RC::RE_IPL;
OpenPOWER on IntegriCloud