Skip to content

Commit dd2fa45

Browse files
am10dolkarcrgeddes
authored andcommitted
Handling special wakeup assert/deassert mis-match in PM Reset/Init on 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>
1 parent d7cc38f commit dd2fa45

File tree

4 files changed

+72
-17
lines changed

4 files changed

+72
-17
lines changed

src/import/chips/p9/procedures/hwp/pm/p9_pm_init.C

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HostBoot Project */
77
/* */
8-
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
8+
/* Contributors Listed Below - COPYRIGHT 2016,2018 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -121,6 +121,8 @@ fapi2::ReturnCode pm_init(
121121
FAPI_INF("Entering pm_init...");
122122

123123
fapi2::ReturnCode l_rc;
124+
fapi2::ATTR_PM_MALF_CYCLE_Type l_malfCycle =
125+
fapi2::ENUM_ATTR_PM_MALF_CYCLE_INACTIVE;
124126

125127
// ************************************************************************
126128
// Initialize Cores and Quads
@@ -215,11 +217,26 @@ fapi2::ReturnCode pm_init(
215217
// ************************************************************************
216218
// Take all EX chiplets out of special wakeup
217219
// ************************************************************************
218-
FAPI_DBG("Disable special wakeup for all functional EX targets.");
219-
FAPI_TRY(special_wakeup_all(i_target,
220-
false),//Disable splwkup
221-
"ERROR: Failed to remove EX chiplets from special wakeup");
222-
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After EX out of special wakeup"));
220+
FAPI_TRY (FAPI_ATTR_GET (fapi2::ATTR_PM_MALF_CYCLE, i_target,
221+
l_malfCycle));
222+
223+
if (l_malfCycle == fapi2::ENUM_ATTR_PM_MALF_CYCLE_INACTIVE)
224+
{
225+
FAPI_DBG("Disable special wakeup for all functional EX targets.");
226+
FAPI_TRY(special_wakeup_all(i_target,
227+
false),//Disable splwkup
228+
"ERROR: Failed to remove EX chiplets from special wakeup");
229+
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After EX out of special wakeup"));
230+
}
231+
else
232+
{
233+
// Do not deassert wakeup's in Malf path, as we did not assert them in Reset
234+
// as well and reset the attribute.
235+
FAPI_INF("MALF Handling in progress! Skipped Disable Special Wakeup");
236+
l_malfCycle = fapi2::ENUM_ATTR_PM_MALF_CYCLE_INACTIVE;
237+
FAPI_TRY (FAPI_ATTR_SET (fapi2::ATTR_PM_MALF_CYCLE, i_target,
238+
l_malfCycle));
239+
}
223240

224241
// ************************************************************************
225242
// Start OCC PPC405

src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.C

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ fapi2::ReturnCode p9_pm_reset(
111111
fapi2::ATTR_INITIATED_PM_RESET_Type l_pmResetActive =
112112
fapi2::ENUM_ATTR_INITIATED_PM_RESET_ACTIVE;
113113

114+
fapi2::ATTR_PM_MALF_CYCLE_Type l_pmMalfCycle =
115+
fapi2::ENUM_ATTR_PM_MALF_CYCLE_INACTIVE;
116+
114117
fapi2::buffer<uint64_t> l_data64;
115118
fapi2::ReturnCode l_rc;
116119
fapi2::ATTR_SKIP_WAKEUP_Type l_skip_wakeup;
@@ -214,6 +217,9 @@ fapi2::ReturnCode p9_pm_reset(
214217
}
215218
else
216219
{
220+
// Put a mark that we are in a PM Reset as part of handling a PM Malf Alert
221+
l_pmMalfCycle = fapi2::ENUM_ATTR_PM_MALF_CYCLE_ACTIVE;
222+
FAPI_TRY (FAPI_ATTR_SET (fapi2::ATTR_PM_MALF_CYCLE, i_target, l_pmMalfCycle));
217223
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "Skip special wakeup in malf alert path"));
218224
}
219225

@@ -227,8 +233,8 @@ fapi2::ReturnCode p9_pm_reset(
227233
}
228234
else
229235
{
230-
FAPI_INF("Skipping enabling special wakup and setting"
231-
"auto-special wakeup because SKIP_WAKEUP attribute is set");
236+
FAPI_INF("Skipping enabling special wakeup and auto-special wakeup"
237+
" because SKIP_WAKEUP attribute is set");
232238
}
233239

234240
// ************************************************************************
@@ -628,6 +634,8 @@ p9_pm_set_auto_spwkup(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_targe
628634
fapi2::buffer<uint64_t> l_gpmmr;
629635
fapi2::buffer<uint64_t> l_lmcr;
630636
uint32_t l_bit;
637+
fapi2::ATTR_PM_MALF_CYCLE_Type l_malfAlertActive =
638+
fapi2::ENUM_ATTR_PM_MALF_CYCLE_INACTIVE;
631639

632640
fapi2::ATTR_CHIP_UNIT_POS_Type l_ex_num;
633641
FAPI_TRY(FAPI_ATTR_GET( fapi2::ATTR_CHIP_UNIT_POS,
@@ -657,11 +665,29 @@ p9_pm_set_auto_spwkup(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_targe
657665
}
658666
else
659667
{
660-
FAPI_ASSERT (false,
661-
fapi2::PM_RESET_SPWKUP_DONE_ERROR()
662-
.set_CORE_TARGET(l_core)
663-
.set_GPMMR(l_gpmmr),
664-
"Core expected to be in special wake-up is not prior to setting auto special wake-up mode");
668+
FAPI_TRY (FAPI_ATTR_GET (fapi2::ATTR_PM_MALF_CYCLE, i_target,
669+
l_malfAlertActive));
670+
671+
if (l_malfAlertActive == fapi2::ENUM_ATTR_PM_MALF_CYCLE_INACTIVE)
672+
{
673+
FAPI_ASSERT (false,
674+
fapi2::PM_RESET_SPWKUP_DONE_ERROR()
675+
.set_CORE_TARGET(l_core)
676+
.set_GPMMR(l_gpmmr),
677+
"Core expected to be in special wake-up is not "
678+
"prior to setting auto special wake-up mode");
679+
}
680+
else
681+
{
682+
// It is possible that special wakeup had failed as we are in PM MALF path
683+
// Log a info error and continue with the Reset flow
684+
FAPI_ASSERT_NOEXIT ( false,
685+
fapi2::PM_RESET_SPWKUP_DONE_ERROR()
686+
.set_CORE_TARGET(l_core)
687+
.set_GPMMR(l_gpmmr),
688+
"Core expected to be in special wake-up is not "
689+
"prior to setting auto special wake-up mode" );
690+
}
665691
}
666692
}
667693
}

src/import/chips/p9/procedures/xml/attribute_info/pm_hwp_attributes.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,4 +546,17 @@
546546
<writeable/>
547547
</attribute>
548548
<!-- ********************************************************************* -->
549+
<attribute>
550+
<id>ATTR_PM_MALF_CYCLE</id>
551+
<targetType>TARGET_TYPE_PROC_CHIP</targetType>
552+
<description>
553+
Attribute is set in PM Reset and cleared in the immediate subsequent PM
554+
Init, when handling a PM Malfunction related PM Complex reset/init cycle.
555+
</description>
556+
<valueType>uint8</valueType>
557+
<enum>INACTIVE = 0x00, ACTIVE = 0x01</enum>
558+
<writeable/>
559+
<initToZero/>
560+
</attribute>
561+
<!-- ********************************************************************* -->
549562
</attributes>

src/import/chips/p9/procedures/xml/attribute_info/pm_plat_attributes.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,8 +2215,8 @@
22152215
</description>
22162216
<valueType>uint8</valueType>
22172217
<enum>FALSE = 0x00, TRUE = 0x01</enum>
2218-
<platInit/>
2219-
<default>FALSE</default>
2218+
<writeable/>
2219+
<initToZero/>
22202220
</attribute>
22212221
<!-- ********************************************************************* -->
22222222
<attribute>
@@ -2233,8 +2233,7 @@
22332233
<valueType>uint8</valueType>
22342234
<enum>FALSE = 0x00, TRUE = 0x01</enum>
22352235
<writeable/>
2236-
<platInit/>
2237-
<default>FALSE</default>
2236+
<initToZero/>
22382237
</attribute>
22392238

22402239
<!-- ********************************************************************* -->

0 commit comments

Comments
 (0)