Skip to content

Commit

Permalink
Adjust MIN_FREQ_MHZ based on system power management def files
Browse files Browse the repository at this point in the history
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 <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
dcrowell77 committed Mar 1, 2017
1 parent de000da commit 8b4f11f
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 5 deletions.
20 changes: 20 additions & 0 deletions src/usr/isteps/istep06/call_host_voltage_config.C
Expand Up @@ -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
Expand Down Expand Up @@ -323,6 +331,18 @@ void* call_host_voltage_config( void *io_pArgs )
// set the frequency system targets
l_sys->setAttr<ATTR_NOMINAL_FREQ_MHZ>( l_nominalFreq );

// raise the min freq if there is a system policy for it
uint32_t l_dpoPercent = l_sys->getAttr<ATTR_DPO_MIN_FREQ_PERCENT>();
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<ATTR_MIN_FREQ_MHZ>( l_floorFreq );

l_sys->setAttr<ATTR_FREQ_CORE_CEILING_MHZ>( l_ceilingFreq );
Expand Down
26 changes: 21 additions & 5 deletions src/usr/targeting/common/xmltohb/attribute_types.xml
Expand Up @@ -2554,7 +2554,6 @@
</description>
<simpleType>
<uint32_t>
<!--TODO RTC:151649 Remove default value when data is pulled from MVPD #V -->
<default>4800</default>
</uint32_t>
</simpleType>
Expand All @@ -2567,6 +2566,27 @@
</hwpfToHbAttrMap>
</attribute>

<attribute>
<id>DPO_MIN_FREQ_PERCENT</id>
<description>
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.
</description>
<simpleType>
<uint32_t>
<default>0</default>
</uint32_t>
</simpleType>
<persistency>non-volatile</persistency>
<readable/>
<writeable/>
</attribute>

<attribute>
<id>FREQ_PB_MHZ</id>
<description>
Expand Down Expand Up @@ -3714,8 +3734,6 @@
</description>
<simpleType>
<uint32_t>
<!--TODO RTC:151649 Remove default value when data is pulled from MVPD #V -->
<default>4800</default>
</uint32_t>
</simpleType>
<persistency>volatile</persistency>
Expand Down Expand Up @@ -21297,8 +21315,6 @@ Measured in GB</description>
</description>
<simpleType>
<uint32_t>
<!--TODO RTC:151649 Remove default value when data is pulled from MVPD #V -->
<default>4800</default>
</uint32_t>
</simpleType>
<persistency>volatile</persistency>
Expand Down
4 changes: 4 additions & 0 deletions src/usr/targeting/common/xmltohb/simics_NIMBUS.system.xml
Expand Up @@ -97,6 +97,10 @@
<id>ASYNC_NEST_FREQ_MHZ</id>
<default>0x7D0</default>
</attribute>
<attribute>
<id>DPO_MIN_FREQ_PERCENT</id>
<default>98</default>
</attribute>
<attribute>
<id>REQUIRED_SYNCH_MODE</id>
<default>2</default><!-- NEVER -->
Expand Down
1 change: 1 addition & 0 deletions src/usr/targeting/common/xmltohb/target_types.xml
Expand Up @@ -607,6 +607,7 @@
<attribute><id>PROC_REFCLOCK_RCVR_TERM</id></attribute>
<attribute><id>PCI_REFCLOCK_RCVR_TERM</id></attribute>
<attribute><id>MIN_FREQ_MHZ</id></attribute>
<attribute><id>DPO_MIN_FREQ_PERCENT</id></attribute>
<attribute><id>FREQ_PROC_REFCLOCK</id></attribute>
<attribute><id>FREQ_PROC_REFCLOCK_KHZ</id></attribute>
<attribute><id>FREQ_MEM_REFCLOCK</id></attribute>
Expand Down

0 comments on commit 8b4f11f

Please sign in to comment.