POK(kernelpart)
boot.c File Reference

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.

Detailed Description

Boot function to start the kernel.

Author:
Julien Delange
Date:
2008-2009

Definition in file boot.c.


Function Documentation

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.

{
#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)
#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
#ifndef POK_NEEDS_PARTITIONS
main ();
#endif
}