Changes in kernel/arch/ia64/src/ia64.c [3fcea34:5a5269d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/src/ia64.c
r3fcea34 r5a5269d 218 218 } 219 219 220 uintptr_t arch_get_initial_sp(uintptr_t stack_base, uintptr_t stack_size)221 {222 return ALIGN_DOWN(stack_base + stack_size / 2, STACK_ALIGNMENT);223 }224 225 220 /** Enter userspace and never return. */ 226 void userspace(u intptr_t pc, uintptr_t sp)221 void userspace(uspace_arg_t *kernel_uarg) 227 222 { 228 223 psr_t psr; … … 246 241 * 247 242 * When calculating stack addresses, mind the stack split between the 248 * memory stack and the RSE stack. 249 * Memory stack occupies area under sp, while RSE stack occupies area above.243 * memory stack and the RSE stack. Each occuppies 244 * uspace_stack_size / 2 bytes. 250 245 */ 251 switch_to_userspace(pc, 252 sp, sp + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT), 253 0, psr.value, rsc.value); 246 switch_to_userspace(kernel_uarg->uspace_entry, 247 kernel_uarg->uspace_stack + 248 kernel_uarg->uspace_stack_size / 2 - 249 ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT), 250 kernel_uarg->uspace_stack + 251 kernel_uarg->uspace_stack_size / 2, 252 kernel_uarg->uspace_uarg, psr.value, rsc.value); 254 253 255 254 while (true)
Note:
See TracChangeset
for help on using the changeset viewer.