summaryrefslogtreecommitdiffstats
path: root/src/usr/htmgt/htmgt_cfgdata.C
diff options
context:
space:
mode:
authorChris Cain <cjcain@us.ibm.com>2017-12-12 12:51:10 -0600
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-12-15 16:15:43 -0500
commit83243d5bbb3db4a79441824d5a4b4a250554f841 (patch)
treeb0dbe40f07358899e71fb98626b1138cd2711540 /src/usr/htmgt/htmgt_cfgdata.C
parent02098ca7d9c127a77b88692f1569938679e8c105 (diff)
downloadtalos-hostboot-83243d5bbb3db4a79441824d5a4b4a250554f841.tar.gz
talos-hostboot-83243d5bbb3db4a79441824d5a4b4a250554f841.zip
HTMGT: Send power supply redundancy policy to OCC
Change-Id: If439440e0a4368e51de91818f406f152f5e232b1 CQ: SW408974 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50824 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@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> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/htmgt/htmgt_cfgdata.C')
-rw-r--r--src/usr/htmgt/htmgt_cfgdata.C24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/usr/htmgt/htmgt_cfgdata.C b/src/usr/htmgt/htmgt_cfgdata.C
index 7ac807e40..98e7a4322 100644
--- a/src/usr/htmgt/htmgt_cfgdata.C
+++ b/src/usr/htmgt/htmgt_cfgdata.C
@@ -636,10 +636,10 @@ void getOCCRoleMessageData(bool i_master, bool i_firMaster,
}
-uint16_t getMaxPowerCap(Target *i_sys)
+uint16_t getMaxPowerCap(Target *i_sys, bool & o_is_redundant)
{
uint16_t o_maxPcap = 0;
- bool useDefaultLimit = true;
+ o_is_redundant = true;
#ifdef CONFIG_BMC_IPMI
// Check if HPC limit was found
@@ -663,7 +663,7 @@ uint16_t getMaxPowerCap(Target *i_sys)
// non-redundant policy allows higher bulk power limit
// with the potential impact of OCC not being able to
// lower power fast enough
- useDefaultLimit = false;
+ o_is_redundant = false;
TMGT_INF("getMaxPowerCap: maximum power cap = %dW"
" (HPC/non-redundant PS bulk power limit)",
hpc_pcap);
@@ -685,7 +685,7 @@ uint16_t getMaxPowerCap(Target *i_sys)
// else HPC limit not found, use default
#endif
- if (useDefaultLimit)
+ if (o_is_redundant)
{
// Read the default N+1 bulk power limit (redundant PS policy)
o_maxPcap = i_sys->
@@ -732,7 +732,8 @@ void getPowerCapMessageData(uint8_t* o_data, uint64_t & o_size)
index += 2;
// System Maximum Power Cap
- const uint16_t max_pcap = getMaxPowerCap(sys);
+ bool is_redundant;
+ const uint16_t max_pcap = getMaxPowerCap(sys, is_redundant);
UINT16_PUT(&o_data[index], max_pcap);
index += 2;
@@ -791,9 +792,20 @@ void getSystemConfigMessageData(const TargetHandle_t i_occ, uint8_t* o_data,
//0=OCC report throttling when max frequency lowered below turbo
G_system_type &= ~OCC_REPORT_THROTTLE_BELOW_NOMINAL;
}
+ bool is_redundant;
+ getMaxPowerCap(sys, is_redundant);
+ if (is_redundant == false)
+ {
+ // Power supply policy is non-redundant
+ G_system_type |= OCC_CFGDATA_NON_REDUNDANT_PS;
+ }
+ else
+ {
+ // Power supply policy is redundant
+ G_system_type &= ~OCC_CFGDATA_NON_REDUNDANT_PS;
+ }
o_data[index++] = G_system_type;
-
//processor Callout Sensor ID
ConstTargetHandle_t proc = getParentChip(i_occ);
SensorID1 = UTIL::getSensorNumber(proc, SENSOR_NAME_PROC_STATE);
OpenPOWER on IntegriCloud