diff options
author | Nick Bofferding <bofferdn@us.ibm.com> | 2014-09-03 22:59:43 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-09-08 09:47:32 -0500 |
commit | b26546f59175cb2c94c2646ab104a2257b676a34 (patch) | |
tree | 1222543eaa1509e694e8184e83826024a6301aa7 /src/usr/hwpf/hwp/mc_config | |
parent | 863f07b5d3f107bd9637912f9034b32d6a52a1f8 (diff) | |
download | talos-hostboot-b26546f59175cb2c94c2646ab104a2257b676a34.tar.gz talos-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/usr/hwpf/hwp/mc_config')
-rw-r--r-- | src/usr/hwpf/hwp/mc_config/mc_config.C | 71 |
1 files changed, 52 insertions, 19 deletions
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(); |