- Timestamp:
- 2006-03-17T01:34:36Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8a0b0669
- Parents:
- 5fceec7
- Location:
- arch
- Files:
-
- 5 edited
-
amd64/src/userspace.c (modified) (2 diffs)
-
ia32/include/fpu_context.h (modified) (1 diff)
-
ia32/src/userspace.c (modified) (2 diffs)
-
ia64/src/ia64.c (modified) (3 diffs)
-
mips32/src/mips32.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/src/userspace.c
r5fceec7 r9f52563 40 40 * 41 41 */ 42 void userspace( __address entry)42 void userspace(uspace_arg_t *uarg) 43 43 { 44 44 ipl_t ipl; … … 47 47 48 48 __asm__ volatile ("" 49 "movq %0, %%rax;" 50 "movq %1, %%rbx;" 51 "movq %2, %%rcx;" 52 "movq %3, %%rdx;" 53 "movq %4, %%rsi;" 54 "pushq %%rax;" 55 "pushq %%rbx;" 56 "pushq %%rcx;" 57 "pushq %%rdx;" 58 "pushq %%rsi;" 59 "iretq;" 60 : : "i" (gdtselector(UDATA_DES) | PL_USER), 61 "i" (USTACK_ADDRESS+THREAD_STACK_SIZE), 49 "pushq %0\n" 50 "pushq %1\n" 51 "pushq %2\n" 52 "pushq %3\n" 53 "pushq %4\n" 54 "iretq\n" 55 : : 56 "i" (gdtselector(UDATA_DES) | PL_USER), 57 "r" (uarg->uspace_stack+THREAD_STACK_SIZE), 62 58 "r" (ipl), 63 59 "i" (gdtselector(UTEXT_DES) | PL_USER), 64 "r" ( entry));60 "r" (uarg->uspace_entry)); 65 61 66 62 /* Unreachable */ -
arch/ia32/include/fpu_context.h
r5fceec7 r9f52563 40 40 41 41 struct fpu_context { 42 /* TODO: We need malloc that aligns structures on 16-byte boundary */43 42 __u8 fpu[512]; /* FXSAVE & FXRSTOR storage area */ 44 43 }; -
arch/ia32/src/userspace.c
r5fceec7 r9f52563 40 40 * 41 41 */ 42 void userspace( __address entry)42 void userspace(uspace_arg_t *uarg) 43 43 { 44 44 ipl_t ipl; … … 61 61 "iret" 62 62 : 63 : "i" (selector(UDATA_DES) | PL_USER), "r" (USTACK_ADDRESS+(THREAD_STACK_SIZE)), "r" (ipl), "i" (selector(UTEXT_DES) | PL_USER), "r" (entry) 63 : "i" (selector(UDATA_DES) | PL_USER), "r" (uarg->uspace_stack+THREAD_STACK_SIZE), 64 "r" (ipl), "i" (selector(UTEXT_DES) | PL_USER), "r" (uarg->uspace_entry) 64 65 : "eax"); 65 66 -
arch/ia64/src/ia64.c
r5fceec7 r9f52563 42 42 #include <userspace.h> 43 43 #include <console/console.h> 44 #include <proc/thread.h> 44 45 45 46 void arch_pre_mm_init(void) … … 73 74 74 75 /** Enter userspace and never return. */ 75 void userspace( __address entry)76 void userspace(uspace_arg_t *uarg) 76 77 { 77 78 psr_t psr; … … 91 92 rsc.mode = 3; /* eager mode */ 92 93 93 switch_to_userspace( entry, USTACK_ADDRESS+PAGE_SIZE-ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT), USTACK_ADDRESS, psr.value, rsc.value);94 switch_to_userspace(uarg->uspace_entry, uarg->uspace_stack+PAGE_SIZE-ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT), uarg->uspace_stack, psr.value, rsc.value); 94 95 95 96 while (1) { -
arch/mips32/src/mips32.c
r5fceec7 r9f52563 121 121 __address supervisor_sp __attribute__ ((section (".text"))); 122 122 123 void userspace( __address entry)123 void userspace(uspace_arg_t *uarg) 124 124 { 125 125 /* EXL=1, UM=1, IE=1 */ … … 127 127 cp0_status_um_bit | 128 128 cp0_status_ie_enabled_bit)); 129 cp0_epc_write( entry);130 userspace_asm( USTACK_ADDRESS+PAGE_SIZE);129 cp0_epc_write(uarg->uspace_entry); 130 userspace_asm(uarg->uspace_stack+PAGE_SIZE); 131 131 while (1) 132 132 ;
Note:
See TracChangeset
for help on using the changeset viewer.
