Esempio n. 1
0
int main(void)
{
	irq_init();
	irq_disable();

#ifdef CONFIG_FPU
	*SCB_CPACR |= (SCB_CPACR_CP10_FULL | SCB_CPACR_CP11_FULL);
#endif

#ifdef CONFIG_DEBUG
	dbg_device_init();
	dbg_layer = DL_KDB;
#endif
	__l4_printf("%s", banner);
	run_init_hook(INIT_LEVEL_PLATFORM);

#ifdef CONFIG_SYMMAP
	ksym_init();
#endif
	sched_init();
	memory_init();
	syscall_init();
	thread_init_subsys();
	ktimer_event_init();

#ifdef CONFIG_KPROBES
	kprobe_init();
#endif /* CONFIG_KPROBES */

#ifdef CONFIG_KDB
	softirq_register(KDB_SOFTIRQ, debug_kdb_handler);
	dbg_puts("Press '?' to print KDB menu\n");
#endif
	run_init_hook(INIT_LEVEL_KERNEL);

	/* Not creating kernel thread here because it corrupts current stack
	 */
	create_idle_thread();
	create_root_thread();

	ktimer_event_create(64, ipc_deliver, NULL);

	mpu_enable(MPU_ENABLED);

	run_init_hook(INIT_LEVEL_LAST);

	switch_to_kernel();

	/* Not reached */
	return 0;
}
Esempio n. 2
0
void kdb_init(void)
{
	softirq_register(KDB_SOFTIRQ, debug_kdb_handler);
	dbg_puts("Press '?' to print KDB menu\n");
}
Esempio n. 3
0
void syscall_init()
{
	softirq_register(SYSCALL_SOFTIRQ, syscall_handler);
}
Esempio n. 4
0
void ktimer_event_init()
{
	ktable_init(&ktimer_event_table);
	ktimer_init();
	softirq_register(KTE_SOFTIRQ, ktimer_event_handler);
}