diff options
author | Bill Schwartz <whs@us.ibm.com> | 2014-06-25 15:38:59 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-08-01 14:02:05 -0500 |
commit | 96ca27951c620213afdb1bfe96f996fbeaf8a74b (patch) | |
tree | e931f866ea19bb16450138a5cf5840643f22330c /src/usr/hwpf/hwp/core_activate/core_activate.C | |
parent | 8ff9f5eb2e284d4f55534862442fb5a2584da121 (diff) | |
download | talos-hostboot-96ca27951c620213afdb1bfe96f996fbeaf8a74b.tar.gz talos-hostboot-96ca27951c620213afdb1bfe96f996fbeaf8a74b.zip |
Power off hot plug controller to avoid downstream MEX issues
Add wrapper to call new HWP to power on off hot plug controller.
Change-Id: Ie5cb73466675d7baed26501475099a04f660bc09
CQ: SW266826
RTC: 109989
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/11816
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp/core_activate/core_activate.C')
-rw-r--r-- | src/usr/hwpf/hwp/core_activate/core_activate.C | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/usr/hwpf/hwp/core_activate/core_activate.C b/src/usr/hwpf/hwp/core_activate/core_activate.C index 05575ac57..e4bc7dff7 100644 --- a/src/usr/hwpf/hwp/core_activate/core_activate.C +++ b/src/usr/hwpf/hwp/core_activate/core_activate.C @@ -37,6 +37,7 @@ /******************************************************************************/ #include <stdint.h> #include <errno.h> +#include <config.h> #include <trace/interface.H> #include <initservice/taskargs.H> @@ -77,6 +78,7 @@ #include "proc_check_slw_done.H" #include "p8_block_wakeup_intr.H" #include "p8_cpu_special_wakeup.H" +#include "proc_pcie_slot_power.H" // mss_scrub support #include <diag/prdf/prdfMain.H> @@ -781,6 +783,66 @@ void* call_host_ipl_complete( void *io_pArgs ) } // endfor +#ifdef CONFIG_PCIE_HOTPLUG_CONTROLLER + // Loop through all the procs in the system + // and run proc_pcie_slot_power to power on the hot plug controller + // for Sapphire systems. PowerVM will turn on the hot plug + // controller. + if (is_sapphire_load()) + { + + // get a list of all the procs in the system + TARGETING::Target* l_pMasterProcTarget = NULL; + TARGETING::targetService(). + masterProcChipTargetHandle(l_pMasterProcTarget); + TARGETING::TargetHandleList l_procTargetList; + getAllChips(l_procTargetList, TYPE_PROC); + + for (TargetHandleList::const_iterator + l_proc_iter = l_procTargetList.begin(); + l_proc_iter != l_procTargetList.end(); + ++l_proc_iter) + { + // make a local copy of the Processor target + TARGETING::Target* l_pProcTarget = *l_proc_iter; + + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X", + TARGETING::get_huid(l_pProcTarget)); + + fapi::Target l_fapiProcTarget( fapi::TARGET_TYPE_PROC_CHIP, + l_pProcTarget ); + + // Invoke the HWP + FAPI_INVOKE_HWP(l_err, + proc_pcie_slot_power, + l_fapiProcTarget, + true ); // turn on + if (l_err) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : proc_pcie_hotplug_control", + " failed, returning errorlog" ); + + // capture the target data in the elog + ErrlUserDetailsTarget(l_pProcTarget).addToLog( l_err ); + + // informational. Don't add to istep error or return error + l_err->setSev(ERRORLOG::ERRL_SEV_INFORMATIONAL); + + // Commit error log + errlCommit( l_err, HWPF_COMP_ID ); + } + else + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : proc_pcie_hotplug_control", + " completed ok"); + } + } // endfor + } +#endif + // Sync attributes to Fsp l_err = syncAllAttributesToFsp(); |