kernel: expose k_mem_partition_attr_t outside User mode
This commit exposes k_mem_partition_attr_t outside User Mode, so we can use struct k_mem_partition for defining memory partitions outside the scope of user space (for example, to describe thread stack guards or no-cacheable MPU regions). A requirement is that the Zephyr build supports Memory protection. To signify this, a new hidden, all-architecture Kconfig symbol is defined (MPU). In the wake of exposing k_mem_partition_attr_t, the commit exposes the MPU architecture-specific access permission attribute macros outside the User space context (for all ARCHs), so they can be used in a more generic way. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
parent
ccf813c22a
commit
39bf24a9bd
10 changed files with 18 additions and 13 deletions
|
@ -4781,10 +4781,10 @@ struct k_mem_partition {
|
|||
u32_t start;
|
||||
/* size of memory partition */
|
||||
u32_t size;
|
||||
#ifdef CONFIG_USERSPACE
|
||||
#if defined(CONFIG_MEMORY_PROTECTION)
|
||||
/* attribute of memory partition */
|
||||
k_mem_partition_attr_t attr;
|
||||
#endif /* CONFIG_USERSPACE */
|
||||
#endif /* CONFIG_MEMORY_PROTECTION */
|
||||
};
|
||||
|
||||
/* memory domain
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue