From fa085f9b68802ec92a250eccca6ddb4152e7b61f Mon Sep 17 00:00:00 2001 From: Andres Lugo-Reyes Date: Tue, 26 Sep 2017 17:15:56 -0500 Subject: Prevent PGPE IPC communication if all cores are deconfigured Change-Id: I7cea001833615dc3bcb6a282c20f205f1e7d9d87 CQ:SW401110 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46831 Tested-by: FSP CI Jenkins Reviewed-by: Martha Broyles Reviewed-by: William A. Bryan Reviewed-by: Andres A. Lugo-Reyes --- src/occ_405/timer/timer.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/occ_405/timer/timer.c') diff --git a/src/occ_405/timer/timer.c b/src/occ_405/timer/timer.c index 16b25c8..8bcbfc4 100755 --- a/src/occ_405/timer/timer.c +++ b/src/occ_405/timer/timer.c @@ -44,7 +44,8 @@ extern uint32_t G_mainThreadLoopCounter; // Running in simics? extern bool G_simics_environment; - +// bit mask of configured cores +extern uint32_t G_present_cores; //*************************************************************************/ // Macros //*************************************************************************/ @@ -228,36 +229,35 @@ void init_mem_deadman_reset_task(void) void task_poke_watchdogs(struct task * i_self) { ocb_occhbr_t hbr; // OCC heart beat register - - static bool L_check_pgpe_beacon = false; // Check GPE beacon this time? + static bool L_check_pgpe_beacon = false; // Check GPE beacon this time? // 1. Enable OCC heartbeat hbr.fields.occ_heartbeat_count = 8000; // count corresponding to 8 ms hbr.fields.occ_heartbeat_en = true; // enable heartbeat timer - out32(OCB_OCCHBR, hbr.value); // Enable heartbeat register, and set it - // 2. Reset memory deadman timer if(G_sysConfigData.mem_type == MEM_TYPE_NIMBUS) { manage_mem_deadman_task(); } -// 3. Verify PGPE Beacon is not frozen for 8 ms - if(true == L_check_pgpe_beacon) +// 3. Verify PGPE Beacon is not frozen for 8 ms if there are cores configured + if(G_present_cores != 0) { - // Examine pgpe Beacon every other call (every 4ms) - if(!G_simics_environment) // PGPE Beacon is not implemented in simics + if(true == L_check_pgpe_beacon) { - check_pgpe_beacon(); + // Examine pgpe Beacon every other call (every 4ms) + if(!G_simics_environment) // PGPE Beacon is not implemented in simics + { + check_pgpe_beacon(); + } } + // toggle pgpe beacon check flag, check only once every other call (every 4ms) + L_check_pgpe_beacon = !L_check_pgpe_beacon; } - // toggle pgpe beacon check flag, check only once every other call (every 4ms) - L_check_pgpe_beacon = !L_check_pgpe_beacon; - } // Function Specification -- cgit v1.2.1