diff options
author | Amit Tendolkar <amit.tendolkar@in.ibm.com> | 2018-02-19 11:36:55 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-03-16 13:39:06 -0400 |
commit | 18d91f4a458f0afb827be3495fda496543711a62 (patch) | |
tree | 92d25febbf8c78c9c3e87734ee94f401d93f1ae2 /src | |
parent | 4761f0cf880a057733a1d31ce0150ebbe6b129b1 (diff) | |
download | talos-hostboot-18d91f4a458f0afb827be3495fda496543711a62.tar.gz talos-hostboot-18d91f4a458f0afb827be3495fda496543711a62.zip |
Update p9_collect_ppe_state to dynamically collect PPE FFDC
1- On FSP, avoid RAMming and collect only XIRs
2- On Host: avoid side effects of having to Halt PPE for RAMming:
a Avoid Halt, if not already halted or in PMReset, collect only XIRs
b Collect max state if already halted, no side-effects
Change-Id: I7b27a02aebda0122f7dd7e36eaff869a510e5af5
CQ: SW419011
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54368
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: RANGANATHPRASAD G. BRAHMASAMUDRA <prasadbgr@in.ibm.com>
Reviewed-by: Prem Shanker Jha <premjha2@in.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54390
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
3 files changed, 60 insertions, 8 deletions
diff --git a/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_ppe_state.C b/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_ppe_state.C index de032a165..0f13a8709 100644 --- a/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_ppe_state.C +++ b/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_ppe_state.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2017 */ +/* Contributors Listed Below - COPYRIGHT 2017,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -387,7 +387,11 @@ extern "C" { FAPI_INF (">> p9_collect_ppe_state"); fapi2::ReturnCode l_rc; + bool l_limitToXIRs = false; + + fapi2::Target<fapi2::TARGET_TYPE_SYSTEM> FAPI_SYSTEM; fapi2::ATTR_INITIATED_PM_RESET_Type l_pm_reset_active; + fapi2::ATTR_EXECUTION_PLATFORM_Type l_plat = 0; fapi2::ffdc_t PPE_BASE_ADDR; fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> l_proc_chip = @@ -400,16 +404,20 @@ extern "C" PPE_DUMP_MODE l_mode = *(reinterpret_cast<const PPE_DUMP_MODE*>(i_mode.ptr())); - // if call to this HWP is in PM Reset flow then just collect XIRs. + // If call to this HWP is in PM Reset flow then just collect XIRs. // Full PPE state will be collected as a part of PM Recovery in - // later part of PM reset flow. + // later part of PM reset flow. Do not want to artifically HALT for debug FAPI_ATTR_GET(fapi2::ATTR_INITIATED_PM_RESET, l_proc_chip, l_pm_reset_active); - if( fapi2::ENUM_ATTR_INITIATED_PM_RESET_ACTIVE == l_pm_reset_active ) + // On FSP, Ramming PPE Regs is blacklisted, collect only XIRs + FAPI_ATTR_GET(fapi2::ATTR_EXECUTION_PLATFORM, FAPI_SYSTEM, l_plat); + + if ((fapi2::ENUM_ATTR_INITIATED_PM_RESET_ACTIVE == l_pm_reset_active) || + (fapi2::ENUM_ATTR_EXECUTION_PLATFORM_FSP == l_plat)) { - l_mode = XIRS; + l_limitToXIRs = true; } std::vector<PPERegValue_t> l_v_sprs; @@ -420,6 +428,47 @@ extern "C" { fapi2::ReturnCode l_rc_tmp = fapi2::current_err; uint64_t l_addr = it1; + bool l_isHalted = false; + + // Override l_mode dynamically to decide what gets collected + if (l_limitToXIRs == true) + { + // Either on a FSP or in PM Reset, avoid halting & RAMming the PPE + l_mode = XIRS; // Override #1 + } + else + { + // Neither on a FSP, not in PM Reset, read PPE Halt State and decide + l_rc = ppe_isHalted (l_proc_chip, it1, &l_isHalted); + + if (l_rc == fapi2::FAPI2_RC_SUCCESS) + { + if (l_isHalted == true) + { + // Already halted, so go ahead and get everything possible + // the l_mode here set just to steer the code to do that + l_mode = HALT; // Override #2 + } + else if (l_mode != FORCE_HALT) + { + // Not halted & User not requested to FORCE a HALT for FFDC + // Avoid halting the PPE + l_mode = XIRS; // Override #3 + } + else + { + // mode remains the user supplied FORCE_HALT, that hits the big + // hammer to try to reset the PPE bypassing completion of any + // in-flight instructions or sync or reset operations. PPE may + // need a hard reset to recover fomr a force halt. + } + } + else + { + // Unable to read PPE Halt State, avoid halting the PPE + l_mode = XIRS; // Override #4 + } + } FAPI_INF ("p9_collect_ppe_state: PPE Base Addr 0x%.16llX, 0x%.8X", it1, l_mode); diff --git a/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_ppe_state.H b/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_ppe_state.H index c0fe41b34..7e1ea1bf6 100644 --- a/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_ppe_state.H +++ b/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_ppe_state.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2017 */ +/* Contributors Listed Below - COPYRIGHT 2017,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -66,6 +66,9 @@ extern "C" /// are to be collected. See p9_ppe_defs.H /// @param[out] io_rc Return code to add FFDC data to /// @return FAPI2_RC_SUCCESS Always succeeds +/// @note i_dumpMode is used as a hint. The HWP dynamically overrides the mode +/// to use based on the execution platform (e.g. RAMming is not possible +/// on FSP), state of PPE (already halted) and other considerations fapi2::ReturnCode p9_collect_ppe_state ( const fapi2::ffdc_t& i_target, const fapi2::ffdc_t& i_mode, diff --git a/src/import/chips/p9/procedures/hwp/lib/p9_ppe_utils.C b/src/import/chips/p9/procedures/hwp/lib/p9_ppe_utils.C index 42c6d1b17..0d2faab10 100644 --- a/src/import/chips/p9/procedures/hwp/lib/p9_ppe_utils.C +++ b/src/import/chips/p9/procedures/hwp/lib/p9_ppe_utils.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2017 */ +/* Contributors Listed Below - COPYRIGHT 2016,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -674,7 +674,7 @@ fapi2::ReturnCode ppe_isHalted( l_data64 ), "Failed reading XIRAMDBG register!" ); - *o_halted = l_data64.getBit<0>(); + *o_halted = l_data64.getBit<PU_PPE_XIRAMDBG_XSR_HS>(); fapi_try_exit: return fapi2::current_err; |