summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNick Bofferding <bofferdn@us.ibm.com>2014-09-03 22:59:43 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-09-08 09:47:32 -0500
commitb26546f59175cb2c94c2646ab104a2257b676a34 (patch)
tree1222543eaa1509e694e8184e83826024a6301aa7 /src
parent863f07b5d3f107bd9637912f9034b32d6a52a1f8 (diff)
downloadblackbird-hostboot-b26546f59175cb2c94c2646ab104a2257b676a34.tar.gz
blackbird-hostboot-b26546f59175cb2c94c2646ab104a2257b676a34.zip
Inhibit programming VDDR + VPP domains if no configured membufs
- Updated mc_init to inhibit calling VDDR + VPP offset HWPs as needed - Updated vddr enable to discard domains with no voltage from VID list Change-Id: I38d57c206135741f088cfb1930400f61bbb13455 Backport: release-fips820 CQ: SW276412 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13131 Tested-by: Jenkins Server Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/usr/hwpf/hwp/dram_training/hbVddrMsg.C21
-rw-r--r--src/usr/hwpf/hwp/mc_config/mc_config.C71
2 files changed, 73 insertions, 19 deletions
diff --git a/src/usr/hwpf/hwp/dram_training/hbVddrMsg.C b/src/usr/hwpf/hwp/dram_training/hbVddrMsg.C
index f585de1a2..37fa394f6 100644
--- a/src/usr/hwpf/hwp/dram_training/hbVddrMsg.C
+++ b/src/usr/hwpf/hwp/dram_training/hbVddrMsg.C
@@ -103,6 +103,16 @@ bool areVidsEqual(
== static_cast<uint16_t>(i_rhs.domainId)) );
}
+///////////////////////////////////////////////////////////////////////////////
+// isUnusedVoltageDomain
+///////////////////////////////////////////////////////////////////////////////
+
+bool isUnusedVoltageDomain(
+ HBVddrMsg::hwsvPowrMemVoltDomainRequest_t i_vid)
+{
+ return (!i_vid.voltageMillivolts);
+}
+
//******************************************************************************
// addMemoryVoltageDomains (templated)
//******************************************************************************
@@ -294,6 +304,17 @@ void HBVddrMsg::createVddrData(
io_request.erase(pInvalidEntries,io_request.end());
}
+ if( (i_requestType == HB_VDDR_ENABLE)
+ && (!membufTargetList.empty()) )
+ {
+ // Inhibit sending any request to turn on a domain with no voltage.
+ // When disabling we don't need to do this because the voltage is
+ // ignored.
+ io_request.erase(
+ std::remove_if(io_request.begin(), io_request.end(),
+ isUnusedVoltageDomain),io_request.end());
+ }
+
} while(0);
TRACFCOMP( g_trac_volt, EXIT_MRK "HBVddrMsg::createVddrData" );
diff --git a/src/usr/hwpf/hwp/mc_config/mc_config.C b/src/usr/hwpf/hwp/mc_config/mc_config.C
index e5e80d62b..80c03f475 100644
--- a/src/usr/hwpf/hwp/mc_config/mc_config.C
+++ b/src/usr/hwpf/hwp/mc_config/mc_config.C
@@ -372,19 +372,20 @@ errlHndl_t setMemoryVoltageDomainOffsetVoltage()
TARGETING::ATTRIBUTE_ID domain;
pOffsetFn_t fn;
const char* fnName;
+ bool callIfAllNonFunc;
} fnMap[] = {
{TARGETING::ATTR_AVDD_ID,
- mss_volt_avdd_offset,"mss_volt_avdd_offset"},
+ mss_volt_avdd_offset,"mss_volt_avdd_offset", true},
{TARGETING::ATTR_VDD_ID ,
- mss_volt_vdd_offset ,"mss_volt_vdd_offset"},
+ mss_volt_vdd_offset ,"mss_volt_vdd_offset", true},
{TARGETING::ATTR_VCS_ID ,
- mss_volt_vcs_offset ,"mss_volt_vcs_offset"},
+ mss_volt_vcs_offset ,"mss_volt_vcs_offset", true},
{TARGETING::ATTR_VMEM_ID,
- mss_volt_vddr_offset,"mss_volt_vddr_offset"},
+ mss_volt_vddr_offset,"mss_volt_vddr_offset", false},
{TARGETING::ATTR_VPP_ID ,
- mss_volt_vpp_offset ,"mss_volt_vpp_offset"}
+ mss_volt_vpp_offset ,"mss_volt_vpp_offset", false}
};
size_t recordIndex = 0;
@@ -459,27 +460,59 @@ errlHndl_t setMemoryVoltageDomainOffsetVoltage()
|| (last))
&& (!membufFapiTargetsList.empty()) )
{
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "INFO invoking %s on domain type 0x%08X, ID 0x%08X",
- fnMap[recordIndex].fnName,
- VOLTAGE_DOMAIN_ID_ATTR, lastDomainId);
-
- FAPI_INVOKE_HWP(
- pError,
- fnMap[recordIndex].fn,
- membufFapiTargetsList);
+ // Skip HWP if this domain has all deconfigured membufs and the
+ // domain rule specifies not running the HWP for that case
+ bool invokeHwp = true;
+ if(fnMap[recordIndex].callIfAllNonFunc == false)
+ {
+ invokeHwp = false;
+ TARGETING::PredicateIsFunctional funcPred;
+ std::vector<fapi::Target>::const_iterator pFapiTarget =
+ membufFapiTargetsList.begin();
+ for(;pFapiTarget != membufFapiTargetsList.end();++pFapiTarget)
+ {
+ if(funcPred(
+ reinterpret_cast<const TARGETING::Target*>(
+ pFapiTarget->get())))
+ {
+ invokeHwp = true;
+ break;
+ }
+ }
+ }
- if (pError)
+ if(invokeHwp)
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR 0x%.8X: %s",
- pError->reasonCode(),fnMap[recordIndex].fnName);
- break;
+ "INFO invoking %s on domain type 0x%08X, ID 0x%08X",
+ fnMap[recordIndex].fnName,
+ VOLTAGE_DOMAIN_ID_ATTR, lastDomainId);
+
+ FAPI_INVOKE_HWP(
+ pError,
+ fnMap[recordIndex].fn,
+ membufFapiTargetsList);
+
+ if (pError)
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR 0x%.8X: %s",
+ pError->reasonCode(),fnMap[recordIndex].fnName);
+ break;
+ }
+ else
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "SUCCESS : %s",fnMap[recordIndex].fnName );
+ }
}
else
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : %s",fnMap[recordIndex].fnName );
+ "INFO not invoking %s on domain type 0x%08X, ID 0x%08X "
+ "since domain has no functional memory buffers.",
+ fnMap[recordIndex].fnName,
+ VOLTAGE_DOMAIN_ID_ATTR, lastDomainId);
}
membufFapiTargetsList.clear();
OpenPOWER on IntegriCloud