int debug_wait_queue_get();
-#if 0
-void ring3()
-{
- int i = 0;
- while(1)
- {
- i++;
-// printk("fuck\n");
- systest();
- }
-}
-#else
void ring3();
-#endif
-static char user_task_stack[PAGE_SIZE] __attribute__ ((__aligned__(PAGE_SIZE)));
+extern void *ring3_stack_top;
void user_task_entry()
{
- printk("user_task_entry\n");
- //while(1);
+ printk("user_task_entry: %08x %08x\n", ring3_stack_top, &ring3_stack_top);
#if 1
asm("cli;");
asm("movl $0x23,%%eax; \
pushl $0x1B; \
leal ring3,%%eax; \
pushl %%eax; \
- iret;"::"b"(user_task_stack+PAGE_SIZE));
+ iret;"::"b"(&ring3_stack_top));
#else
- asm("xorl %eax,%eax; \
- sti; \
- pushfl; \
- movw %cs,%ax; \
- pushl %eax; \
- leal ring3,%eax; \
- pushl %eax; \
- iret;");
#endif
}
ret
.global ring3
+.global ring3_stack_top
ring3:
nop;
nop;
- movl $(ring3_stack+100), %esp
+ #movl $(ring3_stack+100), %esp
movl $11, %eax;
jmp ring3
ring3_stack:
- .byte 200
+ .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+ .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+ .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+ .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+ring3_stack_top:
+ .long 0x12345678