8 #include "kern_lib_page.h"
9 #include "kernel_task.h"
11 #include "kmem_alloc.h"
12 #include "kmem_space.h"
13 #include "per_cpu_data.h"
14 #include "per_cpu_data_alloc.h"
17 #include "platform_control.h"
18 #include "processor.h"
19 #include "static_init.h"
22 #include "utcb_init.h"
27 IMPLEMENT FIASCO_INIT FIASCO_NOINLINE
37 IMPLEMENT FIASCO_INIT FIASCO_NOINLINE
41 puts("Hello from Startup::stage2");
43 // The first 4MB of phys memory are always mapped to Map_base
44 Mem_layout::add_pmem(Mem_layout::Sdram_phys_base, Mem_layout::Map_base,
49 // Initialize cpu-local data management and run constructors for CPU 0
50 Per_cpu_data::init_ctors();
51 Per_cpu_data_alloc::alloc(0);
52 Per_cpu_data::run_ctors(0);
56 Mem_space::kernel_space(Kernel_task::kernel_task());
58 Thread::init_per_cpu(0);
61 Cpu::cpus.cpu(0).init(true);
62 Platform_control::init(0);
66 Kern_lib_page::init();