7ea958e0dd
z_x86_thread_page_tables_get() now works for both user and supervisor threads, returning the kernel page tables in the latter case. This API has been up-leveled to a common header. The per-thread privilege elevation stack initial stack pointer, and the per-thread page table locations are no longer computed from other values, and instead are stored in thread->arch. A problem where the wrong page tables were dumped out on certain kinds of page faults has been fixed. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
27 lines
703 B
C
27 lines
703 B
C
/*
|
|
* Copyright (c) 2019 Intel Corporation
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#ifndef ZEPHYR_ARCH_X86_INCLUDE_OFFSETS_SHORT_ARCH_H_
|
|
#define ZEPHYR_ARCH_X86_INCLUDE_OFFSETS_SHORT_ARCH_H_
|
|
|
|
#ifdef CONFIG_X86_64
|
|
#include <intel64/offsets_short_arch.h>
|
|
#else
|
|
#include <ia32/offsets_short_arch.h>
|
|
#endif
|
|
|
|
#define _thread_offset_to_flags \
|
|
(___thread_t_arch_OFFSET + ___thread_arch_t_flags_OFFSET)
|
|
|
|
#ifdef CONFIG_USERSPACE
|
|
#define _thread_offset_to_psp \
|
|
(___thread_t_arch_OFFSET + ___thread_arch_t_psp_OFFSET)
|
|
|
|
#define _thread_offset_to_ptables \
|
|
(___thread_t_arch_OFFSET + ___thread_arch_t_ptables_OFFSET)
|
|
#endif /* CONFIG_USERSPACE */
|
|
|
|
#endif /* ZEPHYR_ARCH_X86_INCLUDE_OFFSETS_SHORT_ARCH_H_ */
|