7 #include "dirq_pic_pin.h"
11 #include "initcalls.h"
13 #include "kernel_console.h"
14 #include "kernel_task.h"
17 #include "kmem_alloc.h"
19 #include "per_cpu_data.h"
20 #include "per_cpu_data_alloc.h"
22 #include "static_init.h"
25 #include "utcb_init.h"
26 #include "vmem_alloc.h"
28 STATIC_INITIALIZER_P(startup_system1, UX_STARTUP1_INIT_PRIO);
29 STATIC_INITIALIZER_P(startup_system2, STARTUP_INIT_PRIO);
31 static void FIASCO_INIT
40 static void FIASCO_INIT
45 Kmem_alloc::base_init();
49 // Initialize cpu-local data management and run constructors for CPU 0
50 Per_cpu_data::init_ctors(Kmem_alloc::allocator());
51 Per_cpu_data_alloc::alloc(0);
52 Per_cpu_data::run_ctors(0);
54 Kmem::init_mmu(*Cpu::boot_cpu());
55 Kernel_task::init(); // enables current_mem_space()
56 Kip_init::init_freq(*Cpu::boot_cpu());
58 // must copy the KIP to allocated phys memory, because user apps cannot
59 // access the kernel image memory
60 Kip *kip = (Kip*)Kmem_alloc::allocator()->alloc(Config::PAGE_SHIFT);
61 memcpy(kip, Kip::k(), Config::PAGE_SIZE);
62 Kip::init_global_kip(kip);
74 Cpu::init_global_features();