7 #include "dirq_pic_pin.h"
11 #include "initcalls.h"
13 #include "kernel_task.h"
16 #include "kmem_alloc.h"
18 #include "per_cpu_data.h"
19 #include "per_cpu_data_alloc.h"
21 #include "static_init.h"
24 #include "utcb_init.h"
25 #include "vmem_alloc.h"
27 STATIC_INITIALIZER_P(startup_system1, UX_STARTUP1_INIT_PRIO);
28 STATIC_INITIALIZER_P(startup_system2, STARTUP_INIT_PRIO);
30 static void FIASCO_INIT
38 static void FIASCO_INIT
43 Kmem_alloc::base_init();
47 // Initialize cpu-local data management and run constructors for CPU 0
48 Per_cpu_data::init_ctors(Kmem_alloc::allocator());
49 Per_cpu_data_alloc::alloc(0);
50 Per_cpu_data::run_ctors(0);
52 Kmem::init_mmu(*Cpu::boot_cpu());
53 Kernel_task::init(); // enables current_mem_space()
54 Kip_init::init_freq(*Cpu::boot_cpu());
56 // must copy the KIP to allocated phys memory, because user apps cannot
57 // access the kernel image memory
58 Kip *kip = (Kip*)Kmem_alloc::allocator()->alloc(Config::PAGE_SHIFT);
59 memcpy(kip, Kip::k(), Config::PAGE_SIZE);
60 Kip::init_global_kip(kip);
72 Cpu::init_global_features();