summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-ximport/chips/p9/procedures/ppe_closed/cme/stop_cme/p9_cme_stop_entry.c53
-rw-r--r--import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_entry.c8
2 files changed, 61 insertions, 0 deletions
diff --git a/import/chips/p9/procedures/ppe_closed/cme/stop_cme/p9_cme_stop_entry.c b/import/chips/p9/procedures/ppe_closed/cme/stop_cme/p9_cme_stop_entry.c
index c0c0d3d1..9be3f7ab 100755
--- a/import/chips/p9/procedures/ppe_closed/cme/stop_cme/p9_cme_stop_entry.c
+++ b/import/chips/p9/procedures/ppe_closed/cme/stop_cme/p9_cme_stop_entry.c
@@ -1172,6 +1172,33 @@ p9_cme_stop_entry()
scom_data.words.upper = SSH_ACT_LV5_COMPLETE;
CME_PUTSCOM(PPM_SSHSRC, core, scom_data.value);
+#if DEBUG_RUNTIME_STATE_CHECK
+
+ if (core & CME_MASK_C0)
+ {
+ CME_GETSCOM(CPPM_CPMMR, CME_MASK_C0, CME_SCOM_AND, scom_data.value);
+
+ if ((scom_data.words.upper & BIT32(13)))
+ {
+ PKTRACE("ERROR: C0 notify was already set?");
+ pk_halt();
+
+ }
+ }
+
+ if (core & CME_MASK_C1)
+ {
+ CME_GETSCOM(CPPM_CPMMR, CME_MASK_C1, CME_SCOM_AND, scom_data.value);
+
+ if ((scom_data.words.upper & BIT32(13)))
+ {
+ PKTRACE("ERROR: C1 notify was already set?");
+ pk_halt();
+ }
+ }
+
+#endif
+
PK_TRACE("Send PCB interrupt per core via PIG, select irq type via CPMMR[10]");
for (core_mask = 2; core_mask; core_mask--)
@@ -1201,6 +1228,32 @@ p9_cme_stop_entry()
PK_TRACE("Switch Core%d PPM wakeup to STOP-GPE via CPMMR[13]", core);
CME_PUTSCOM(CPPM_CPMMR_OR, core, BIT64(13));
+#if DEBUG_RUNTIME_STATE_CHECK
+
+ if (core & CME_MASK_C0)
+ {
+ CME_GETSCOM(CPPM_CPMMR, CME_MASK_C0, CME_SCOM_AND, scom_data.value);
+
+ if (!(scom_data.words.upper & BIT32(13)))
+ {
+ PKTRACE("ERROR: C0 notify fail to set");
+ pk_halt();
+
+ }
+ }
+
+ if (core & CME_MASK_C1)
+ {
+ CME_GETSCOM(CPPM_CPMMR, CME_MASK_C1, CME_SCOM_AND, scom_data.value);
+
+ if (!(scom_data.words.upper & BIT32(13)))
+ {
+ PKTRACE("ERROR: C1 notify fail to set");
+ pk_halt();
+ }
+ }
+
+#endif
PK_TRACE_INF("SE5.B: Handed off to SGPE");
diff --git a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_entry.c b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_entry.c
index a8ecfe19..ed055ab5 100644
--- a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_entry.c
+++ b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_entry.c
@@ -327,6 +327,8 @@ p9_sgpe_stop_entry()
continue;
}
+#if DEBUG_RUNTIME_STATE_CHECK
+
GPE_GETSCOM(GPE_SCOM_ADDR_CORE(CPPM_CPMMR,
((qloop << 2) + cloop)), scom_data.value);
@@ -336,6 +338,8 @@ p9_sgpe_stop_entry()
pk_halt();
}
+#endif
+
PK_TRACE("Update STOP history on core[%d]: in transition of entry",
((qloop << 2) + cloop));
scom_data.words.lower = 0;
@@ -472,6 +476,8 @@ p9_sgpe_stop_entry()
continue;
}
+#if DEBUG_RUNTIME_STATE_CHECK
+
GPE_GETSCOM(GPE_SCOM_ADDR_CORE(CPPM_CPMMR,
((qloop << 2) + cloop)), scom_data.value);
@@ -481,6 +487,8 @@ p9_sgpe_stop_entry()
pk_halt();
}
+#endif
+
// request levle already set by CME
// shift by 2 == times 4, which is cores per quad
PK_TRACE("Update STOP history on core[%d]: in stop level 8",
OpenPOWER on IntegriCloud