summaryrefslogtreecommitdiffstats
path: root/import/chips/p9/procedures/ppe_closed/cme
diff options
context:
space:
mode:
authorYue Du <daviddu@us.ibm.com>2017-03-23 12:31:37 -0500
committerJoshua Hunsberger <jahunsbe@us.ibm.com>2017-10-23 17:16:07 -0500
commit9ad627a56517233d2edbcf0c8ae743b9d469e5a5 (patch)
treee1d3f2194670a986188579dd4c22935fb17ab761 /import/chips/p9/procedures/ppe_closed/cme
parent3fca6379dcfaef9b59db5f33f1662db82df6208d (diff)
downloadtalos-hcode-9ad627a56517233d2edbcf0c8ae743b9d469e5a5.tar.gz
talos-hcode-9ad627a56517233d2edbcf0c8ae743b9d469e5a5.zip
STOP: Conditional compile current error check to save cme size
Change-Id: I46f19d388c6fdf16ae6865864cd648ecc707ba20 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38366 Dev-Ready: YUE DU <daviddu@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Michael S. Floyd <mfloyd@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Diffstat (limited to 'import/chips/p9/procedures/ppe_closed/cme')
-rw-r--r--import/chips/p9/procedures/ppe_closed/cme/pk_app_cfg.h2
-rwxr-xr-ximport/chips/p9/procedures/ppe_closed/cme/stop_cme/p9_cme_stop_entry.c53
2 files changed, 55 insertions, 0 deletions
diff --git a/import/chips/p9/procedures/ppe_closed/cme/pk_app_cfg.h b/import/chips/p9/procedures/ppe_closed/cme/pk_app_cfg.h
index 636cb38f..2d9bc191 100644
--- a/import/chips/p9/procedures/ppe_closed/cme/pk_app_cfg.h
+++ b/import/chips/p9/procedures/ppe_closed/cme/pk_app_cfg.h
@@ -34,6 +34,8 @@
/// \brief Application specific overrides go here.
///
+#define DEBUG_RUNTIME_STATE_CHECK 0
+
#define USE_PPE_IMPRECISE_MODE
/// @todo RTC 161182
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 b9163dc2..709048fe 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");
OpenPOWER on IntegriCloud