Rev 938 | Rev 1078 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 938 | Rev 1066 | ||
|---|---|---|---|
| Line 37... | Line 37... | ||
| 37 | /** Enter userspace |
37 | /** Enter userspace |
| 38 | * |
38 | * |
| 39 | * Change CPU protection level to 3, enter userspace. |
39 | * Change CPU protection level to 3, enter userspace. |
| 40 | * |
40 | * |
| 41 | */ |
41 | */ |
| 42 | void userspace(__address entry) |
42 | void userspace(uspace_arg_t *uarg) |
| 43 | { |
43 | { |
| 44 | ipl_t ipl; |
44 | ipl_t ipl; |
| 45 | 45 | ||
| 46 | ipl = interrupts_disable(); |
46 | ipl = interrupts_disable(); |
| 47 | 47 | ||
| Line 58... | Line 58... | ||
| 58 | "pushl %2\n" |
58 | "pushl %2\n" |
| 59 | "pushl %3\n" |
59 | "pushl %3\n" |
| 60 | "pushl %4\n" |
60 | "pushl %4\n" |
| 61 | "iret" |
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 | : "eax"); |
65 | : "eax"); |
| 65 | 66 | ||
| 66 | /* Unreachable */ |
67 | /* Unreachable */ |
| 67 | for(;;) |
68 | for(;;) |
| 68 | ; |
69 | ; |