userspace: adjust arch memory domain interface
The current API was assuming too much, in that it expected that arch-specific memory domain configuration is only maintained in some global area, and updates to domains that are not currently active have no effect. This was true when all memory domain state was tracked in page tables or MPU registers, but no longer works when arch-specific memory management information is stored in thread-specific areas. This is needed for: #13441 #13074 #15135 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
fddd550824
commit
8915e41b7b
7 changed files with 131 additions and 67 deletions
|
@ -81,6 +81,13 @@ extern FUNC_NORETURN void z_x86_userspace_enter(k_thread_entry_t user_entry,
|
|||
u32_t stack_end,
|
||||
u32_t stack_start);
|
||||
|
||||
/* Helper macros needed to be passed to x86_update_mem_domain_pages */
|
||||
#define X86_MEM_DOMAIN_SET_PAGES (0U)
|
||||
#define X86_MEM_DOMAIN_RESET_PAGES (1U)
|
||||
|
||||
extern void z_x86_mem_domain_pages_update(struct k_mem_domain *mem_domain,
|
||||
u32_t page_conf);
|
||||
|
||||
#include <stddef.h> /* For size_t */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue