aarch64: mmu: Add initial support for memory domains

Introduce the basic support code for memory domains. To each domain
is associated a top page table which is a copy of the global kernel
one. When a partition is added, corresponding memory range is made
private before its mapping is adjusted.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit is contained in:
Carlo Caione 2020-11-26 12:32:12 +01:00 committed by Anas Nashif
commit a010651c65
4 changed files with 174 additions and 0 deletions

View file

@ -41,6 +41,8 @@ extern "C" {
#ifndef _ASMLANGUAGE
#include <sys/slist.h>
/* Kernel macros for memory attribution
* (access permissions and cache-ability).
*
@ -69,6 +71,11 @@ typedef struct {
uint32_t attrs;
} k_mem_partition_attr_t;
struct arch_mem_domain {
struct arm_mmu_ptables ptables;
sys_snode_t node;
};
#endif /* _ASMLANGUAGE */
#ifdef __cplusplus

View file

@ -41,6 +41,7 @@ typedef struct _callee_saved _callee_saved_t;
struct _thread_arch {
#ifdef CONFIG_USERSPACE
struct arm_mmu_ptables *ptables;
uint64_t priv_stack_start;
#endif
};