diff options
author | Benjamin Weisenbeck <bweisenb@us.ibm.com> | 2017-06-27 09:42:06 -0500 |
---|---|---|
committer | Zane C. Shelley <zshelle@us.ibm.com> | 2017-07-13 12:02:59 -0400 |
commit | 27f03d2f20e98a3ed866935559c7f6e11ddfd9fc (patch) | |
tree | d972423330ccba8322836a5ef1cc19ce01661e30 /src | |
parent | d80986cf024b4f392e07f93d957c164c05190836 (diff) | |
download | talos-hostboot-27f03d2f20e98a3ed866935559c7f6e11ddfd9fc.tar.gz talos-hostboot-27f03d2f20e98a3ed866935559c7f6e11ddfd9fc.zip |
PRD: Restart EC/EQ/EX trace arrays
Change-Id: Ibc05f8d3a018875e10d98a3581c54a628f7b0618
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42498
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43054
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/diag/prdf/common/plat/p9/prdfP9Ec.C | 65 | ||||
-rw-r--r-- | src/usr/diag/prdf/common/plat/p9/prdfP9Eq.C | 65 | ||||
-rw-r--r-- | src/usr/diag/prdf/common/plat/p9/prdf_plat_p9.mk | 3 | ||||
-rw-r--r-- | src/usr/diag/prdf/plat/prdfPlatServices.C | 61 | ||||
-rw-r--r-- | src/usr/diag/prdf/plat/prdfPlatServices.H | 7 | ||||
-rw-r--r-- | src/usr/diag/prdf/prdf_hb_only.mk | 4 |
6 files changed, 204 insertions, 1 deletions
diff --git a/src/usr/diag/prdf/common/plat/p9/prdfP9Ec.C b/src/usr/diag/prdf/common/plat/p9/prdfP9Ec.C new file mode 100644 index 000000000..63acbd329 --- /dev/null +++ b/src/usr/diag/prdf/common/plat/p9/prdfP9Ec.C @@ -0,0 +1,65 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/diag/prdf/common/plat/p9/prdfP9Ec.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2017 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +// Framework includes +#include <prdfPluginDef.H> +#include <iipServiceDataCollector.h> +#include <prdfExtensibleChip.H> +#include <prdfPluginMap.H> + +using namespace TARGETING; + +namespace PRDF +{ + +using namespace PlatServices; + +namespace p9_ec +{ + +/** + * @brief Plugin function called after analysis is complete but before PRD + * exits. + * @param i_chip EC chip. + * @param io_sc The step code data struct. + * @note This is especially useful for any analysis that still needs to be + * done after the framework clears the FIR bits that were at attention. + * @return SUCCESS. + */ +int32_t PostAnalysis( ExtensibleChip * i_chip, + STEP_CODE_DATA_STRUCT & io_sc ) +{ +#ifdef __HOSTBOOT_MODULE + int32_t l_rc = restartTraceArray(i_chip->GetChipHandle()); + if (SUCCESS != l_rc) + { + PRDF_ERR( "[EC PostAnalysis HUID: 0x%08x RestartTraceArray failed", + i_chip->GetId()); + } +#endif + return SUCCESS; +} PRDF_PLUGIN_DEFINE(p9_ec, PostAnalysis); + +} +} diff --git a/src/usr/diag/prdf/common/plat/p9/prdfP9Eq.C b/src/usr/diag/prdf/common/plat/p9/prdfP9Eq.C new file mode 100644 index 000000000..1fbb57256 --- /dev/null +++ b/src/usr/diag/prdf/common/plat/p9/prdfP9Eq.C @@ -0,0 +1,65 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/diag/prdf/common/plat/p9/prdfP9Eq.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2017 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +// Framework includes +#include <prdfPluginDef.H> +#include <iipServiceDataCollector.h> +#include <prdfExtensibleChip.H> +#include <prdfPluginMap.H> + +using namespace TARGETING; + +namespace PRDF +{ + +using namespace PlatServices; + +namespace p9_eq +{ + +/** + * @brief Plugin function called after analysis is complete but before PRD + * exits. + * @param i_chip EQ chip. + * @param io_sc The step code data struct. + * @note This is especially useful for any analysis that still needs to be + * done after the framework clears the FIR bits that were at attention. + * @return SUCCESS. + */ +int32_t PostAnalysis( ExtensibleChip * i_chip, + STEP_CODE_DATA_STRUCT & io_sc ) +{ +#ifdef __HOSTBOOT_MODULE + int32_t l_rc = restartTraceArray(i_chip->GetChipHandle()); + if (SUCCESS != l_rc) + { + PRDF_ERR( "[EQ PostAnalysis HUID: 0x%08x RestartTraceArray failed", + i_chip->GetId()); + } +#endif + return SUCCESS; +} PRDF_PLUGIN_DEFINE(p9_eq, PostAnalysis); + +} +} diff --git a/src/usr/diag/prdf/common/plat/p9/prdf_plat_p9.mk b/src/usr/diag/prdf/common/plat/p9/prdf_plat_p9.mk index 67a3172b5..2207017b8 100644 --- a/src/usr/diag/prdf/common/plat/p9/prdf_plat_p9.mk +++ b/src/usr/diag/prdf/common/plat/p9/prdf_plat_p9.mk @@ -51,4 +51,5 @@ prd_rule_plugin += prdfP9Pll.o prd_rule_plugin += prdfCommonPlugins.o prd_rule_plugin += prdfP9Ex.o prd_rule_plugin += prdfP9Xbus.o - +prd_rule_plugin += prdfP9Ec.o +prd_rule_plugin += prdfP9Eq.o diff --git a/src/usr/diag/prdf/plat/prdfPlatServices.C b/src/usr/diag/prdf/plat/prdfPlatServices.C index 06102c3d1..15641c525 100644 --- a/src/usr/diag/prdf/plat/prdfPlatServices.C +++ b/src/usr/diag/prdf/plat/prdfPlatServices.C @@ -50,6 +50,7 @@ #include <devicefw/userif.H> #include <iipMopRegisterAccess.h> #include <ibscomreasoncodes.H> +#include <p9_proc_gettracearray.H> using namespace TARGETING; @@ -590,6 +591,66 @@ uint32_t startTpsPhase2<TYPE_MBA>( ExtensibleChip * i_mbaChip, return SUCCESS; } +int32_t restartTraceArray(TargetHandle_t i_tgt) +{ + int32_t o_rc = SUCCESS; + errlHndl_t err = nullptr; + TYPE tgtType = getTargetType(i_tgt); + proc_gettracearray_args taArgs; + TargetHandle_t l_tgt = nullptr; + + if (TYPE_CORE == tgtType) + { + taArgs.trace_bus = PROC_TB_CORE0; + l_tgt = i_tgt; + } + else if (TYPE_EQ == tgtType) + { + taArgs.trace_bus = PROC_TB_L20; + // HWP requires an EX tgt here, all the traces within EQ/EX start/stop + // so it doesn't matter which one, just use the first + TargetHandleList lst = getConnected(i_tgt, TYPE_EX); + if (lst.size() > 0) + { + l_tgt = lst[0]; + } + else + { + PRDF_ERR( "restartTraceArray: no functional EX for EQ 0x%08x", + getHuid(i_tgt) ); + return FAIL; + } + } + else + { + PRDF_ASSERT(false); // should only call this on EC/EQ/EX + } + + taArgs.stop_pre_dump = false; + taArgs.ignore_mux_setting = true; + taArgs.collect_dump = false; + taArgs.reset_post_dump = true; + taArgs.restart_post_dump = true; //Restart all chiplet trace arrays + + fapi2::variable_buffer taData; + + fapi2::Target<PROC_GETTRACEARRAY_TARGET_TYPES> fapiTrgt (l_tgt); + FAPI_INVOKE_HWP( err, + p9_proc_gettracearray, + fapiTrgt, + taArgs, + taData); + + if(NULL != err) + { + PRDF_ERR( "[PlatServices::RestartTraceArray] HUID: 0x%08x" + "RestartTraceArray failed", getHuid(i_tgt)); + PRDF_COMMIT_ERRL( err, ERRL_ACTION_REPORT ); + o_rc = FAIL; + } + return o_rc; +} + //------------------------------------------------------------------------------ } // end namespace PlatServices diff --git a/src/usr/diag/prdf/plat/prdfPlatServices.H b/src/usr/diag/prdf/plat/prdfPlatServices.H index 00eef6888..f4522c424 100644 --- a/src/usr/diag/prdf/plat/prdfPlatServices.H +++ b/src/usr/diag/prdf/plat/prdfPlatServices.H @@ -153,6 +153,13 @@ uint32_t startTpsPhase1( ExtensibleChip * i_chip, const MemRank & i_rank ); template<TARGETING::TYPE T> uint32_t startTpsPhase2( ExtensibleChip * i_chip, const MemRank & i_rank ); +/** + * @brief Restarts Trace arrays after having stopped on error + * @param i_tgt EC/EQ target + * @return non-SUCCESS for failure, SUCCESS otherwise + */ +int32_t restartTraceArray(TARGETING::TargetHandle_t i_tgt); + } // end namespace PlatServices } // end namespace PRDF diff --git a/src/usr/diag/prdf/prdf_hb_only.mk b/src/usr/diag/prdf/prdf_hb_only.mk index 70867b1c6..e09fb664d 100644 --- a/src/usr/diag/prdf/prdf_hb_only.mk +++ b/src/usr/diag/prdf/prdf_hb_only.mk @@ -61,6 +61,7 @@ prd_incpath += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/memory/ prd_incpath += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/ prd_incpath += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/memory/utils/ prd_incpath += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/io/ +prd_incpath += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/perv/ prd_incpath += ${ROOTPATH}/src/import/chips/p9/utils/imageProcs/ prd_incpath += ${ROOTPATH}/src/import/hwpf/fapi2/include prd_incpath += ${ROOTPATH}/src/import/ @@ -148,6 +149,9 @@ CLEAN_TARGETS += ${MFG_THRES_PATH} ################################################################################ prd_vpath += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/io/ prd_obj_no_sim += p9_io_xbus_read_erepair.o +prd_vpath += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/perv/ +prd_obj_no_sim += p9_proc_gettracearray.o +prd_obj_no_sim += p9_sbe_tracearray.o ################################################################################ # The following are hardware procedure utilities that we are pulling into the |