From 8b4f11fa8aee0b102c43f2f2944b97d89039f134 Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Wed, 8 Feb 2017 16:14:11 -0600 Subject: [PATCH] Adjust MIN_FREQ_MHZ based on system power management def files Added common attribute for FSP to communicate system DPO policies to Hostboot to use while computing MIN_FREQ_MHZ. Change-Id: I67f4e7607c389e6d77b1af5a0295b0730cce16ed Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36184 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Reviewed-by: Martin Gloff Reviewed-by: Corey V. Swenson Reviewed-by: Daniel M. Crowell --- .../isteps/istep06/call_host_voltage_config.C | 20 ++++++++++++++ .../common/xmltohb/attribute_types.xml | 26 +++++++++++++++---- .../common/xmltohb/simics_NIMBUS.system.xml | 4 +++ .../targeting/common/xmltohb/target_types.xml | 1 + 4 files changed, 46 insertions(+), 5 deletions(-) diff --git a/src/usr/isteps/istep06/call_host_voltage_config.C b/src/usr/isteps/istep06/call_host_voltage_config.C index 2d71280ab03..467fb1bf818 100644 --- a/src/usr/isteps/istep06/call_host_voltage_config.C +++ b/src/usr/isteps/istep06/call_host_voltage_config.C @@ -289,6 +289,14 @@ void* call_host_voltage_config( void *io_pArgs ) l_turboFreq = l_ceilingFreq; } + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "Proc %.8X Freq from #V: " + "Powersave = %d Turbo = %d, UltraTurbo = %d", + TARGETING::get_huid(l_proc), + l_voltageData.PSFreq, + l_voltageData.turboFreq, + l_voltageData.uTurboFreq ); + } // EQ for-loop // Don't set the boot voltage ATTR -- instead the @@ -323,6 +331,18 @@ void* call_host_voltage_config( void *io_pArgs ) // set the frequency system targets l_sys->setAttr( l_nominalFreq ); + // raise the min freq if there is a system policy for it + uint32_t l_dpoPercent = l_sys->getAttr(); + uint32_t l_dpoFreq = l_nominalFreq; + if( (l_dpoPercent != 0) && (l_dpoPercent < 100) ) + { + l_dpoFreq = (l_nominalFreq*l_dpoPercent)/100; + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "Computed floor=%d, DPO=%d (percent=-%d)", + l_floorFreq, l_dpoFreq, l_dpoPercent ); + l_floorFreq = std::max( l_floorFreq, l_dpoFreq ); + } + l_sys->setAttr( l_floorFreq ); l_sys->setAttr( l_ceilingFreq ); diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml index 8317ff05c8c..48499b8edcf 100644 --- a/src/usr/targeting/common/xmltohb/attribute_types.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types.xml @@ -2554,7 +2554,6 @@ - 4800 @@ -2567,6 +2566,27 @@ + + DPO_MIN_FREQ_PERCENT + + Defines a negative percentage value that is applied to + the ATTR_NOMINAL_FREQ_MHZ determined from MVPD #V. It + is used to explicitly raise the value of MIN_FREQ_MHZ above + what is specified by MVPD #V data. On FSP systems this + is sourced from the power_management def file. + Value must be between 0 and 100. + A value of zero indicates no override. + + + + 0 + + + non-volatile + + + + FREQ_PB_MHZ @@ -3714,8 +3734,6 @@ - - 4800 volatile @@ -21297,8 +21315,6 @@ Measured in GB - - 4800 volatile diff --git a/src/usr/targeting/common/xmltohb/simics_NIMBUS.system.xml b/src/usr/targeting/common/xmltohb/simics_NIMBUS.system.xml index e2dac7acdeb..44d8ffaea88 100644 --- a/src/usr/targeting/common/xmltohb/simics_NIMBUS.system.xml +++ b/src/usr/targeting/common/xmltohb/simics_NIMBUS.system.xml @@ -97,6 +97,10 @@ ASYNC_NEST_FREQ_MHZ 0x7D0 + + DPO_MIN_FREQ_PERCENT + 98 + REQUIRED_SYNCH_MODE 2 diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml index 9e0d60185db..526a1444b7f 100755 --- a/src/usr/targeting/common/xmltohb/target_types.xml +++ b/src/usr/targeting/common/xmltohb/target_types.xml @@ -607,6 +607,7 @@ PROC_REFCLOCK_RCVR_TERM PCI_REFCLOCK_RCVR_TERM MIN_FREQ_MHZ + DPO_MIN_FREQ_PERCENT FREQ_PROC_REFCLOCK FREQ_PROC_REFCLOCK_KHZ FREQ_MEM_REFCLOCK