4 //---------------------------------------------------------------------------
5 IMPLEMENTATION [sparc]:
13 //#include "kmem_alloc.h"
15 //#include "pagetable.h"
17 #include "kernel_thread.h"
18 #include "kernel_task.h"
19 #include "kernel_console.h"
20 //#include "reset.h" //TODO cbass: implement
22 //#include "terminate.h" //TODO cbass: implement
24 #include "processor.h"
26 static int exit_question_active = 0;
28 extern "C" void __attribute__ ((noreturn))
31 if (exit_question_active)
42 static void exit_question()
44 exit_question_active = 1;
48 puts("\nReturn reboots, \"k\" enters L4 kernel debugger...");
50 char c = Kconsole::console()->getchar();
52 if (c == 'k' || c == 'K')
58 // it may be better to not call all the destruction stuff
59 // because of unresolved static destructor dependency
61 // SO just do the reset at this point.
62 puts("\033[1mRebooting...\033[0m");
70 #include "thread_state.h"
73 // caution: no stack variables in this function because we're going
74 // to change the stack pointer!
76 // make some basic initializations, then create and run the kernel
78 //set_exit_question(&exit_question);
80 // disallow all interrupts before we selectively enable them
83 // create kernel thread
84 static Kernel_thread *kernel = new (Ram_quota::root) Kernel_thread;
85 Task *const ktask = Kernel_task::kernel_task();
86 check(kernel->bind(ktask, User<Utcb>::Ptr(0)));
89 // switch to stack of kernel thread and bootstrap the kernel