summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/hwas/common/deconfigGard.H8
-rw-r--r--src/include/usr/targeting/common/utilFilter.H4
-rw-r--r--src/usr/diag/prdf/plat/p9/prdfP9PmRecovery.C7
-rw-r--r--src/usr/errl/runtime/makefile2
-rw-r--r--src/usr/hwas/common/deconfigGard.C17
-rw-r--r--src/usr/hwas/common/hwas.C9
-rw-r--r--src/usr/hwas/hwasPlatDeconfigGard.C123
-rw-r--r--src/usr/hwas/makefile9
-rw-r--r--src/usr/hwas/test/hwas1test.H6
-rw-r--r--src/usr/isteps/pm/pm_common.C75
-rw-r--r--src/usr/targeting/common/utilFilter.C6
-rwxr-xr-xsrc/usr/targeting/common/xmltohb/attribute_types_hb.xml34
-rw-r--r--src/usr/targeting/common/xmltohb/target_types_hb.xml3
-rwxr-xr-xsrc/usr/targeting/targetservicestart.C3
14 files changed, 228 insertions, 78 deletions
diff --git a/src/include/usr/hwas/common/deconfigGard.H b/src/include/usr/hwas/common/deconfigGard.H
index 4ff7d0a83..fe1d20b0a 100644
--- a/src/include/usr/hwas/common/deconfigGard.H
+++ b/src/include/usr/hwas/common/deconfigGard.H
@@ -488,7 +488,7 @@ public:
*
* NOTE: Currently only core targets are supported
*
- * @param[in] i_pTarget const pointer to the core target to deconfigure
+ * @param[in] i_pTarget pointer to the target to deconfigure
* @param[in] i_deconfigureAction Deconfigure options -
* FULLY_AT_RUNTIME
* @param[in] i_deconfigErrl - error log assocated with this deconfig
@@ -500,7 +500,7 @@ public:
* @return errlHndl_t. Error log handle.
*/
errlHndl_t deconfigureTargetAtRuntime(
- TARGETING::ConstTargetHandle_t const i_pTarget,
+ TARGETING::TargetHandle_t i_pTarget,
const DeconfigureFlags i_deconfigureAction,
const errlHndl_t i_deconfigErrl);
@@ -515,7 +515,7 @@ public:
* child targets. Any errors deconfiguring targets are committed and
* the function continues. The only errors returned are usage errors.
*
- * @param[in] i_pTarget const pointer to Target to deconfigure.
+ * @param[in] i_pTarget pointer to Target to deconfigure.
* @param[in] i_deconfigureAction Deconfigure options -
* FULLY_AT_RUNTIME
* @param[in] i_deconfigErrl - error log assocated with this deconfig
@@ -529,7 +529,7 @@ public:
#ifdef __HOSTBOOT_RUNTIME
errlHndl_t platDeconfigureTargetAtRuntime(
- TARGETING::ConstTargetHandle_t const i_pTarget,
+ TARGETING::TargetHandle_t i_pTarget,
const DeconfigureFlags i_deconfigureAction,
const errlHndl_t i_deconfigErrl);
#endif
diff --git a/src/include/usr/targeting/common/utilFilter.H b/src/include/usr/targeting/common/utilFilter.H
index 4771edace..880b4869d 100644
--- a/src/include/usr/targeting/common/utilFilter.H
+++ b/src/include/usr/targeting/common/utilFilter.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2016 */
+/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -300,7 +300,7 @@ const Target * getParentChip( const Target * i_pChiplet );
*
* @return Parent target pointer or NULL if error
*/
-const Target * getParent( const Target * i_unit , TARGETING::TYPE &i_pType);
+Target * getParent( const Target * i_unit , TARGETING::TYPE &i_pType);
/**
* @brief return the EX target of the specified input core chiplet
diff --git a/src/usr/diag/prdf/plat/p9/prdfP9PmRecovery.C b/src/usr/diag/prdf/plat/p9/prdfP9PmRecovery.C
index afc8442ff..6e7caf75b 100644
--- a/src/usr/diag/prdf/plat/p9/prdfP9PmRecovery.C
+++ b/src/usr/diag/prdf/plat/p9/prdfP9PmRecovery.C
@@ -67,7 +67,6 @@ int32_t pmRecovery( ExtensibleChip * i_chip, STEP_CODE_DATA_STRUCT & io_sc )
// Get the Global Errorlog PLID and EID
errlHndl_t globalErrl =
ServiceGeneratorClass::ThisServiceGenerator().getErrl();
- uint32_t eid = globalErrl->eid();
uint32_t plid = globalErrl->plid();
// Runtime deconfig lost cores
@@ -86,8 +85,10 @@ int32_t pmRecovery( ExtensibleChip * i_chip, STEP_CODE_DATA_STRUCT & io_sc )
// Call Deconfig
errlHndl_t errl = nullptr;
- errl = HWAS::theDeconfigGard().deconfigureTarget( *coreTgt, eid,
- NULL, HWAS::DeconfigGard::FULLY_AT_RUNTIME );
+ errl = HWAS::theDeconfigGard().deconfigureTargetAtRuntime(
+ coreTgt,
+ HWAS::DeconfigGard::FULLY_AT_RUNTIME,
+ globalErrl );
if (errl)
{
diff --git a/src/usr/errl/runtime/makefile b/src/usr/errl/runtime/makefile
index 4c6f20262..65f3aa17d 100644
--- a/src/usr/errl/runtime/makefile
+++ b/src/usr/errl/runtime/makefile
@@ -37,6 +37,8 @@ EXTRAINCDIR += ${ROOTPATH}/src/import/chips/common/utils/imageProcs
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/ffdc
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/common/include
+## support for pm_common
+EXTRAINCDIR += ${ROOTPATH}/src/usr/isteps
# need find the source for this hwp in runtime env
VPATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/pm
diff --git a/src/usr/hwas/common/deconfigGard.C b/src/usr/hwas/common/deconfigGard.C
index 75554cf9b..f844ec912 100644
--- a/src/usr/hwas/common/deconfigGard.C
+++ b/src/usr/hwas/common/deconfigGard.C
@@ -1640,8 +1640,14 @@ void DeconfigGard::_deconfigureByAssoc(
_deconfigureByAssoc(*pChild, i_errlEid, i_deconfigRule);
} // for CHILD
- if ((i_deconfigRule == NOT_AT_RUNTIME)||
- (i_deconfigRule == SPEC_DECONFIG))
+ // Retrieve the target type from the given target
+ TYPE l_targetType = i_target.getAttr<ATTR_TYPE>();
+
+ if ((i_deconfigRule == NOT_AT_RUNTIME) ||
+ (i_deconfigRule == SPEC_DECONFIG) ||
+ (l_targetType == TYPE_EQ) ||
+ (l_targetType == TYPE_EX) ||
+ (l_targetType == TYPE_CORE))
{
// if the rule is NOT_AT_RUNTIME and we got here, then we are
// not at runtime.
@@ -1649,6 +1655,9 @@ void DeconfigGard::_deconfigureByAssoc(
// reason is, we're not really deconfigureing anything, we're just
// marking them as non-functional. we only want to do that for the
// desired target and it's CHILD
+ // Except for target EQ, EX, CORE. Deconfigure these regardless of the
+ // runtime status
+
// find all CHILD_BY_AFFINITY targets and deconfigure them
targetService().getAssociated(pChildList, &i_target,
@@ -1673,7 +1682,7 @@ void DeconfigGard::_deconfigureByAssoc(
// chip (TYPE_EQ, TYPE_EX, TYPE_CORE)
// deconfigureByAssociation rules
- switch (i_target.getAttr<ATTR_TYPE>())
+ switch (l_targetType)
{
case TYPE_CORE:
{
@@ -3069,7 +3078,7 @@ bool DeconfigGard::anyChildFCO (Target & i_parent)
// deconfigureTargetAtRuntime
/******************************************************************************/
errlHndl_t DeconfigGard::deconfigureTargetAtRuntime(
- TARGETING::ConstTargetHandle_t const i_pTarget,
+ TARGETING::TargetHandle_t i_pTarget,
const DeconfigGard::DeconfigureFlags i_deconfigureAction,
const errlHndl_t i_deconfigErrl)
diff --git a/src/usr/hwas/common/hwas.C b/src/usr/hwas/common/hwas.C
index 1333be066..0f5a20f1d 100644
--- a/src/usr/hwas/common/hwas.C
+++ b/src/usr/hwas/common/hwas.C
@@ -1500,8 +1500,7 @@ bool isDescFunctional(const TARGETING::TargetHandle_t &i_desc,
if (i_desc->getAttr<ATTR_TYPE>() == TYPE_OBUS_BRICK)
{
auto obusType = TARGETING::TYPE_OBUS;
- TARGETING::Target* l_obus_ptr = const_cast<TARGETING::Target*>(
- getParent(i_desc, obusType));
+ TARGETING::Target* l_obus_ptr = getParent(i_desc, obusType);
//If NPU is bad and OBUS is non-SMP, then mark them bad
// Bit does not matter unless not in SMP mode
@@ -1590,8 +1589,7 @@ void forceEcExEqDeconfig(const TARGETING::TargetHandle_t i_core,
auto exType = TARGETING::TYPE_EX;
auto eqType = TARGETING::TYPE_EQ;
- TARGETING::Target* l_ex = const_cast<TARGETING::Target*>(
- getParent(i_core, exType));
+ TARGETING::Target* l_ex = getParent(i_core, exType);
getChildChiplets(pECList, l_ex, TYPE_CORE, true);
if(pECList.size() == 0)
{
@@ -1600,8 +1598,7 @@ void forceEcExEqDeconfig(const TARGETING::TargetHandle_t i_core,
l_ex->getAttr<ATTR_HUID>(), i_present ? "" : "NOT ");
//Now get the parent EQ and check to see if it should be deconfigured
- TARGETING::Target* l_eq = const_cast<TARGETING::Target*>(
- getParent(l_ex, eqType));
+ TARGETING::Target* l_eq = getParent(l_ex, eqType);
getChildChiplets(pEXList, l_eq, TYPE_EX, true);
if(pEXList.size() == 0)
{
diff --git a/src/usr/hwas/hwasPlatDeconfigGard.C b/src/usr/hwas/hwasPlatDeconfigGard.C
index 2201583f6..0bdbb4c24 100644
--- a/src/usr/hwas/hwasPlatDeconfigGard.C
+++ b/src/usr/hwas/hwasPlatDeconfigGard.C
@@ -46,6 +46,7 @@
#include <initservice/initserviceif.H>
#include <pnor/pnorif.H>
+#include <pm/pm_common.H> // HBPM::resetPMComplex
#ifdef __HOSTBOOT_RUNTIME
#include <runtime/interface.h> // g_hostInterfaces
@@ -733,7 +734,7 @@ errlHndl_t hwasError(const uint8_t i_sev,
// platDeconfigureTargetAtRuntime
/******************************************************************************/
errlHndl_t DeconfigGard::platDeconfigureTargetAtRuntime(
- TARGETING::ConstTargetHandle_t const i_pTarget,
+ TARGETING::TargetHandle_t i_pTarget,
const DeconfigureFlags i_deconfigureAction,
const errlHndl_t i_deconfigErrl)
{
@@ -762,16 +763,23 @@ errlHndl_t DeconfigGard::platDeconfigureTargetAtRuntime(
break;
}
- if(i_pTarget->getAttr<TARGETING::ATTR_TYPE>() !=
- TARGETING::TYPE_CORE)
+ // Retrieve the target type from the given target
+ TYPE l_targetType = i_pTarget->getAttr<ATTR_TYPE>();
+
+ // Make sure we are only working with the following types
+ if( (l_targetType != TYPE_EQ) &&
+ (l_targetType != TYPE_EX) &&
+ (l_targetType != TYPE_CORE) )
{
+ HWAS_ERR("Caller passed invalid type: 0x%08X", l_targetType);
+
// only supporting cores
/*@
* @errortype
* @moduleid MOD_RUNTIME_DECONFIG
* @reasoncode RC_INVALID_TARGET
- * @devdesc Target is not a TYPE_CORE
- * userdata1 target huid
+ * @devdesc Target is neiter TYPE_EQ, TYPE_EX nor TYPE_CORE
+ * @userdata1 target huid
* @custdesc Host Firmware encountered an internal
* error
*/
@@ -786,7 +794,7 @@ errlHndl_t DeconfigGard::platDeconfigureTargetAtRuntime(
{
case DeconfigGard::FULLY_AT_RUNTIME:
- HWAS_INF(" Deconfig action FULLY_AT_RUNTIME :0x%08X",
+ HWAS_INF("Deconfig action FULLY_AT_RUNTIME :0x%08X",
DeconfigGard::FULLY_AT_RUNTIME);
break;
@@ -813,10 +821,12 @@ errlHndl_t DeconfigGard::platDeconfigureTargetAtRuntime(
break;
}
- }while(0);
+ // If an error then exit while loop
+ if (l_errl)
+ {
+ break;
+ }
- if(l_errl == nullptr)
- {
uint32_t l_deconfigReason = (i_deconfigErrl) ? i_deconfigErrl->eid() :
DeconfigGard::DECONFIGURED_BY_PRD;
@@ -826,7 +836,6 @@ errlHndl_t DeconfigGard::platDeconfigureTargetAtRuntime(
get_huid(i_pTarget),i_deconfigureAction,
l_deconfigReason);
-
bool l_isTargetDeconfigured = false;
// deconfigureTarget() checks for targets that can be deconfigured at
// runtime
@@ -836,38 +845,90 @@ errlHndl_t DeconfigGard::platDeconfigureTargetAtRuntime(
&l_isTargetDeconfigured,
i_deconfigureAction);
- if(l_errl == nullptr && l_isTargetDeconfigured)
+ // If there was an error OR the target was not deconfigured, then
+ // do not continue and exit
+ if (l_errl || !l_isTargetDeconfigured)
{
- HWAS_INF("platDeconfigureTargetAtRuntime() - "
- "deconfigure successful");
+ HWAS_INF("platDeconfigureTargetAtRuntime() - deconfigure failed");
+ break;
+ }
+
+ HWAS_INF("platDeconfigureTargetAtRuntime() - "
+ "deconfigure successful");
- TARGETING::TYPE l_type = TARGETING::TYPE_PROC;
- const TARGETING::Target * l_parent =
- TARGETING::getParent(i_pTarget,l_type);
- // get the parent proc and call the hwp to alert
- // pm not to attempt to manage this core anymore
- const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
- l_proc(const_cast<TARGETING::Target *>(l_parent));
+ TARGETING::TYPE l_type = TARGETING::TYPE_PROC;
+ TARGETING::Target * l_parent =
+ TARGETING::getParent(i_pTarget,l_type);
- HWAS_INF("platDeconfigureTargetAtRuntime() - "
- "calling p9_update_ec_eq_state");
- FAPI_INVOKE_HWP( l_errl,p9_update_ec_eq_state,l_proc);
+ // There might be a recursion possible with PRD and PM Reset so
+ // don't call into reset twice
+ auto l_pmResetInProgress =
+ l_parent->getAttr<ATTR_HB_INITIATED_PM_RESET>();
+ if( HB_INITIATED_PM_RESET_IN_PROGRESS != l_pmResetInProgress )
+ {
+ // set ATTR_HB_INITIATED_PM_RESET to IN_PROGRESS to allow
+ // special handling for PRD
+ l_parent->setAttr<ATTR_HB_INITIATED_PM_RESET>
+ (HB_INITIATED_PM_RESET_IN_PROGRESS);
+
+ HWAS_INF("platDeconfigureTargetAtRuntime() - Calling resetPMComplex");
+ l_errl = HBPM::resetPMComplex(l_parent);
if(l_errl)
{
- HWAS_ERR("platDeconfigureTargetAtRuntime() - "
- "call to p9_update_ec_eq_state() failed on proc "
- "with HUID : %d",TARGETING::get_huid(l_proc));
- ERRORLOG::ErrlUserDetailsTarget(l_proc).addToLog(l_errl);
- }
+ HWAS_ERR("Failed call to HBPM::resetPMComplex on target "
+ "with HUID : %d",TARGETING::get_huid(l_parent));
+ ERRORLOG::ErrlUserDetailsTarget(l_parent).addToLog(l_errl);
+
+ // set ATTR_HB_INITIATED_PM_RESET back to INACTIVE to allow
+ // future recoveries to completely run
+ l_parent->setAttr<ATTR_HB_INITIATED_PM_RESET>
+ (HB_INITIATED_PM_RESET_INACTIVE);
+ // If an error then exit while loop
+ break;
+ }
+ else
+ {
+ HWAS_INF("Successful call to HBPM::resetPMComplex on target"
+ " with HUID : %.8X, setting ATTR_HB_INITIATED_PM_RESET to"
+ " COMPLETE(%d)",
+ TARGETING::get_huid(l_parent),
+ HB_INITIATED_PM_RESET_COMPLETE);
+ // set ATTR_HB_INITIATED_PM_RESET to ACTIVE (reset IS in progress)
+ // and continue
+ l_parent->setAttr<ATTR_HB_INITIATED_PM_RESET>
+ (HB_INITIATED_PM_RESET_COMPLETE);
+ }
}
else
{
- HWAS_INF("platDeconfigureTargetAtRuntime() - deconfigure failed");
+ HWAS_INF("platDeconfigureTargetAtRuntime() - skippign call to resetPMComplex - ATTR_HB_INITIATED_PM_RESET=%d", l_pmResetInProgress );
}
- }
- HWAS_INF(">>>platDeconfigureTargetAtRuntime()" );
+
+ // get the parent proc and call the hwp to alert
+ // pm not to attempt to manage this core anymore
+ const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
+ l_proc(l_parent);
+
+ HWAS_INF("platDeconfigureTargetAtRuntime() - "
+ "calling p9_update_ec_eq_state");
+ FAPI_INVOKE_HWP( l_errl,p9_update_ec_eq_state,
+ l_proc,true/*skip qssr*/);
+
+ if(l_errl)
+ {
+ HWAS_ERR("platDeconfigureTargetAtRuntime() - "
+ "call to p9_update_ec_eq_state() failed on proc "
+ "with HUID : %d",TARGETING::get_huid(l_proc));
+ ERRORLOG::ErrlUserDetailsTarget(l_proc).addToLog(l_errl);
+
+ // If an error then exit while loop
+ break;
+ }
+ }while(0);
+
+ HWAS_INF("<<<platDeconfigureTargetAtRuntime()" );
return l_errl ;
}
diff --git a/src/usr/hwas/makefile b/src/usr/hwas/makefile
index ed768478d..aaa1bad4b 100644
--- a/src/usr/hwas/makefile
+++ b/src/usr/hwas/makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2011,2016
+# Contributors Listed Below - COPYRIGHT 2011,2018
# [+] International Business Machines Corp.
#
#
@@ -31,6 +31,13 @@ EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwas/common
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/ecmddatabuffer
EXTRAINCDIR += ${ROOTPATH}/src/usr/sbe
+## support for pm_common
+EXTRAINCDIR += ${ROOTPATH}/src/usr/isteps
+EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include/
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/
+EXTRAINCDIR += ${ROOTPATH}/src/import/chips/common/utils/imageProcs/
+EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/ffdc
+
VPATH += ${ROOTPATH}/src/usr/hwas/plat
VPATH += ${ROOTPATH}/src/usr/hwas/common
diff --git a/src/usr/hwas/test/hwas1test.H b/src/usr/hwas/test/hwas1test.H
index b11dcfad3..fa9cbb3ab 100644
--- a/src/usr/hwas/test/hwas1test.H
+++ b/src/usr/hwas/test/hwas1test.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2017 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -1660,9 +1660,7 @@ public:
// get parent OBUS and check OPTICS_CONFIG_MODE
auto obusType = TARGETING::TYPE_OBUS;
- TARGETING::Target* l_obus_ptr =
- const_cast<TARGETING::Target*>(
- getParent(pDesc, obusType));
+ TARGETING::Target* l_obus_ptr = getParent(pDesc, obusType);
ATTR_OPTICS_CONFIG_MODE_type config_mode =
l_obus_ptr->getAttr<ATTR_OPTICS_CONFIG_MODE>();
diff --git a/src/usr/isteps/pm/pm_common.C b/src/usr/isteps/pm/pm_common.C
index dce924590..05613a654 100644
--- a/src/usr/isteps/pm/pm_common.C
+++ b/src/usr/isteps/pm/pm_common.C
@@ -890,14 +890,16 @@ namespace HBPM
errlHndl_t resetPMComplex(TARGETING::Target * i_target)
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- ENTER_MRK"resetPMComplex");
+ ENTER_MRK" resetPMComplex");
errlHndl_t l_errl = nullptr;
//Get homer image buffer
uint64_t l_homerPhysAddr = 0x0;
- l_homerPhysAddr = i_target->getAttr<TARGETING::ATTR_HOMER_PHYS_ADDR>();
- void* l_homerVAddr = convertHomerPhysToVirt(i_target,l_homerPhysAddr);
+ l_homerPhysAddr =
+ i_target->getAttr<TARGETING::ATTR_HOMER_PHYS_ADDR>();
+ void* l_homerVAddr =
+ convertHomerPhysToVirt(i_target,l_homerPhysAddr);
// cast OUR type of target to a FAPI type of target.
// figure out homer offsets
@@ -906,6 +908,25 @@ namespace HBPM
do
{
+ // If this target was already reset previously by the runtime
+ // deconfig logic, then skip it.
+ // ATTR_HB_INITIATED_PM_RESET set to COMPLETE signifies that this
+ // chip has already been reset
+ ATTR_HB_INITIATED_PM_RESET_type l_chipResetState =
+ i_target->getAttr<TARGETING::ATTR_HB_INITIATED_PM_RESET>();
+ if (HB_INITIATED_PM_RESET_COMPLETE == l_chipResetState)
+ {
+ // set ATTR_HB_INITIATED_PM_RESET to INACTIVE (reset the reset)
+ i_target->setAttr<ATTR_HB_INITIATED_PM_RESET>
+ (HB_INITIATED_PM_RESET_INACTIVE);
+
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ INFO_MRK"resetPMComplex: reset skipped target huid=0x%X",
+ get_huid(i_target) );
+
+ break;
+ }
+
// Reset path
// p9_pm_init.C enum: PM_RESET
FAPI_INVOKE_HWP( l_errl,
@@ -925,6 +946,34 @@ namespace HBPM
break;
}
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "resetPMComplex: p9_pm_init(PM_RESET) succeeded "
+ "HUID=0x%08X", get_huid(i_target) );
+
+ // Explicitly call ATTN before exiting to ensure PRD handles
+ // LFIR before TMGT triggers PM Complex Init, but only if
+ // we aren't already in the middle of handling a core checkstop
+ if( HB_INITIATED_PM_RESET_IN_PROGRESS != l_chipResetState )
+ {
+ // set ATTR_HB_INITIATED_PM_RESET to IN_PROGRESS to avoid recursion
+ i_target->setAttr<ATTR_HB_INITIATED_PM_RESET>
+ (HB_INITIATED_PM_RESET_IN_PROGRESS);
+
+ l_errl = Singleton<ATTN::Service>::instance().
+ handleAttentions( i_target );
+
+ // set ATTR_HB_INITIATED_PM_RESET back to the original value
+ i_target->setAttr<ATTR_HB_INITIATED_PM_RESET>
+ (l_chipResetState);
+
+ if(l_errl)
+ {
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ ERR_MRK"resetPmComplex: service::handleAttentions "
+ "returned error for RtProc: 0x%08X", get_huid(i_target));
+ break;
+ }
+ }
} while(0);
if ((TARGETING::is_phyp_load()) && (nullptr != l_homerVAddr))
@@ -932,30 +981,16 @@ namespace HBPM
int lRc = HBPM_UNMAP(l_homerVAddr);
uint64_t lZeroAddr = 0;
i_target->setAttr<ATTR_HOMER_VIRT_ADDR>(
- reinterpret_cast<uint64_t>(lZeroAddr));
+ reinterpret_cast<uint64_t>(lZeroAddr));
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"resetPMComplex:" "unmap, RC=0x%X" ,
lRc );
}
-
- if (!l_errl)
- {
- // Explicitly call ATTN before exiting to ensure PRD handles
- // LFIR before TMGT triggers PM Complex Init
- l_errl = Singleton<ATTN::Service>::instance().
- handleAttentions( i_target );
- if(l_errl)
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- ERR_MRK"resetPmComplex: service::handleAttentions "
- "returned error for RtProc: 0x%08X", get_huid(i_target));
- }
-
- }
-
+
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
EXIT_MRK"resetPMComplex: RC=0x%X, PLID=0x%lX",
ERRL_GETRC_SAFE(l_errl), ERRL_GETPLID_SAFE(l_errl) );
+
return l_errl;
} // resetPMComplex
diff --git a/src/usr/targeting/common/utilFilter.C b/src/usr/targeting/common/utilFilter.C
index d94f69073..2be7cdabb 100644
--- a/src/usr/targeting/common/utilFilter.C
+++ b/src/usr/targeting/common/utilFilter.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2017 */
+/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -455,9 +455,9 @@ const Target * getParentChip( const Target * i_pChiplet )
return l_pChip;
}
-const Target * getParent( const Target * i_unit , TARGETING::TYPE &i_pType)
+Target * getParent( const Target * i_unit , TARGETING::TYPE &i_pType)
{
- const Target * l_parent = NULL;
+ Target * l_parent = NULL;
TARGETING::PredicateCTM l_predicate;
l_predicate.setType(i_pType);
diff --git a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
index 64e5436fe..6fe4a2966 100755
--- a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
+++ b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml
@@ -1211,4 +1211,38 @@
<writeable/>
</attribute>
+<attribute>
+ <id>HB_INITIATED_PM_RESET</id>
+ <description>
+ Indicates that a chip has already been put into reset elsewhere
+ such that the next reset request will be skipped.
+ </description>
+ <simpleType>
+ <uint8_t/>
+ </simpleType>
+ <persistency>volatile-zeroed</persistency>
+ <readable/>
+ <writeable/>
+</attribute>
+
+<enumerationType>
+ <id>HB_INITIATED_PM_RESET</id>
+ <description>Enum for HB_INITIATED_PM_RESET</description>
+ <enumerator>
+ <!-- Default state, no extra reset has been performed -->
+ <name>INACTIVE</name>
+ <value>0</value>
+ </enumerator>
+ <enumerator>
+ <!-- Currently in the middle of doing an extra reset -->
+ <name>IN_PROGRESS</name>
+ <value>1</value>
+ </enumerator>
+ <enumerator>
+ <!-- Chip has already been reset -->
+ <name>COMPLETE</name>
+ <value>2</value>
+ </enumerator>
+</enumerationType>
+
</attributes>
diff --git a/src/usr/targeting/common/xmltohb/target_types_hb.xml b/src/usr/targeting/common/xmltohb/target_types_hb.xml
index 1668998a5..be69df9bc 100644
--- a/src/usr/targeting/common/xmltohb/target_types_hb.xml
+++ b/src/usr/targeting/common/xmltohb/target_types_hb.xml
@@ -102,6 +102,9 @@
<attribute>
<id>HB_SBE_SEEPROM_VERSION_MISMATCH</id>
</attribute>
+ <attribute>
+ <id>HB_INITIATED_PM_RESET</id>
+ </attribute>
</targetTypeExtension>
<targetTypeExtension>
diff --git a/src/usr/targeting/targetservicestart.C b/src/usr/targeting/targetservicestart.C
index 19bb77bd8..8654338ab 100755
--- a/src/usr/targeting/targetservicestart.C
+++ b/src/usr/targeting/targetservicestart.C
@@ -485,6 +485,9 @@ static void initializeAttributes(TargetService& i_targetService,
{
l_chip->setAttr<ATTR_XSCOM_VIRTUAL_ADDR>(0);
l_chip->setAttr<ATTR_HOMER_VIRT_ADDR>(0);
+ l_chip->setAttr<ATTR_HB_INITIATED_PM_RESET>
+ (HB_INITIATED_PM_RESET_INACTIVE);
+
if (l_chip == l_pMasterProcChip)
{
// Need to set PROC_MASTER_TYPE to reflect the
OpenPOWER on IntegriCloud