summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRahul Batra <rbatra@us.ibm.com>2019-03-25 13:24:31 -0400
committerhostboot <hostboot@us.ibm.com>2019-04-25 11:07:07 -0500
commit793c77ef0f8bf646858ee53ce6d379c1c45aebdc (patch)
treeee7da1a90e0f0cfc50424afc145852228aa3ba88
parent2f40a0bc37ee4627f1748059fdb3167aa7ee7f29 (diff)
downloadtalos-hcode-793c77ef0f8bf646858ee53ce6d379c1c45aebdc.zip
talos-hcode-793c77ef0f8bf646858ee53ce6d379c1c45aebdc.tar.gz
PM: Fix Clip Update Timeout
Key_Cronus_Test=PM_REGRESS Change-Id: Ia943cdd3bb646104bfd686356cd3f23bc5876a7d CQ: SW452077 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/74964 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Cronus HW CI <cronushw-ci+hostboot@us.ibm.com> Reviewed-by: RANGANATHPRASAD G. BRAHMASAMUDRA <prasadbgr@in.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
-rw-r--r--import/chips/p9/common/pmlib/include/pstate_pgpe_cme_api.h3
-rw-r--r--import/chips/p9/procedures/ppe_closed/cme/pstate_cme/p9_cme_thread_db.c71
-rw-r--r--import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_pstate.c29
3 files changed, 87 insertions, 16 deletions
diff --git a/import/chips/p9/common/pmlib/include/pstate_pgpe_cme_api.h b/import/chips/p9/common/pmlib/include/pstate_pgpe_cme_api.h
index a171b47..489458c 100644
--- a/import/chips/p9/common/pmlib/include/pstate_pgpe_cme_api.h
+++ b/import/chips/p9/common/pmlib/include/pstate_pgpe_cme_api.h
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HCODE Project */
/* */
-/* COPYRIGHT 2016,2018 */
+/* COPYRIGHT 2016,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -113,6 +113,7 @@ enum MESSAGE_ID_DB3
MSGID_DB3_DISABLE_SGPE_HANDOFF = 0x04,
MSGID_DB3_SUSPEND_STOP_ENTRY = 0x05,
MSGID_DB3_UNSUSPEND_STOP_ENTRY = 0x06,
+ MSGID_DB3_CLIP_BROADCAST = 0x07,
MSGID_DB3_IMMEDIATE_HALT = 0xF1,
MSGID_DB3_RESTORE_STATE_AND_HALT = 0xF2,
};
diff --git a/import/chips/p9/procedures/ppe_closed/cme/pstate_cme/p9_cme_thread_db.c b/import/chips/p9/procedures/ppe_closed/cme/pstate_cme/p9_cme_thread_db.c
index 4038626..72ba30e 100644
--- a/import/chips/p9/procedures/ppe_closed/cme/pstate_cme/p9_cme_thread_db.c
+++ b/import/chips/p9/procedures/ppe_closed/cme/pstate_cme/p9_cme_thread_db.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HCODE Project */
/* */
-/* COPYRIGHT 2016,2018 */
+/* COPYRIGHT 2016,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -297,6 +297,75 @@ void p9_cme_pstate_db3_handler(void)
}
}
+ else if (db3.fields.cme_message_numbern == MSGID_DB3_CLIP_BROADCAST)
+ {
+ PK_TRACE_INF("PSTATE: DB3 Clip Enter");
+
+ uint32_t dbQuadInfo, dbBit8_15;
+ cppm_cmedb0_t dbData;
+ CME_GETSCOM(CPPM_CMEDB0, G_cme_pstate_record.firstGoodCoreMask, dbData.value);
+ dbBit8_15 = (dbData.value & BITS64(8, 8)) >> SHIFT64(15);
+ dbQuadInfo = (dbData.value >> (in32(G_CME_LCL_SRTCH0) &
+ (BITS32(CME_SCRATCH_LOCAL_PSTATE_IDX_START, CME_SCRATCH_LOCAL_PSTATE_IDX_LENGTH)
+ ))) & 0xFF;
+
+ //Quad Manager
+ if(G_cme_pstate_record.qmFlag)
+ {
+ //Sync up with sibling CME
+ p9_cme_pstate_notify_sib(INTERCME_DIRECT_IN2);
+
+ if (dbBit8_15 == DB0_CLIP_BCAST_TYPE_PMIN)
+ {
+ G_cme_pstate_record.pmin = dbQuadInfo;
+ }
+ else
+ {
+ G_cme_pstate_record.pmax = dbQuadInfo;
+ }
+
+ PK_TRACE_INF("PSTATE: Pmin=0x%x,Pmax=0x%x", G_cme_pstate_record.pmin, G_cme_pstate_record.pmax);
+
+
+ p9_cme_pstate_pmsr_updt();
+
+ //Sync up with the sibling CME before ACKing back to PGPE
+ p9_cme_pstate_notify_sib(INTERCME_DIRECT_IN2); //Notify sibling
+
+ //Send type4(ack doorbell)
+ send_ack_to_pgpe(MSGID_PCB_TYPE4_ACK_PSTATE_PROTO_ACK);
+
+ }
+ //On Sibling, poll on intercme_in2 direct msg.
+ else
+ {
+ //Wait to receive a notify from Quad Manager
+ //and then ACK back to quad manager
+ while(!(in32_sh(CME_LCL_EISR) & BIT64SH(39)));
+
+ intercme_direct(INTERCME_DIRECT_IN2, INTERCME_DIRECT_ACK, 0);
+
+ if (dbBit8_15 == DB0_CLIP_BCAST_TYPE_PMIN)
+ {
+ G_cme_pstate_record.pmin = dbQuadInfo;
+ }
+ else
+ {
+ G_cme_pstate_record.pmax = dbQuadInfo;
+ }
+
+ p9_cme_pstate_pmsr_updt();
+
+ //Wait to receive a notify from Quad Manager
+ //and then ACK back to quad manager
+ while(!(in32_sh(CME_LCL_EISR) & BIT64SH(39)));
+
+ intercme_direct(INTERCME_DIRECT_IN2, INTERCME_DIRECT_ACK, 0);
+ }
+
+ PK_TRACE_INF("PSTATE: DB3 Clip Exit");
+ }
+
else
{
//\todo Will be done as part of 41947
diff --git a/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_pstate.c b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_pstate.c
index f1c9432..0beff6d 100644
--- a/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_pstate.c
+++ b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_pstate.c
@@ -1138,18 +1138,13 @@ void p9_pgpe_pstate_stop()
PK_TRACE_DBG("PSS: Stop Done");
}
-//
-// p9_pgpe_pstate_clip_bcast
-//
-// Wrapper function for sending Pstate Clip Bcast DB0 to CMEs
void p9_pgpe_pstate_clip_bcast(uint32_t clip_bcast_type)
{
PK_TRACE_DBG("CLB: Clip Bcast");
pgpe_db0_clip_bcast_t db0;
db0.value = 0;
- db0.fields.msg_id = MSGID_DB0_CLIP_BROADCAST;
+ db0.fields.msg_id = MSGID_DB0_DB3_PAYLOAD;
db0.fields.clip_type = clip_bcast_type;
- db0_parms_t p;
//Note that we store PMIN as psClipMax(which is lower Pstate, but higher numbered Pstate)
if (clip_bcast_type == DB0_CLIP_BCAST_TYPE_PMIN)
@@ -1171,15 +1166,21 @@ void p9_pgpe_pstate_clip_bcast(uint32_t clip_bcast_type)
db0.fields.quad5_clip = G_pgpe_pstate_record.psClipMin[5];
}
- p.db0val = db0.value;
- p.type = PGPE_DB0_TYPE_UNICAST;
- p.targetCores = G_pgpe_pstate_record.activeDB;
- p.waitForAcks = PGPE_DB_ACK_WAIT_CME;
- p.expectedAckFrom = G_pgpe_pstate_record.activeQuads;
- p.expectedAckValue = MSGID_PCB_TYPE4_ACK_PSTATE_PROTO_ACK;
- p9_pgpe_send_db0(p);
+ //Write DB0, but with top-byte = 0. This way DB0 interrupt doesn't happen, but
+ //we still send CME the necessary data. CME will read this inside the DB3 interrupt
+ //which we write next
+ db3_parms_t p = { MSGID_DB3_CLIP_BROADCAST,
+ db0.value,
+ PGPE_DB3_WRITE_DB0,
+ G_pgpe_pstate_record.activeDB,
+ PGPE_DB_ACK_WAIT_CME,
+ G_pgpe_pstate_record.activeQuads,
+ MSGID_PCB_TYPE4_ACK_PSTATE_PROTO_ACK,
+ PGPE_DB3_SKIP_CHECK_NACKS
+ };
+ p.db3val = (uint64_t)(MSGID_DB3_CLIP_BROADCAST) << 56;
+ p9_pgpe_send_db3(p);
}
-
//
// p9_pgpe_pstate_wof_ctrl
//
OpenPOWER on IntegriCloud