aarch64: mem_domain: Introduce k_mem_partition_attr_t
Introduce the kernel macros for memory attribution also for AArch64. Signed-off-by: Carlo Caione <ccaione@baylibre.com>
This commit is contained in:
parent
9df116ed0f
commit
6ff37886dd
2 changed files with 34 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
|||
#include <arch/arm/aarch64/sys_io.h>
|
||||
#include <arch/arm/aarch64/timer.h>
|
||||
#include <arch/arm/aarch64/error.h>
|
||||
#include <arch/arm/aarch64/arm_mmu.h>
|
||||
#include <arch/common/addr_types.h>
|
||||
#include <arch/common/sys_bitops.h>
|
||||
#include <arch/common/ffs.h>
|
||||
|
@ -37,6 +38,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
/**
|
||||
* @brief Declare the ARCH_STACK_PTR_ALIGN
|
||||
*
|
||||
|
@ -46,6 +49,36 @@ extern "C" {
|
|||
*/
|
||||
#define ARCH_STACK_PTR_ALIGN 16
|
||||
|
||||
/* Kernel macros for memory attribution
|
||||
* (access permissions and cache-ability).
|
||||
*
|
||||
* The macros are to be stored in k_mem_partition_attr_t
|
||||
* objects. The format of a k_mem_partition_attr_t object
|
||||
* is an uint32_t composed by permission and attribute flags
|
||||
* located in include/arch/arm/aarch64/arm_mmu.h
|
||||
*/
|
||||
|
||||
/* Read-Write access permission attributes */
|
||||
#define K_MEM_PARTITION_P_RW_U_RW ((k_mem_partition_attr_t) \
|
||||
{MT_P_RW_U_RW})
|
||||
#define K_MEM_PARTITION_P_RW_U_NA ((k_mem_partition_attr_t) \
|
||||
{MT_P_RW_U_NA})
|
||||
#define K_MEM_PARTITION_P_RO_U_RO ((k_mem_partition_attr_t) \
|
||||
{MT_P_RO_U_RO})
|
||||
#define K_MEM_PARTITION_P_RO_U_NA ((k_mem_partition_attr_t) \
|
||||
{MT_P_RO_U_NA})
|
||||
|
||||
/* Execution-allowed attributes */
|
||||
#define K_MEM_PARTITION_P_RX_U_RX ((k_mem_partition_attr_t) \
|
||||
{MT_P_RX_U_RX})
|
||||
|
||||
/* Typedef for the k_mem_partition attribute */
|
||||
typedef struct {
|
||||
uint32_t attrs;
|
||||
} k_mem_partition_attr_t;
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
k_mem_partition_attr_t
|
||||
mbedtls_pk_context
|
||||
z_arch_esf_t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue