Changes in kernel/arch/ia32/src/userspace.c [0f17bff:d6f9fff] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/userspace.c
r0f17bff rd6f9fff 39 39 #include <abi/proc/uarg.h> 40 40 #include <mm/as.h> 41 #include <arch/cpu.h>42 #include <arch/asm.h>43 41 44 42 /** Enter userspace … … 49 47 void userspace(uspace_arg_t *kernel_uarg) 50 48 { 51 uint32_t eflags = read_eflags();49 ipl_t ipl = interrupts_disable(); 52 50 53 51 asm volatile ( 52 /* 53 * Clear nested task flag. 54 */ 55 "pushfl\n" 56 "pop %%eax\n" 57 "and $0xffffbfff, %%eax\n" 58 "push %%eax\n" 59 "popfl\n" 60 54 61 /* Set up GS register (virtual register segment) */ 55 62 "movl %[vreg_des], %%gs\n" … … 57 64 "pushl %[udata_des]\n" 58 65 "pushl %[stack_top]\n" 59 "pushl %[ eflags]\n"66 "pushl %[ipl]\n" 60 67 "pushl %[utext_des]\n" 61 68 "pushl %[entry]\n" … … 67 74 "iret\n" 68 75 : 69 : [eflags_mask] "i" (~EFLAGS_NT), 70 [udata_des] "i" (GDT_SELECTOR(UDATA_DES) | PL_USER), 76 : [udata_des] "i" (GDT_SELECTOR(UDATA_DES) | PL_USER), 71 77 [stack_top] "r" ((uint8_t *) kernel_uarg->uspace_stack + 72 78 kernel_uarg->uspace_stack_size), 73 [ eflags] "r" ((eflags & ~(EFLAGS_NT)) | EFLAGS_IF),79 [ipl] "r" (ipl), 74 80 [utext_des] "i" (GDT_SELECTOR(UTEXT_DES) | PL_USER), 75 81 [entry] "r" (kernel_uarg->uspace_entry),
Note:
See TracChangeset
for help on using the changeset viewer.