Rev 2232 | Rev 2787 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2232 | Rev 2722 | ||
---|---|---|---|
Line 139... | Line 139... | ||
139 | { |
139 | { |
140 | } |
140 | } |
141 | 141 | ||
142 | void userspace(uspace_arg_t *kernel_uarg) |
142 | void userspace(uspace_arg_t *kernel_uarg) |
143 | { |
143 | { |
144 | /* EXL=1, UM=1, IE=1 */ |
144 | /* EXL = 1, UM = 1, IE = 1 */ |
145 | cp0_status_write(cp0_status_read() | (cp0_status_exl_exception_bit | |
145 | cp0_status_write(cp0_status_read() | (cp0_status_exl_exception_bit | |
146 | cp0_status_um_bit | |
- | |
147 | cp0_status_ie_enabled_bit)); |
146 | cp0_status_um_bit | cp0_status_ie_enabled_bit)); |
148 | cp0_epc_write((uintptr_t) kernel_uarg->uspace_entry); |
147 | cp0_epc_write((uintptr_t) kernel_uarg->uspace_entry); |
149 | userspace_asm(((uintptr_t) kernel_uarg->uspace_stack+PAGE_SIZE), |
148 | userspace_asm(((uintptr_t) kernel_uarg->uspace_stack + PAGE_SIZE), |
150 | (uintptr_t) kernel_uarg->uspace_uarg, |
149 | (uintptr_t) kernel_uarg->uspace_uarg, |
151 | (uintptr_t) kernel_uarg->uspace_entry); |
150 | (uintptr_t) kernel_uarg->uspace_entry); |
- | 151 | ||
152 | while (1) |
152 | while (1); |
153 | ; |
- | |
154 | } |
153 | } |
155 | 154 | ||
156 | /** Perform mips32 specific tasks needed before the new task is run. */ |
155 | /** Perform mips32 specific tasks needed before the new task is run. */ |
157 | void before_task_runs_arch(void) |
156 | void before_task_runs_arch(void) |
158 | { |
157 | { |
Line 178... | Line 177... | ||
178 | return 0; |
177 | return 0; |
179 | } |
178 | } |
180 | 179 | ||
181 | void arch_reboot(void) |
180 | void arch_reboot(void) |
182 | { |
181 | { |
- | 182 | if (!arc_reboot()) |
|
183 | ___halt(); |
183 | ___halt(); |
- | 184 | ||
184 | while (1); |
185 | while (1); |
185 | } |
186 | } |
186 | 187 | ||
187 | /** @} |
188 | /** @} |
188 | */ |
189 | */ |