Skip to content

Commit 6a85bab

Browse files
mgloffploetzma
authored andcommitted
Data Type of ATTR_DPO_MIN_FREQ_PERCENT should be int32_t
ATTR_DPO_MIN_FREQ_PERCENT is always a negative value, so it should be int32_t type, instead of uint32_t. Make corresponding changes to DPO frequency calculation. Change-Id: I97d608d71a39b010b60b94bb740ba9fa9df7f17b CQ: SW390623 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41337 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com>
1 parent 727f9b3 commit 6a85bab

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/usr/isteps/istep06/call_host_voltage_config.C

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,13 +415,15 @@ void* call_host_voltage_config( void *io_pArgs )
415415
l_sys->setAttr<ATTR_NOMINAL_FREQ_MHZ>( l_nominalFreq );
416416

417417
// raise the min freq if there is a system policy for it
418-
uint32_t l_dpoPercent = l_sys->getAttr<ATTR_DPO_MIN_FREQ_PERCENT>();
418+
int32_t l_dpoPercent = l_sys->getAttr<ATTR_DPO_MIN_FREQ_PERCENT>();
419419
uint32_t l_dpoFreq = l_nominalFreq;
420-
if( (l_dpoPercent != 0) && (l_dpoPercent < 100) )
420+
if( (l_dpoPercent != 0) && (l_dpoPercent > -100) )
421421
{
422-
l_dpoFreq = (l_nominalFreq*l_dpoPercent)/100;
422+
uint32_t l_multiplierPercent =
423+
static_cast<uint32_t>(100 + l_dpoPercent);
424+
l_dpoFreq = (l_nominalFreq*l_multiplierPercent)/100;
423425
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
424-
"Computed floor=%d, DPO=%d (percent=-%d)",
426+
"Computed floor=%d, DPO=%d (percent=%d)",
425427
l_floorFreq, l_dpoFreq, l_dpoPercent );
426428
l_floorFreq = std::max( l_floorFreq, l_dpoFreq );
427429
}

src/usr/targeting/common/xmltohb/attribute_types.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2657,13 +2657,13 @@
26572657
is used to explicitly raise the value of MIN_FREQ_MHZ above
26582658
what is specified by MVPD #V data. On FSP systems this
26592659
is sourced from the power_management def file.
2660-
Value must be between 0 and 100.
2660+
Value must be between 0 and -100.
26612661
A value of zero indicates no override.
26622662
</description>
26632663
<simpleType>
2664-
<uint32_t>
2664+
<int32_t>
26652665
<default>0</default>
2666-
</uint32_t>
2666+
</int32_t>
26672667
</simpleType>
26682668
<persistency>non-volatile</persistency>
26692669
<readable/>

src/usr/targeting/common/xmltohb/simics_NIMBUS.system.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
</attribute>
100100
<attribute>
101101
<id>DPO_MIN_FREQ_PERCENT</id>
102-
<default>98</default>
102+
<default>-2</default>
103103
</attribute>
104104
<attribute>
105105
<id>REQUIRED_SYNCH_MODE</id>

0 commit comments

Comments
 (0)