POK(kernelpart)
|
Boot function to start the kernel. More...
#include <arch.h>
#include <bsp.h>
#include <core/time.h>
#include <core/thread.h>
#include <core/sched.h>
#include <core/partition.h>
#include <middleware/port.h>
#include <middleware/queue.h>
#include <core/boot.h>
#include <core/instrumentation.h>
Go to the source code of this file.
Functions | |
void | pok_boot () |
Boot function that launch everything. |
void pok_boot | ( | ) |
Boot function that launch everything.
This function load every service according to system requirements (the POK_NEEDS_* maccro).
If we don't use partitioning service, we execute a main function. In that case, POK is acting like an executive, not a real kernel
Definition at line 37 of file boot.c.
{ pok_arch_init(); pok_bsp_init(); #if defined (POK_NEEDS_TIME) || defined (POK_NEEDS_SCHED) || defined (POK_NEEDS_THREADS) pok_time_init(); #endif #ifdef POK_NEEDS_PARTITIONS pok_partition_init (); #endif #ifdef POK_NEEDS_THREADS pok_thread_init (); #endif #if defined (POK_NEEDS_SCHED) || defined (POK_NEEDS_THREADS) pok_sched_init (); #endif #if (defined POK_NEEDS_LOCKOBJ) || defined (POK_NEEDS_PORTS_QUEUEING) || defined (POK_NEEDS_PORTS_SAMPLING) pok_lockobj_init (); #endif #if defined (POK_NEEDS_PORTS_QUEUEING) || defined (POK_NEEDS_PORTS_SAMPLING) pok_port_init (); pok_queue_init (); #endif #if defined (POK_NEEDS_DEBUG) || defined (POK_NEEDS_CONSOLE) pok_cons_write ("POK kernel initialized\n", 23); #endif #ifdef POK_NEEDS_INSTRUMENTATION uint32_t tmp; printf ("[INSTRUMENTATION][CHEDDAR] <event_table>\n"); printf ("[INSTRUMENTATION][CHEDDAR] <processor>\n"); printf ("[INSTRUMENTATION][CHEDDAR] <name>pok_kernel</name>\n"); for (tmp = 0 ; tmp < POK_CONFIG_NB_THREADS ; tmp++) { printf ("[INSTRUMENTATION][CHEDDAR] <task_activation> 0 task %d</task_activation>\n", tmp); } #endif pok_arch_preempt_enable(); #ifndef POK_NEEDS_PARTITIONS main (); #endif }