diff options
Diffstat (limited to 'kernel/usermode.c')
| -rw-r--r-- | kernel/usermode.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/kernel/usermode.c b/kernel/usermode.c index bb614d0..c700a61 100644 --- a/kernel/usermode.c +++ b/kernel/usermode.c @@ -23,12 +23,20 @@ void install_tss(int cpu_no){ // now fill each value // set values necessary sys_tss.ss0 = 0x10; //kernel data - sys_tss.esp0 = kballoc(4); + sys_tss.esp0 = kballoc(4)+4095; + log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"esp0 =0x%08X ",sys_tss.esp0); // now set the IO bitmap (not necessary, so set above limit) // sys_tss.iomap = ( unsigned short ) sizeof( tss_struct ); } +void initfunc() +{ + while(1) + { + c2++; + } +} void userfunc() { @@ -38,11 +46,7 @@ void userfunc() // if we are pid 0, replace ourselves with /bin/init TODO: switch to usermode before! if(task_get_current_pid()==0) { - //usermode(&initfunc); - while(1) - { - c2++; - } + usermode(&initfunc); } // kernel worker thread on pid1 |
