zephyr/arch/xtensa/core
Andrew Boie b0c155f3ca kernel: overhaul stack specification
The core kernel computes the initial stack pointer
for a thread, properly aligning it and subtracting out
any random offsets or thread-local storage areas.
arch_new_thread() no longer needs to make any calculations,
an initial stack frame may be placed at the bounds of
the new 'stack_ptr' parameter passed in. This parameter
replaces 'stack_size'.

thread->stack_info is now set before arch_new_thread()
is invoked, z_new_thread_init() has been removed.
The values populated may need to be adjusted on arches
which carve-out MPU guard space from the actual stack
buffer.

thread->stack_info now has a new member 'delta' which
indicates any offset applied for TLS or random offset.
It's used so the calculations don't need to be repeated
if the thread later drops to user mode.

CONFIG_INIT_STACKS logic is now performed inside
z_setup_new_thread(), before arch_new_thread() is called.

thread->stack_info is now defined as the canonical
user-accessible area within the stack object, including
random offsets and TLS. It will never include any
carved-out memory for MPU guards and must be updated at
runtime if guards are removed.

Available stack space is now optimized. Some arches may
need to significantly round up the buffer size to account
for page-level granularity or MPU power-of-two requirements.
This space is now accounted for and used by virtue of
the Z_THREAD_STACK_SIZE_ADJUST() call in z_setup_new_thread.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-07-30 21:11:14 -04:00
..
offsets headers: Refactor kernel and arch headers. 2019-11-06 16:07:32 -08:00
startup Revert "arch: xtensa: Use reset-vector.S in booloader code" 2020-02-08 10:01:24 +02:00
atomic.S kernel: add APIs for atomic os on pointers 2020-03-10 10:18:16 -04:00
CMakeLists.txt arch: xtensa: Add support for Intel Apollolake 2020-02-05 10:43:25 -05:00
cpu_idle.c tracing: move headers under include/tracing 2020-02-07 15:58:05 -05:00
crt1.S xtensa: add calling entry point for multi-processing 2020-03-25 19:07:28 -04:00
fatal.c xtensa: add support to build HAL as part of build process 2019-12-18 20:24:18 -05:00
irq_manage.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
irq_offload.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
window_vectors.S headers: Refactor kernel and arch headers. 2019-11-06 16:07:32 -08:00
xtensa_intgen.py
xtensa_intgen.tmpl
xtensa-asm2-util.S xtensa: save/restore scompare1 during context switch 2020-02-27 12:42:26 +02:00
xtensa-asm2.c kernel: overhaul stack specification 2020-07-30 21:11:14 -04:00