Repos / kernel.git / commitdiff
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 497efa5)
raw | patch | inline | side by side (parent: 497efa5)
| author | zhaoyanbai <zhaoyanbai@126.com> | |
| Thu, 17 Jul 2014 01:03:54 +0000 (09:03 +0800) | ||
| committer | zhaoyanbai <zhaoyanbai@126.com> | |
| Wed, 3 Nov 2021 02:45:38 +0000 (10:45 +0800) |
| kernel/init.c | patch | blob | history |
diff --git a/kernel/init.c b/kernel/init.c
--- a/kernel/init.c
+++ b/kernel/init.c
@@ -23,27 +23,12 @@ char __initdata kernel_init_stack[KRNL_INIT_STACK_SIZE] __attribute__ ((__aligne
int debug_wait_queue_get();
-void ring3();
+extern void *ring3;
extern void *ring3_stack_top;
void user_task_entry()
{
printk("user_task_entry: %08x %08x\n", ring3_stack_top, &ring3_stack_top);
-#if 1
- asm("cli;");
- asm("movl $0x23,%%eax; \
- movw %%ax,%%ds; \
- movw %%ax,%%es; \
- movw %%ax,%%fs; \
- movw %%ax,%%gs; \
- pushl $0x23; \
- pushl %%ebx; \
- pushl $0x202; \
- pushl $0x1B; \
- leal ring3,%%eax; \
- pushl %%eax; \
- iret;"::"b"(&ring3_stack_top));
-#else
-#endif
+ asm("sti;sysexit;"::"d"(&ring3), "c"(&ring3_stack_top));
}
void init_task_entry()