diff options
author | Andres Lugo-Reyes <aalugore@us.ibm.com> | 2016-09-12 12:37:44 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-10-05 11:09:16 -0400 |
commit | 7849bdd4dd2c4d912a27f99ef543665d3bf873ce (patch) | |
tree | 9633c617adb7f6b19775bd4ef6fd216eb3028c96 /src/usr/isteps | |
parent | bc356f272c67790cf307cdb4af53308129b492b0 (diff) | |
download | talos-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')
-rw-r--r-- | src/usr/isteps/istep06/call_host_voltage_config.C | 17 | ||||
-rw-r--r-- | src/usr/isteps/istep07/call_mss_freq.C | 65 |
2 files changed, 62 insertions, 20 deletions
diff --git a/src/usr/isteps/istep06/call_host_voltage_config.C b/src/usr/isteps/istep06/call_host_voltage_config.C index f2d822594..19b35adde 100644 --- a/src/usr/isteps/istep06/call_host_voltage_config.C +++ b/src/usr/isteps/istep06/call_host_voltage_config.C @@ -40,7 +40,8 @@ #include <p9_pm_get_poundv_bucket.H> #include <p9_setup_evid.H> - +//SBE +#include <sbe/sbeif.H> using namespace TARGETING; @@ -70,6 +71,7 @@ void* call_host_voltage_config( void *io_pArgs ) uint32_t l_vddBootVoltage = 0; //ATTR_VDD_BOOT_VOLTAGE uint32_t l_vdnBootVoltage = 0; //ATTR_VDN_BOOT_VOLTAGE uint32_t l_vcsBootVoltage = 0; //ATTR_VCS_BOOT_VOLTAGE + uint32_t l_nestFreq = 0; //ATTR_FREQ_PB_MHZ bool l_firstPass = true; @@ -85,6 +87,18 @@ void* call_host_voltage_config( void *io_pArgs ) // Get the system target targetService().getTopLevelTarget(l_sys); + // Set the Nest frequency to whatever we boot with + l_err = SBE::getBootNestFreq( l_nestFreq ); + + if( l_err ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_voltage_config.C::" + "Failed getting the boot nest frequency from the SBE"); + } + + l_sys->setAttr<TARGETING::ATTR_FREQ_PB_MHZ>( l_nestFreq ); + // Get the child proc chips getChildAffinityTargets( l_procList, l_sys, @@ -277,7 +291,6 @@ void* call_host_voltage_config( void *io_pArgs ) l_nominalFreq, l_floorFreq, l_ceilingFreq, l_turboFreq, l_ultraTurboFreq ); - // TODO RTC:157890 need interface to look at the SBE and set NEST_FREQ_MHZ and PREV_NEST_FREQ_MHZ to whatever we boot from } while( 0 ); if( l_err ) 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" ); |