[init][smp] have secondary init run in arch code up to threading, and complete in secondary thread

-move the per-cpu initialization of the gic and cortex-a9 timer into an init hook.
  This removes the hard coded call in arm/arch.c
-make sure the timer initialization happens in the pre-threading callback, in case
  a secondary init hook needs the timer.
This commit is contained in:
Travis Geiselbrecht
2015-03-27 14:08:32 -07:00
parent ccb073b98b
commit f0fad1590b
7 changed files with 24 additions and 15 deletions

View File

@@ -170,7 +170,8 @@ void lk_secondary_cpu_entry(void)
static int secondary_cpu_bootstrap2(void *arg)
{
lk_init_level_all(LK_INIT_FLAG_SECONDARY_CPUS);
/* secondary cpu initialize from threading level up. 0 to threading was handled in arch */
lk_init_level(LK_INIT_FLAG_SECONDARY_CPUS, LK_INIT_LEVEL_THREADING, LK_INIT_LEVEL_LAST);
return 0;
}