Lines Matching full:stack

19  * Note about stack usage:
23 * - kernel threads are running in EL1 using SP_EL1 as stack pointer during
25 * running in a privileged stack that is their own.
27 * - user threads are running in EL0 using SP_EL0 as stack pointer during
29 * stack pointer switches to SP_EL1 and the execution starts using the
30 * privileged portion of the user stack without touching SP_EL0. This portion
33 * - a stack guard region will be added bellow the kernel stack when
35 * to the safe exception stack in the kernel space. For the kernel thread,
36 * SP_EL0 will not change always pointing to safe exception stack. For the
37 * userspace thread, SP_EL0 will switch from the user stack to the safe
38 * exception stack when entering the EL1 mode, and restore to the user stack
49 * +---------------+ <- stack limit
50 * | Stack guard | } Z_ARM64_STACK_GUARD_SIZE (protected by MMU/MPU)
65 * E | ESF | | Privileged portion of the stack
68 * +---------------+ <- stack limit|
69 * | Stack guard | } Z_ARM64_STACK_GUARD_SIZE (protected by MMU/MPU)
85 void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack, in arch_new_thread() argument
99 * The ESF is now hosted at the top of the stack. For user threads this in arch_new_thread()
149 thread->arch.stack_limit = (uint64_t)stack + Z_ARM64_STACK_GUARD_SIZE; in arch_new_thread()
161 /* Map the thread stack */ in arch_user_mode_enter()
164 /* Top of the user stack area */ in arch_user_mode_enter()
169 /* Top of the privileged non-user-accessible part of the stack */ in arch_user_mode_enter()