Changeset b50b5af2 in mainline for kernel/arch/amd64/src/userspace.c
- Timestamp:
- 2009-08-22T10:48:00Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 04803bf
- Parents:
- 1ea99cc (diff), a71c158 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/userspace.c
r1ea99cc rb50b5af2 34 34 35 35 #include <userspace.h> 36 #include <arch/cpu.h> 36 37 #include <arch/pm.h> 37 38 #include <arch/types.h> … … 50 51 ipl_t ipl = interrupts_disable(); 51 52 52 /* Clear CF, PF, AF, ZF, SF, DF, OF */53 ipl &= ~(0xcd4);53 ipl &= ~(RFLAGS_CF | RFLAGS_PF | RFLAGS_AF | RFLAGS_ZF | RFLAGS_SF | 54 RFLAGS_DF | RFLAGS_OF); 54 55 55 56 asm volatile ( 56 57 58 59 60 61 57 "pushq %[udata_des]\n" 58 "pushq %[stack_size]\n" 59 "pushq %[ipl]\n" 60 "pushq %[utext_des]\n" 61 "pushq %[entry]\n" 62 "movq %[uarg], %%rax\n" 62 63 63 64 65 66 67 68 69 70 71 72 73 64 /* %rdi is defined to hold pcb_ptr - set it to 0 */ 65 "xorq %%rdi, %%rdi\n" 66 "iretq\n" 67 :: [udata_des] "i" (gdtselector(UDATA_DES) | PL_USER), 68 [stack_size] "r" (kernel_uarg->uspace_stack + THREAD_STACK_SIZE), 69 [ipl] "r" (ipl), 70 [utext_des] "i" (gdtselector(UTEXT_DES) | PL_USER), 71 [entry] "r" (kernel_uarg->uspace_entry), 72 [uarg] "r" (kernel_uarg->uspace_uarg) 73 : "rax" 74 ); 74 75 75 76 /* Unreachable */ 76 while (1); 77 while (1) 78 ; 77 79 } 78 80
Note:
See TracChangeset
for help on using the changeset viewer.