Changes in kernel/arch/mips32/src/mips32.c [5a5269d:3fcea34] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/src/mips32.c
r5a5269d r3fcea34 40 40 #include <macros.h> 41 41 #include <str.h> 42 #include <mem.h> 42 #include <memw.h> 43 #include <preemption.h> 43 44 #include <userspace.h> 44 45 #include <stdbool.h> … … 162 163 } 163 164 164 void userspace(uspace_arg_t *kernel_uarg) 165 uintptr_t arch_get_initial_sp(uintptr_t stack_base, uintptr_t stack_size) 166 { 167 return stack_base + stack_size; 168 } 169 170 void userspace(uintptr_t pc, uintptr_t sp) 165 171 { 166 172 /* EXL = 1, UM = 1, IE = 1 */ 167 173 cp0_status_write(cp0_status_read() | (cp0_status_exl_exception_bit | 168 174 cp0_status_um_bit | cp0_status_ie_enabled_bit)); 169 cp0_epc_write(kernel_uarg->uspace_entry); 170 userspace_asm(kernel_uarg->uspace_stack + 171 kernel_uarg->uspace_stack_size, 172 kernel_uarg->uspace_uarg, 173 kernel_uarg->uspace_entry); 175 cp0_epc_write(pc); 176 userspace_asm(sp, pc); 174 177 175 178 while (true)
Note:
See TracChangeset
for help on using the changeset viewer.