Initialize idle task's stack related fields in sysgen
Hoists the initialization of the the microkernel's idle task's stack fields out of the runtime and into sysgen thereby removing microkernel code from the nanokernel initialization. Change-Id: I54cbbec9e875a52b5fa52562e1a2770cd3ac1cc3 Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This commit is contained in:
parent
a45f691d12
commit
2bf5fc44f1
2 changed files with 5 additions and 13 deletions
|
@ -45,10 +45,6 @@ This module contains routines that are used to initialize the nanokernel.
|
|||
#include <toolchain.h>
|
||||
#include <nanok.h>
|
||||
|
||||
#ifdef CONFIG_MICROKERNEL
|
||||
#include <minik.h>
|
||||
#endif /* CONFIG_MICROKERNEL */
|
||||
|
||||
/* kernel build timestamp items */
|
||||
|
||||
#define BUILD_TIMESTAMP "BUILD: " __DATE__ " " __TIME__
|
||||
|
@ -79,7 +75,7 @@ const char * const build_timestamp = BUILD_TIMESTAMP;
|
|||
|
||||
/* stack space for the background (or idle) task context */
|
||||
|
||||
static char __noinit __stack main_task_stack[CONFIG_MAIN_STACK_SIZE];
|
||||
char __noinit __stack main_task_stack[CONFIG_MAIN_STACK_SIZE];
|
||||
|
||||
/*
|
||||
* storage space for the interrupt stack
|
||||
|
@ -171,13 +167,6 @@ static void nano_init(tCCS *dummyOutContext)
|
|||
|
||||
_nanokernel.task->flags |= ESSENTIAL;
|
||||
|
||||
#if defined(CONFIG_MICROKERNEL)
|
||||
/* fill in microkernel's TCB with info about the idle task */
|
||||
|
||||
_k_task_list[_k_task_count].workspace = (char *)_nanokernel.task;
|
||||
_k_task_list[_k_task_count].worksize = CONFIG_MAIN_STACK_SIZE;
|
||||
#endif
|
||||
|
||||
/* perform any architecture-specific initialization */
|
||||
|
||||
nanoArchInit();
|
||||
|
|
|
@ -385,6 +385,8 @@ def kernel_main_c_tasks():
|
|||
kernel_main_c_out("char __noinit __stack __%s_stack[%d];\n" %
|
||||
(task[0], task[3]))
|
||||
|
||||
kernel_main_c_out("extern char main_task_stack[CONFIG_MAIN_STACK_SIZE];\n")
|
||||
|
||||
# declare task entry points
|
||||
|
||||
kernel_main_c_out("\n")
|
||||
|
@ -429,7 +431,8 @@ def kernel_main_c_tasks():
|
|||
|
||||
kernel_main_c_out(" {NULL, NULL, %d, 0x00000000, " % (num_prios - 1) +
|
||||
"0x00000000, 0x00000000,\n" +
|
||||
"(taskstartfunction)NULL, NULL, 0, (taskabortfunction)NULL}\n")
|
||||
"(taskstartfunction)NULL, main_task_stack, CONFIG_MAIN_STACK_SIZE, " +
|
||||
"(taskabortfunction)NULL}\n")
|
||||
kernel_main_c_out("};\n")
|
||||
|
||||
# currently scheduled task (idle task)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue