Changes in kernel/arch/ia32/src/userspace.c [3fcea34:5a5269d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/userspace.c
r3fcea34 r5a5269d 38 38 #include <stdint.h> 39 39 #include <arch.h> 40 #include <abi/proc/uarg.h> 40 41 #include <mm/as.h> 41 42 #include <arch/cpu.h> 42 43 #include <arch/asm.h> 43 44 uintptr_t arch_get_initial_sp(uintptr_t stack_base, uintptr_t stack_size)45 {46 return stack_base + stack_size;47 }48 44 49 45 /** Enter userspace … … 52 48 * 53 49 */ 54 void userspace(u intptr_t pc, uintptr_t sp)50 void userspace(uspace_arg_t *kernel_uarg) 55 51 { 56 52 uint32_t eflags = read_eflags(); … … 65 61 "pushl %[utext_des]\n" 66 62 "pushl %[entry]\n" 63 "movl %[uarg], %%eax\n" 67 64 68 65 /* %edi is defined to hold pcb_ptr - set it to 0 */ … … 73 70 : [eflags_mask] "i" (~EFLAGS_NT), 74 71 [udata_des] "i" (GDT_SELECTOR(UDATA_DES) | PL_USER), 75 [stack_top] "r" (sp), 72 [stack_top] "r" (kernel_uarg->uspace_stack + 73 kernel_uarg->uspace_stack_size), 76 74 [eflags] "r" ((eflags & ~(EFLAGS_NT)) | EFLAGS_IF), 77 75 [utext_des] "i" (GDT_SELECTOR(UTEXT_DES) | PL_USER), 78 [entry] "r" (pc), 76 [entry] "r" (kernel_uarg->uspace_entry), 77 [uarg] "r" (kernel_uarg->uspace_uarg), 79 78 [vreg_des] "r" (GDT_SELECTOR(VREG_DES)) 80 79 : "eax");
Note:
See TracChangeset
for help on using the changeset viewer.