diff options
author | Van Lee <vanlee@us.ibm.com> | 2012-10-04 00:48:23 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-10-04 14:30:41 -0500 |
commit | 83980fe5cef8d75f479c963fa4701d6aedbdfd88 (patch) | |
tree | 9a5e92c2ae4bb001b158253198ff74d24eba23ac /src/usr/hwpf/hwp/mc_config/mc_config.C | |
parent | 60bb82b0bdb0564f677a7765e1860dde19eae5e5 (diff) | |
download | blackbird-hostboot-83980fe5cef8d75f479c963fa4701d6aedbdfd88.tar.gz blackbird-hostboot-83980fe5cef8d75f479c963fa4701d6aedbdfd88.zip |
HWP: integrate mss_eff_grouping
- dynamically allocate temp space to 1024 bytes space for retrieving attribute
- mss_eff_grouping.C v1.10
- mss_eff_grouping.H v1.5
Change-Id: I7becf983aa9722f97b4fd8babc7c65fcd0175ac6
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1730
Tested-by: Jenkins Server
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp/mc_config/mc_config.C')
-rw-r--r-- | src/usr/hwpf/hwp/mc_config/mc_config.C | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/src/usr/hwpf/hwp/mc_config/mc_config.C b/src/usr/hwpf/hwp/mc_config/mc_config.C index cbba88a41..f58635ca5 100644 --- a/src/usr/hwpf/hwp/mc_config/mc_config.C +++ b/src/usr/hwpf/hwp/mc_config/mc_config.C @@ -67,6 +67,7 @@ #include "mss_volt/mss_volt.H" #include "mss_freq/mss_freq.H" #include "mss_eff_config/mss_eff_config.H" +#include "mss_eff_config/mss_eff_grouping.H" namespace MC_CONFIG { @@ -248,6 +249,73 @@ void call_mss_freq( void *io_pArgs ) task_end2( NULL ); } +errlHndl_t call_mss_eff_grouping() +{ + errlHndl_t l_err = NULL; + + TARGETING::TargetHandleList l_procsList; + getAllChips(l_procsList, TYPE_PROC); + + for ( size_t i = 0; i < l_procsList.size(); i++ ) + { + // make a local copy of the target for ease of use + const TARGETING::Target* l_cpu_target = l_procsList[i]; + + // print call to hwp and dump physical path of the target(s) + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "===== mss_eff_grouping HWP( cpu %d )", i ); + // dump physical path to targets + EntityPath l_path; + l_path = l_cpu_target->getAttr<ATTR_PHYS_PATH>(); + l_path.dump(); + + // cast OUR type of target to a FAPI type of target. + const fapi::Target l_fapi_cpu_target( + TARGET_TYPE_PROC_CHIP, + reinterpret_cast<void *> + (const_cast<TARGETING::Target*>(l_cpu_target)) ); + + TARGETING::TargetHandleList l_membufsList; + getAffinityChips(l_membufsList, l_cpu_target, TYPE_MEMBUF); + std::vector<fapi::Target> l_associated_centaurs; + + size_t j = 0; + for ( ; j < l_membufsList.size(); j++ ) + { + // cast OUR type of target to a FAPI type of target. + const fapi::Target l_fapi_centaur_target( + TARGET_TYPE_MEMBUF_CHIP, + reinterpret_cast<void *> + (const_cast<TARGETING::Target*>(l_membufsList[j])) ); + + EntityPath l_path; + l_path = l_membufsList[j]->getAttr<ATTR_PHYS_PATH>(); + l_path.dump(); + + l_associated_centaurs.push_back(l_fapi_centaur_target); + } + + FAPI_INVOKE_HWP(l_err, mss_eff_grouping, + l_fapi_cpu_target, l_associated_centaurs); + + // process return code. + if ( l_err ) + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X: mss_eff_grouping HWP( cpu %d centaur %d ) ", + l_err->reasonCode(), i, j ); + break; // break out mba loop + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : mss_eff_grouping HWP( cpu %d )", i ); + } + } // endfor + + return l_err; +} + // // Wrapper function to call 12.4 : mss_eff_config // @@ -298,6 +366,18 @@ void call_mss_eff_config( void *io_pArgs ) } } // endfor + if (!l_err) + { + l_err = call_mss_eff_grouping(); + } + + // When opt_memmap HWP is available, it will be called + // here between the two call_mss_eff_grouping() + + if (!l_err) + { + l_err = call_mss_eff_grouping(); + } TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_eff_config exit" ); |