x86: add support for thread local storage

Adds the necessary bits to initialize TLS in the stack
area and sets up CPU registers during context switch.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2020-09-29 15:32:35 -07:00 committed by Andrew Boie
commit 4b38392ded
9 changed files with 91 additions and 2 deletions

View file

@ -215,4 +215,12 @@ config X86_EXCEPTION_STACK_TRACE
help
Internal config to enable runtime stack traces on fatal exceptions.
config X86_USE_THREAD_LOCAL_STORAGE
bool
default y if THREAD_LOCAL_STORAGE
select SET_GDT
select GDT_DYNAMIC
help
Internal config to enable thread local storage.
endif # !X86_64