Changeset ebb1489 in mainline for kernel/arch/ia64/src/ia64.c
- Timestamp:
- 2024-10-13T08:23:40Z (8 weeks ago)
- Children:
- 0472cf17
- Parents:
- 2a0c827c (diff), b3b79981 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- boba-buba <120932204+boba-buba@…> (2024-10-13 08:23:40)
- git-committer:
- GitHub <noreply@…> (2024-10-13 08:23:40)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/src/ia64.c
r2a0c827c rebb1489 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 220 225 /** Enter userspace and never return. */ 221 void userspace(u space_arg_t *kernel_uarg)226 void userspace(uintptr_t pc, uintptr_t sp) 222 227 { 223 228 psr_t psr; … … 241 246 * 242 247 * When calculating stack addresses, mind the stack split between the 243 * memory stack and the RSE stack. Each occuppies244 * uspace_stack_size / 2 bytes.248 * memory stack and the RSE stack. 249 * Memory stack occupies area under sp, while RSE stack occupies area above. 245 250 */ 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); 251 switch_to_userspace(pc, 252 sp, sp + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT), 253 0, psr.value, rsc.value); 253 254 254 255 while (true)
Note:
See TracChangeset
for help on using the changeset viewer.