Skip to content

Commit

Permalink
PGPE: Correctly write DB0 when used as DB3 payload
Browse files Browse the repository at this point in the history
    - When DB0 is used as payload for DB3, it should be
      written even if db0 value to be written is all zeroes.

      Key_Cronus_Test=PM_REGRESS

Change-Id: I4acd634e817c0cac4acc1d2c9d42405af8ef5095
CQ: SW425931
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58580
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Cronus HW CI <cronushw-ci+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Steven Sombar <ssombar@us.ibm.com>
Reviewed-by: YUE DU <daviddu@us.ibm.com>
Reviewed-by: RANGANATHPRASAD G. BRAHMASAMUDRA <prasadbgr@in.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
  • Loading branch information
rbatraAustinIBM authored and op-jenkins committed May 11, 2018
1 parent 23e1420 commit 898f000
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ void p9_pgpe_send_db3(db3_parms_t p)
{
if (p.targetCores & CORE_MASK(c))
{
if(p.db0val)
if(p.writeDB0 == PGPE_DB3_WRITE_DB0)
{
GPE_PUTSCOM(GPE_SCOM_ADDR_CORE(CPPM_CMEDB0, c), p.db0val)
}
Expand Down Expand Up @@ -631,6 +631,7 @@ void p9_pgpe_handle_nacks(uint32_t origTargetCores, uint32_t origExpectedAckFrom
db3_parms_t p;
p.db3val = (uint64_t)MSGID_DB3_REPLAY_DB0 << 56;
p.db0val = 0;
p.writeDB0 = PGPE_DB3_SKIP_WRITE_DB0;
p.waitForAcks = PGPE_DB_ACK_WAIT_CME;
p.checkNACKs = PGPE_DB3_SKIP_CHECK_NACKS;

Expand Down Expand Up @@ -1455,6 +1456,7 @@ void p9_pgpe_pstate_safe_mode()
db0.fields.msg_id = MSGID_DB0_DB3_PAYLOAD;
p.db3val = (uint64_t)MSGID_DB3_ENTER_SAFE_MODE << 56;
p.db0val = db0.value;
p.writeDB0 = PGPE_DB3_WRITE_DB0;
p.targetCores = G_pgpe_pstate_record.activeDB;
p.waitForAcks = PGPE_DB_ACK_WAIT_CME;
p.expectedAckFrom = G_pgpe_pstate_record.activeQuads;
Expand Down Expand Up @@ -1590,6 +1592,7 @@ void p9_pgpe_pstate_sgpe_fault()
//2. PGPE sends all active CMEs a DB3 to disable SGPE Handoff
p.db3val = (uint64_t)MSGID_DB3_DISABLE_SGPE_HANDOFF << 56;
p.db0val = 0;
p.writeDB0 = PGPE_DB3_SKIP_WRITE_DB0;
p.targetCores = G_pgpe_pstate_record.activeDB;
p.waitForAcks = PGPE_DB_ACK_WAIT_CME;
p.expectedAckFrom = G_pgpe_pstate_record.activeQuads;
Expand Down Expand Up @@ -1972,6 +1975,7 @@ void p9_pgpe_pstate_freq_updt()
db0.fields.msg_id = MSGID_DB0_DB3_PAYLOAD;
db3_parms_t p = {MSGID_DB3_HIGH_PRIORITY_PSTATE,
db0.value,
PGPE_DB3_WRITE_DB0,
G_pgpe_pstate_record.activeDB,
PGPE_DB_ACK_WAIT_CME,
G_pgpe_pstate_record.activeQuads,
Expand Down Expand Up @@ -2048,6 +2052,7 @@ inline void p9_pgpe_droop_throttle()
db3_parms_t p;
p.db3val = (uint64_t)MSGID_DB3_SUSPEND_STOP_ENTRY << 56;
p.db0val = 0;
p.writeDB0 = PGPE_DB3_SKIP_WRITE_DB0;
p.targetCores = G_pgpe_pstate_record.activeDB;
p.waitForAcks = PGPE_DB_ACK_SKIP; //We skip ACKs here bc CME will set CME_FLAGS[]
p.expectedAckFrom = G_pgpe_pstate_record.activeQuads;
Expand Down Expand Up @@ -2130,6 +2135,7 @@ inline void p9_pgpe_droop_unthrottle()
db3_parms_t p;
p.db3val = (uint64_t)MSGID_DB3_UNSUSPEND_STOP_ENTRY << 56;
p.db0val = 0;
p.writeDB0 = PGPE_DB3_SKIP_WRITE_DB0;
p.targetCores = G_pgpe_pstate_record.activeDB;
p.waitForAcks = PGPE_DB_ACK_WAIT_CME;
p.expectedAckFrom = G_pgpe_pstate_record.activeQuads;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ enum PSTATE_DB
PGPE_DB0_TYPE_UNICAST = 0,
PGPE_DB0_TYPE_MULTICAST = 1,
PGPE_DB3_SKIP_CHECK_NACKS = 0,
PGPE_DB3_CHECK_NACKS = 1
PGPE_DB3_CHECK_NACKS = 1,
PGPE_DB3_SKIP_WRITE_DB0 = 0,
PGPE_DB3_WRITE_DB0 = 1
};

enum SEMAPHORE_PROCESS_POST_SRC
Expand Down Expand Up @@ -206,6 +208,7 @@ typedef struct db3_parms
{
uint64_t db3val;
uint64_t db0val;
uint32_t writeDB0;
uint32_t targetCores;
uint32_t waitForAcks;
uint32_t expectedAckFrom;
Expand Down

0 comments on commit 898f000

Please sign in to comment.