POK(kernelpart)
|
00001 /* 00002 * POK header 00003 * 00004 * The following file is a part of the POK project. Any modification should 00005 * made according to the POK licence. You CANNOT use this file or a part of 00006 * this file is this part of a file for your own project 00007 * 00008 * For more information on the POK licence, please see our LICENCE FILE 00009 * 00010 * Please follow the coding guidelines described in doc/CODING_GUIDELINES 00011 * 00012 * Copyright (c) 2007-2009 POK team 00013 * 00014 * Created by julien on Thu Jan 15 23:34:13 2009 00015 */ 00016 00024 #include <arch.h> 00025 #include <bsp.h> 00026 00027 #include <core/time.h> 00028 #include <core/thread.h> 00029 #include <core/sched.h> 00030 #include <core/partition.h> 00031 #include <middleware/port.h> 00032 #include <middleware/queue.h> 00033 #include <core/boot.h> 00034 00035 #include <core/instrumentation.h> 00036 00037 void pok_boot () 00038 { 00039 pok_arch_init(); 00040 pok_bsp_init(); 00041 00042 #if defined (POK_NEEDS_TIME) || defined (POK_NEEDS_SCHED) || defined (POK_NEEDS_THREADS) 00043 pok_time_init(); 00044 #endif 00045 00046 #ifdef POK_NEEDS_PARTITIONS 00047 pok_partition_init (); 00048 #endif 00049 00050 #ifdef POK_NEEDS_THREADS 00051 pok_thread_init (); 00052 #endif 00053 00054 #if defined (POK_NEEDS_SCHED) || defined (POK_NEEDS_THREADS) 00055 pok_sched_init (); 00056 #endif 00057 00058 #if (defined POK_NEEDS_LOCKOBJ) || defined (POK_NEEDS_PORTS_QUEUEING) || defined (POK_NEEDS_PORTS_SAMPLING) 00059 pok_lockobj_init (); 00060 #endif 00061 #if defined (POK_NEEDS_PORTS_QUEUEING) || defined (POK_NEEDS_PORTS_SAMPLING) 00062 pok_port_init (); 00063 pok_queue_init (); 00064 #endif 00065 00066 #if defined (POK_NEEDS_DEBUG) || defined (POK_NEEDS_CONSOLE) 00067 pok_cons_write ("POK kernel initialized\n", 23); 00068 #endif 00069 00070 #ifdef POK_NEEDS_INSTRUMENTATION 00071 uint32_t tmp; 00072 printf ("[INSTRUMENTATION][CHEDDAR] <event_table>\n"); 00073 printf ("[INSTRUMENTATION][CHEDDAR] <processor>\n"); 00074 printf ("[INSTRUMENTATION][CHEDDAR] <name>pok_kernel</name>\n"); 00075 00076 for (tmp = 0 ; tmp < POK_CONFIG_NB_THREADS ; tmp++) 00077 { 00078 printf ("[INSTRUMENTATION][CHEDDAR] <task_activation> 0 task %d</task_activation>\n", tmp); 00079 } 00080 #endif 00081 00082 pok_arch_preempt_enable(); 00083 00084 #ifndef POK_NEEDS_PARTITIONS 00085 00090 main (); 00091 #endif 00092 }