10 #include "initcalls.h"
11 #include "irq_chip_pic.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"
27 STATIC_INITIALIZER_P(startup_system1, UX_STARTUP1_INIT_PRIO);
28 STATIC_INITIALIZER_P(startup_system2, STARTUP_INIT_PRIO);
30 static void FIASCO_INIT
39 static void FIASCO_INIT
44 Kmem_alloc::base_init();
47 // Initialize cpu-local data management and run constructors for CPU 0
48 Per_cpu_data::init_ctors();
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);
64 Irq_chip_ia32_pic::init();
71 Cpu::init_global_features();