summaryrefslogtreecommitdiffstats
path: root/src/occ_405/timer/timer.c
diff options
context:
space:
mode:
authorAndres Lugo-Reyes <aalugore@us.ibm.com>2017-09-26 17:15:56 -0500
committerAndres A. Lugo-Reyes <aalugore@us.ibm.com>2017-10-16 15:58:00 -0400
commitfa085f9b68802ec92a250eccca6ddb4152e7b61f (patch)
treeefd9b222275b483ceef45e26a8f0ea8c81e6c81c /src/occ_405/timer/timer.c
parent051cc0a10cb61b410252098d13fb7dd8727a8e52 (diff)
downloadtalos-occ-fa085f9b68802ec92a250eccca6ddb4152e7b61f.tar.gz
talos-occ-fa085f9b68802ec92a250eccca6ddb4152e7b61f.zip
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 <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com> Reviewed-by: Andres A. Lugo-Reyes <aalugore@us.ibm.com>
Diffstat (limited to 'src/occ_405/timer/timer.c')
-rwxr-xr-xsrc/occ_405/timer/timer.c26
1 files changed, 13 insertions, 13 deletions
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
OpenPOWER on IntegriCloud