diff options
| author | Yue Du <daviddu@us.ibm.com> | 2017-03-15 11:29:04 -0500 |
|---|---|---|
| committer | hostboot <hostboot@us.ibm.com> | 2018-08-22 17:54:32 -0500 |
| commit | c2290bc9dcd90466a827f56edccc9d35536ad665 (patch) | |
| tree | b19eb37e23b050257e0ee00e09cff7e6888d5811 | |
| parent | e3f788c9832f66d76ca16a14da7b712e99018a43 (diff) | |
| download | talos-hcode-c2290bc9dcd90466a827f56edccc9d35536ad665.tar.gz talos-hcode-c2290bc9dcd90466a827f56edccc9d35536ad665.zip | |
STOP: FIX phantom wakeup vs. wakeup_notify_select
1) sgpe check type2 and 3 on the same core
2) cme check if notify is truely set
3) sgpe check if notify is truely set during stop8 entry
4) FIX phantom wakeup vs. wakeup_notify_select
5) so 4) isnt good enough as phantom can be noticed
when notify = 1 or 0 (good type checker caught this)
instead of using truth table to completely
handle/detect unwanted cases.
Change-Id: I513772fcba548e1ba96c7108f52999a4e9d74f52
Original-Change-Id: I3df8326260ba505db7efb3bdee17cc8908bd13fc
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/37975
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: ASHISH A. MORE <ashish.more@in.ibm.com>
Reviewed-by: Brian T. Vanderpool <vanderp@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
| -rwxr-xr-x | import/chips/p9/procedures/ppe_closed/cme/stop_cme/p9_cme_stop_entry.c | 50 | ||||
| -rw-r--r-- | import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_entry.c | 18 |
2 files changed, 66 insertions, 2 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 66f89b96..511339f3 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 @@ -48,7 +48,6 @@ extern CmeStopRecord G_cme_stop_record; - void prepare_for_ramming (uint32_t core) { uint64_t scom_data; @@ -1166,6 +1165,29 @@ p9_cme_stop_entry() scom_data.words.upper = SSH_ACT_LV5_COMPLETE; CME_PUTSCOM(PPM_SSHSRC, core, scom_data.value); + 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(); + } + } + PK_TRACE("Send PCB interrupt per core via PIG, select irq type via CPMMR[10]"); for (core_mask = 2; core_mask; core_mask--) @@ -1186,15 +1208,39 @@ p9_cme_stop_entry() } pig.fields.req_intr_payload = G_cme_stop_record.req_level[core_index]; + PKTRACE("PIG PUTSCOM core_mask[%d] value %08X", core_mask, (pig.value >> 32)); CME_PUTSCOM(PPM_PIG, core_mask, pig.value); G_cme_stop_record.core_stopgpe |= core; G_cme_stop_record.act_level[core_index] = STOP_LEVEL_5; } } - PK_TRACE("Switch PPM wakeup to STOP-GPE via CPMMR[13]"); + PKTRACE("Switch Core%d PPM wakeup to STOP-GPE via CPMMR[13]", core); CME_PUTSCOM(CPPM_CPMMR_OR, core, BIT64(13)); + 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(); + } + } + 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 4497e57a..a8ecfe19 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,15 @@ p9_sgpe_stop_entry() continue; } + GPE_GETSCOM(GPE_SCOM_ADDR_CORE(CPPM_CPMMR, + ((qloop << 2) + cloop)), scom_data.value); + + if (!(scom_data.words.upper & BIT32(13))) + { + PKTRACE("ERROR.B: core[%d] notify fail to set", ((qloop << 2) + cloop)); + pk_halt(); + } + PK_TRACE("Update STOP history on core[%d]: in transition of entry", ((qloop << 2) + cloop)); scom_data.words.lower = 0; @@ -463,6 +472,15 @@ p9_sgpe_stop_entry() continue; } + GPE_GETSCOM(GPE_SCOM_ADDR_CORE(CPPM_CPMMR, + ((qloop << 2) + cloop)), scom_data.value); + + if (!(scom_data.words.upper & BIT32(13))) + { + PKTRACE("ERROR.C: core[%d] notify fail to set", ((qloop << 2) + cloop)); + pk_halt(); + } + // 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", |

