3 * Architecture specific main startup/shutdown code
6 IMPLEMENTATION[ux && mp]:
8 #include "app_cpu_thread.h"
11 #include "per_cpu_data_alloc.h"
14 int FIASCO_FASTCALL boot_ap_cpu(unsigned _cpu) __asm__("BOOT_AP_CPU");
16 int boot_ap_cpu(unsigned _cpu)
18 if (!Per_cpu_data_alloc::alloc(_cpu))
20 extern Spin_lock _tramp_mp_spinlock;
21 printf("CPU allocation failed for CPU%u, disabling CPU.\n", _cpu);
22 _tramp_mp_spinlock.clear();
26 Per_cpu_data::run_ctors(_cpu);
27 Cpu &cpu = Cpu::cpus.cpu(_cpu);
32 //Kmem::init_cpu(cpu);
34 //Utcb_init::init_ap(cpu);
38 // caution: no stack variables in this function because we're going
39 // to change the stack pointer!
41 cpu.show_cache_tlb_info("");
45 // create kernel thread
46 App_cpu_thread *kernel = new (Ram_quota::root) App_cpu_thread();
47 set_cpu_of(kernel, _cpu);
48 check(kernel->bind(Kernel_task::kernel_task(), User<Utcb>::Ptr(0)));
50 main_switch_ap_cpu_stack(kernel);
56 #include "kernel_console.h"
60 // re-enable the console -- it might have been disabled
61 // by "-quiet" command line switch
62 Kconsole::console()->change_state(0, 0, ~0U, Console::OUTENABLED);