summaryrefslogtreecommitdiffstats
path: root/src/occ_405/timer/timer.c
diff options
context:
space:
mode:
authormbroyles <mbroyles@us.ibm.com>2018-03-30 16:17:12 -0500
committerMartha Broyles <mbroyles@us.ibm.com>2018-04-02 09:34:43 -0400
commitb57b1a9333a52fb728c14fd3c56633494b64b05b (patch)
tree6eda1626375380729ff72a756906c12e233baedf /src/occ_405/timer/timer.c
parent1bbbfec92b3a3744a6ffbc5e9f4a4eb46ca4abd1 (diff)
downloadtalos-occ-b57b1a9333a52fb728c14fd3c56633494b64b05b.tar.gz
talos-occ-b57b1a9333a52fb728c14fd3c56633494b64b05b.zip
Prevent Nimbus tasks from running prior to knowing memory type
Change-Id: I8c4a3566f111235a50066a06f3b4f9153f9fcd3b Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56539 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
Diffstat (limited to 'src/occ_405/timer/timer.c')
-rwxr-xr-xsrc/occ_405/timer/timer.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/occ_405/timer/timer.c b/src/occ_405/timer/timer.c
index 17194b2..6716858 100755
--- a/src/occ_405/timer/timer.c
+++ b/src/occ_405/timer/timer.c
@@ -144,12 +144,8 @@ void initWatchdogTimers()
commitErrl(&l_err);
}
- // initialize memory deadman timer's IPC task
- if(G_sysConfigData.mem_type == MEM_TYPE_NIMBUS)
- {
- // Initialize the GPE1 IPC task that resets the deadman timer.
- init_mem_deadman_reset_task();
- }
+ // We can't initialize memory here since we do not know what type of memory we have
+ // until comm is established with (H)TMGT to tell us
}
// Function Specification
@@ -208,7 +204,7 @@ void init_mem_deadman_reset_task(void)
0 //userdata2
);
- CHECKPOINT_FAIL_AND_HALT(l_err);
+ REQUEST_RESET(l_err); //This will add a firmware callout for us
}
}
@@ -272,7 +268,7 @@ void task_poke_watchdogs(struct task * i_self)
// then it is completed. Then if there is a new task to be scheduled
// for this cycle, then schedule it on the GPE1 engine. This task
// is also used to collect memory performance measurements.
-// Called every 500us.
+// Called every 500us. This should only be called on NIMBUS!
//
// End Function Specification
@@ -293,6 +289,14 @@ void manage_mem_deadman_task(void)
static bool L_gpe_idle_traced = false;
static bool L_gpe_timeout_logged = false;
static bool L_gpe_had_1_tick = false;
+ static bool L_init_complete = false;
+
+ if(!L_init_complete)
+ {
+ // Initialize the GPE1 IPC task that resets the deadman timer.
+ init_mem_deadman_reset_task();
+ L_init_complete = true;
+ }
// There is no way to synchronously start or stop the counter, so must
// take the difference between two readings.
OpenPOWER on IntegriCloud