x86: add support for memory mapped stack for threads

This adds the necessary bits to enable memory mapping thread
stacks on both x86 and x86_64. Note that currently these do
not support multi level mappings (e.g. demand paging and
running in virtual address space: qemu_x86/atom/virt board)
as the mapped stacks require actual physical addresses.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2024-04-01 13:05:43 -07:00 committed by Anas Nashif
commit 027a1c30cd
8 changed files with 87 additions and 6 deletions

View file

@ -67,6 +67,7 @@ config X86_STACK_PROTECTION
select SET_GDT
select GDT_DYNAMIC
select X86_ENABLE_TSS
imply THREAD_STACK_MEM_MAPPED if !DEMAND_PAGING
help
This option leverages the MMU to cause a system fatal error if the
bounds of the current process stack are overflowed. This is done