summaryrefslogtreecommitdiffstats
path: root/src/usr/isteps/istep07
diff options
context:
space:
mode:
authorAndres Lugo-Reyes <aalugore@us.ibm.com>2016-09-12 12:37:44 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-10-05 11:09:16 -0400
commit7849bdd4dd2c4d912a27f99ef543665d3bf873ce (patch)
tree9633c617adb7f6b19775bd4ef6fd216eb3028c96 /src/usr/isteps/istep07
parentbc356f272c67790cf307cdb4af53308129b492b0 (diff)
downloadtalos-hostboot-7849bdd4dd2c4d912a27f99ef543665d3bf873ce.tar.gz
talos-hostboot-7849bdd4dd2c4d912a27f99ef543665d3bf873ce.zip
Add call to update SBE image if nest freq changed in istep 7.3
Change-Id: I529056bf1380238f5064f18b39bc09ec97e7a112 RTC: 157659 Depends-on: Idea9e3ae8d08052e960c00c225522bbe8da3ea5e Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29521 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Matt Derksen <v2cibmd@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/isteps/istep07')
-rw-r--r--src/usr/isteps/istep07/call_mss_freq.C65
1 files changed, 47 insertions, 18 deletions
diff --git a/src/usr/isteps/istep07/call_mss_freq.C b/src/usr/isteps/istep07/call_mss_freq.C
index 1fd5438d9..591b871ae 100644
--- a/src/usr/isteps/istep07/call_mss_freq.C
+++ b/src/usr/isteps/istep07/call_mss_freq.C
@@ -113,7 +113,22 @@ void* call_mss_freq( void *io_pArgs )
}
} // End memBuf loop
+ // Set PB frequency to ASYNC_FREQ_MHZ
+ TARGETING::Target * l_sys = nullptr;
+ TARGETING::targetService().getTopLevelTarget( l_sys );
+
+ uint32_t l_originalNest = l_sys->getAttr<TARGETING::ATTR_FREQ_PB_MHZ>();
+ uint32_t l_asyncFreq =
+ l_sys->getAttr<TARGETING::ATTR_ASYNC_NEST_FREQ_MHZ>();
+ l_sys->setAttr<TARGETING::ATTR_FREQ_PB_MHZ>(l_asyncFreq);
+
+ // Save MC_SYNC_MODE
+ TARGETING::Target * l_masterProc = nullptr;
+ TARGETING::targetService()
+ .masterProcChipTargetHandle( l_masterProc );
+ uint8_t l_prevSyncMode =
+ l_masterProc->getAttr<TARGETING::ATTR_MC_SYNC_MODE>();
if(l_StepError.getErrorHandle() == NULL)
@@ -158,35 +173,49 @@ void* call_mss_freq( void *io_pArgs )
"WARNING skipping p9_mss_freq_system HWP due to error detected in p9_mss_freq HWP. An error should have been committed.");
}
-/* TODO RTC: 157659 Trigger SBE update if nest frequency changed
- // Check to see if the nest frequency changed
- TARGETING::targetService().getTopLevelTarget( l_sys );
- l_newNest = l_sys->getAttr<TARGETING::ATTR_NEST_FREQ_MHZ>();
- l_originalNest = l_sys->getAttr<TARGETING::ATTR_PREV_NEST_FREQ_MHZ>();
- // Trigger sbe update if the nest frequency changed.
+ // Check MC_SYNC_MODE
+ uint8_t l_mcSyncMode = l_masterProc->getAttr<TARGETING::ATTR_MC_SYNC_MODE>();
+ uint32_t l_newNest = 0;
+
+ // TODO RTC: 161197 Remove logic to set nest based off sync mode
+ // Set the nest frequency based off mc_sync_mode
+ if( l_mcSyncMode == 0 )
+ {
+ l_newNest = l_sys->getAttr<TARGETING::ATTR_ASYNC_NEST_FREQ_MHZ>();
+ }
+ else
+ {
+ TARGETING::TargetHandleList l_mcbists;
+ TARGETING::getAllChiplets(l_mcbists, TARGETING::TYPE_MCBIST);
+ l_newNest = l_mcbists.at(0)->getAttr<TARGETING::ATTR_MSS_FREQ>();
+ }
+ l_sys->setAttr<TARGETING::ATTR_FREQ_PB_MHZ>( l_newNest );
+ // TODO RTC: 161596 - Set ATTR_NEST_FREQ_MHZ as well until we know it is not being used anymore
+ l_sys->setAttr<TARGETING::ATTR_NEST_FREQ_MHZ>( l_newNest );
- if( l_newNest != l_originalNest )
+ //Trigger sbe update if the nest frequency changed.
+ if( (l_newNest != l_originalNest) || (l_mcSyncMode != l_prevSyncMode) )
{
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "The nest frequency or sync mode changed!"
+ " Original Nest: %d New Nest: %d"
+ " Original syncMode: %d New syncMode: %d",
+ l_originalNest, l_newNest, l_prevSyncMode, l_mcSyncMode );
l_err = SBE::updateProcessorSbeSeeproms();
if( l_err )
{
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
"call_mss_freq.C - Error calling updateProcessorSbeSeeproms");
+
+ // Create IStep error log and cross reference to error that occurred
+ l_StepError.addErrorDetails( l_err );
+
+ // Commit Error
+ errlCommit( l_err, HWPF_COMP_ID );
}
}
-*/
-
- // TODO RTC:138226
- // 3c) FW examines current synchronous mode nest freq and will customize the
- // SBE and reboot if necessary on the master only
- // (slaves get data via mbox scratch registers)
- /* FAPI_INVOKE_HWP(l_err, p9_xip_customize,
- const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_proc_target,
- const fapi2::Target<fapi2::TARGET_TYPE_SYSTEM>& i_system_target,
- void* io_image);
- */
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_freq exit" );
OpenPOWER on IntegriCloud