diff options
| author | Yue Du <daviddu@us.ibm.com> | 2017-09-20 13:43:57 -0500 |
|---|---|---|
| committer | Joshua Hunsberger <jahunsbe@us.ibm.com> | 2017-10-23 19:25:46 -0500 |
| commit | f4a64bbd2b2de9531a2ec9f20a3fece1686bfeb6 (patch) | |
| tree | fed7429637ab20cfac89714a68723b8bda5cd232 | |
| parent | 166fd6b2920f70ea665b033e0f0e3ca027ba429b (diff) | |
| download | talos-hcode-f4a64bbd2b2de9531a2ec9f20a3fece1686bfeb6.tar.gz talos-hcode-f4a64bbd2b2de9531a2ec9f20a3fece1686bfeb6.zip | |
STOP: SGPE add ReturnActiveCores checking from PGPE
Change-Id: I1de8f35f78aed01e784744d31e59b6214a8c385a
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46530
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Juan R. Medina <jrmedina@us.ibm.com>
Reviewed-by: RAHUL BATRA <rbatra@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
3 files changed, 33 insertions, 7 deletions
diff --git a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_ipc_handlers.c b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_ipc_handlers.c index 7c161875..231b97b5 100644 --- a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_ipc_handlers.c +++ b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_ipc_handlers.c @@ -137,8 +137,10 @@ p9_sgpe_ipc_pgpe_update_active_cores(const uint32_t type) } void -p9_sgpe_ipc_pgpe_update_active_cores_poll_ack() +p9_sgpe_ipc_pgpe_update_active_cores_poll_ack(const uint32_t type) { + uint32_t vector_active_cores = 0; + PK_TRACE_INF("IPC.SP: Poll PGPE Update Active Cores Ack"); while (G_sgpe_ipcmsg_update_cores.fields.return_code == IPC_SGPE_PGPE_RC_NULL); @@ -152,6 +154,30 @@ p9_sgpe_ipc_pgpe_update_active_cores_poll_ack() PK_TRACE_ERR("ERROR: SGPE Updates PGPE with Active Cores Bad RC. HALT SGPE!"); PK_PANIC(SGPE_IPC_UPDATE_ACTIVE_CORE_BAD_RC); } + + if (type == UPDATE_ACTIVE_CORES_TYPE_EXIT) + { + vector_active_cores = + (G_sgpe_stop_record.group.core[VECTOR_PIGX] | + G_sgpe_stop_record.group.core[VECTOR_ACTIVE]) >> SHIFT32(23); + } + else + { + vector_active_cores = + ((~G_sgpe_stop_record.group.core[VECTOR_PIGE]) & + G_sgpe_stop_record.group.core[VECTOR_ACTIVE]) >> SHIFT32(23); + + if (G_sgpe_stop_record.group.core[VECTOR_PIGX]) + { + vector_active_cores |= G_sgpe_stop_record.group.core[VECTOR_PIGX] >> SHIFT32(23); + } + } + + if (G_sgpe_ipcmsg_update_cores.fields.return_active_cores != vector_active_cores) + { + PK_TRACE_ERR("ERROR: SGPE Updates PGPE with Active Cores Bad Return List. HALT SGPE!"); + PK_PANIC(SGPE_IPC_UPDATE_ACTIVE_CORE_BAD_LIST); + } } diff --git a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_irq_handlers.c b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_irq_handlers.c index 6e6e83a4..2ba27e65 100644 --- a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_irq_handlers.c +++ b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/p9_sgpe_stop_irq_handlers.c @@ -668,7 +668,7 @@ p9_sgpe_pig_cpayload_parser(const uint32_t type) p9_sgpe_ipc_pgpe_update_active_cores(UPDATE_ACTIVE_CORES_TYPE_EXIT); /// poll for ack is located before switch exit to cme - p9_sgpe_ipc_pgpe_update_active_cores_poll_ack(); + p9_sgpe_ipc_pgpe_update_active_cores_poll_ack(UPDATE_ACTIVE_CORES_TYPE_EXIT); } // If any core entries, including stop5 to stop15 @@ -688,7 +688,7 @@ p9_sgpe_pig_cpayload_parser(const uint32_t type) p9_sgpe_ipc_pgpe_update_active_cores(UPDATE_ACTIVE_CORES_TYPE_ENTRY); // pgpe should ack right away - p9_sgpe_ipc_pgpe_update_active_cores_poll_ack(); + p9_sgpe_ipc_pgpe_update_active_cores_poll_ack(UPDATE_ACTIVE_CORES_TYPE_ENTRY); } } diff --git a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/sgpe_panic_codes.h b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/sgpe_panic_codes.h index dd77c90c..28040533 100644 --- a/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/sgpe_panic_codes.h +++ b/import/chips/p9/procedures/ppe_closed/sgpe/stop_gpe/sgpe_panic_codes.h @@ -54,10 +54,10 @@ SGPE_PIG_TYPE23_ENTRY_WNS_CME = 0x1c08, SGPE_PIG_TYPE23_PAYLOAD_INVALID = 0x1c09, SGPE_IPC_UPDATE_ACTIVE_CORE_FAILED = 0x1c0a, SGPE_IPC_UPDATE_ACTIVE_CORE_BAD_RC = 0x1c0d, -SGPE_IPC_UPDATE_ACTIVE_QUAD_FAILED = 0x1c1c, -SGPE_IPC_UPDATE_ACTIVE_QUAD_BAD_RC = 0x1c1d, -SGPE_BAD_DD_LEVEL = 0x1c1e, -//_UNUSED_1c1f = 0x1c1f, +SGPE_IPC_UPDATE_ACTIVE_CORE_BAD_LIST = 0x1c1c, +SGPE_IPC_UPDATE_ACTIVE_QUAD_FAILED = 0x1c1d, +SGPE_IPC_UPDATE_ACTIVE_QUAD_BAD_RC = 0x1c1e, +SGPE_BAD_DD_LEVEL = 0x1c1f, SGPE_STOP_EXIT_GET_CLK_LOCK_FAILED = 0x1d00, // Stop Exit Error SGPE_STOP_EXIT_GET_SLV_LOCK_FAILED = 0x1d01, |

