Skip to content

Commit

Permalink
Handling special wakeup assert/deassert mis-match in PM Reset/Init on…
Browse files Browse the repository at this point in the history
… MALF

- Skip deassert special wakeup in PM Init when in PM Malf path
- Attribute changes to default HB to disable MALF and PM FFDC enablement on IPL
- Attribute to track Malf Flow across PM Reset and Init
- Do not fail PM reset in Malf Flow, if auto special wakeup could not be set

Change-Id: I5c730c818bbf886b8db7fc497cfb62c7a6c9c7f0
CQ: SW437841
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/62528
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Reviewed-by: Prem Shanker Jha <premjha2@in.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/62543
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
  • Loading branch information
am10dolkar authored and crgeddes committed Jul 19, 2018
1 parent d7cc38f commit dd2fa45
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 17 deletions.
29 changes: 23 additions & 6 deletions src/import/chips/p9/procedures/hwp/pm/p9_pm_init.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -121,6 +121,8 @@ fapi2::ReturnCode pm_init(
FAPI_INF("Entering pm_init...");

fapi2::ReturnCode l_rc;
fapi2::ATTR_PM_MALF_CYCLE_Type l_malfCycle =
fapi2::ENUM_ATTR_PM_MALF_CYCLE_INACTIVE;

// ************************************************************************
// Initialize Cores and Quads
Expand Down Expand Up @@ -215,11 +217,26 @@ fapi2::ReturnCode pm_init(
// ************************************************************************
// Take all EX chiplets out of special wakeup
// ************************************************************************
FAPI_DBG("Disable special wakeup for all functional EX targets.");
FAPI_TRY(special_wakeup_all(i_target,
false),//Disable splwkup
"ERROR: Failed to remove EX chiplets from special wakeup");
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After EX out of special wakeup"));
FAPI_TRY (FAPI_ATTR_GET (fapi2::ATTR_PM_MALF_CYCLE, i_target,
l_malfCycle));

if (l_malfCycle == fapi2::ENUM_ATTR_PM_MALF_CYCLE_INACTIVE)
{
FAPI_DBG("Disable special wakeup for all functional EX targets.");
FAPI_TRY(special_wakeup_all(i_target,
false),//Disable splwkup
"ERROR: Failed to remove EX chiplets from special wakeup");
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After EX out of special wakeup"));
}
else
{
// Do not deassert wakeup's in Malf path, as we did not assert them in Reset
// as well and reset the attribute.
FAPI_INF("MALF Handling in progress! Skipped Disable Special Wakeup");
l_malfCycle = fapi2::ENUM_ATTR_PM_MALF_CYCLE_INACTIVE;
FAPI_TRY (FAPI_ATTR_SET (fapi2::ATTR_PM_MALF_CYCLE, i_target,
l_malfCycle));
}

// ************************************************************************
// Start OCC PPC405
Expand Down
40 changes: 33 additions & 7 deletions src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.C
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ fapi2::ReturnCode p9_pm_reset(
fapi2::ATTR_INITIATED_PM_RESET_Type l_pmResetActive =
fapi2::ENUM_ATTR_INITIATED_PM_RESET_ACTIVE;

fapi2::ATTR_PM_MALF_CYCLE_Type l_pmMalfCycle =
fapi2::ENUM_ATTR_PM_MALF_CYCLE_INACTIVE;

fapi2::buffer<uint64_t> l_data64;
fapi2::ReturnCode l_rc;
fapi2::ATTR_SKIP_WAKEUP_Type l_skip_wakeup;
Expand Down Expand Up @@ -214,6 +217,9 @@ fapi2::ReturnCode p9_pm_reset(
}
else
{
// Put a mark that we are in a PM Reset as part of handling a PM Malf Alert
l_pmMalfCycle = fapi2::ENUM_ATTR_PM_MALF_CYCLE_ACTIVE;
FAPI_TRY (FAPI_ATTR_SET (fapi2::ATTR_PM_MALF_CYCLE, i_target, l_pmMalfCycle));
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "Skip special wakeup in malf alert path"));
}

Expand All @@ -227,8 +233,8 @@ fapi2::ReturnCode p9_pm_reset(
}
else
{
FAPI_INF("Skipping enabling special wakup and setting"
"auto-special wakeup because SKIP_WAKEUP attribute is set");
FAPI_INF("Skipping enabling special wakeup and auto-special wakeup"
" because SKIP_WAKEUP attribute is set");
}

// ************************************************************************
Expand Down Expand Up @@ -628,6 +634,8 @@ p9_pm_set_auto_spwkup(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_targe
fapi2::buffer<uint64_t> l_gpmmr;
fapi2::buffer<uint64_t> l_lmcr;
uint32_t l_bit;
fapi2::ATTR_PM_MALF_CYCLE_Type l_malfAlertActive =
fapi2::ENUM_ATTR_PM_MALF_CYCLE_INACTIVE;

fapi2::ATTR_CHIP_UNIT_POS_Type l_ex_num;
FAPI_TRY(FAPI_ATTR_GET( fapi2::ATTR_CHIP_UNIT_POS,
Expand Down Expand Up @@ -657,11 +665,29 @@ p9_pm_set_auto_spwkup(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_targe
}
else
{
FAPI_ASSERT (false,
fapi2::PM_RESET_SPWKUP_DONE_ERROR()
.set_CORE_TARGET(l_core)
.set_GPMMR(l_gpmmr),
"Core expected to be in special wake-up is not prior to setting auto special wake-up mode");
FAPI_TRY (FAPI_ATTR_GET (fapi2::ATTR_PM_MALF_CYCLE, i_target,
l_malfAlertActive));

if (l_malfAlertActive == fapi2::ENUM_ATTR_PM_MALF_CYCLE_INACTIVE)
{
FAPI_ASSERT (false,
fapi2::PM_RESET_SPWKUP_DONE_ERROR()
.set_CORE_TARGET(l_core)
.set_GPMMR(l_gpmmr),
"Core expected to be in special wake-up is not "
"prior to setting auto special wake-up mode");
}
else
{
// It is possible that special wakeup had failed as we are in PM MALF path
// Log a info error and continue with the Reset flow
FAPI_ASSERT_NOEXIT ( false,
fapi2::PM_RESET_SPWKUP_DONE_ERROR()
.set_CORE_TARGET(l_core)
.set_GPMMR(l_gpmmr),
"Core expected to be in special wake-up is not "
"prior to setting auto special wake-up mode" );
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,4 +546,17 @@
<writeable/>
</attribute>
<!-- ********************************************************************* -->
<attribute>
<id>ATTR_PM_MALF_CYCLE</id>
<targetType>TARGET_TYPE_PROC_CHIP</targetType>
<description>
Attribute is set in PM Reset and cleared in the immediate subsequent PM
Init, when handling a PM Malfunction related PM Complex reset/init cycle.
</description>
<valueType>uint8</valueType>
<enum>INACTIVE = 0x00, ACTIVE = 0x01</enum>
<writeable/>
<initToZero/>
</attribute>
<!-- ********************************************************************* -->
</attributes>
Original file line number Diff line number Diff line change
Expand Up @@ -2215,8 +2215,8 @@
</description>
<valueType>uint8</valueType>
<enum>FALSE = 0x00, TRUE = 0x01</enum>
<platInit/>
<default>FALSE</default>
<writeable/>
<initToZero/>
</attribute>
<!-- ********************************************************************* -->
<attribute>
Expand All @@ -2233,8 +2233,7 @@
<valueType>uint8</valueType>
<enum>FALSE = 0x00, TRUE = 0x01</enum>
<writeable/>
<platInit/>
<default>FALSE</default>
<initToZero/>
</attribute>

<!-- ********************************************************************* -->
Expand Down

0 comments on commit dd2fa45

Please sign in to comment.