ARC: Add mpuv8 support

Turn on mpuv8 support for ARC SEM cpus

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
This commit is contained in:
Nikolay Agishev 2023-02-15 17:37:58 +04:00 committed by Carles Cufí
parent e7bb5d2aea
commit c729e12beb
4 changed files with 7 additions and 5 deletions

View File

@ -5,12 +5,12 @@
config ARC_MPU_VER
int "ARC MPU version"
range 2 6
range 2 8
default 2
help
ARC MPU has several versions. For MPU v2, the minimum region is 2048 bytes;
For other versions, the minimum region is 32 bytes; v4 has secure features,
v6 supports up to 32 regions.
v6 supports up to 32 regions. Note: MPU v5 & v7 are not supported.
config ARC_CORE_MPU
bool "ARC Core MPU functionalities"

View File

@ -51,7 +51,7 @@ static inline uint32_t get_region_attr_by_type(uint32_t type)
}
}
#if CONFIG_ARC_MPU_VER == 4
#if (CONFIG_ARC_MPU_VER == 4) || (CONFIG_ARC_MPU_VER == 8)
#include "arc_mpu_v4_internal.h"
#else
#include "arc_mpu_common_internal.h"

View File

@ -115,7 +115,8 @@ BUILD_ASSERT(CONFIG_ARC_EXCEPTION_STACK_SIZE % ARCH_STACK_PTR_ALIGN == 0,
#ifdef CONFIG_ARC_CORE_MPU
#if CONFIG_ARC_MPU_VER == 2
#define Z_ARC_MPU_ALIGN 2048
#elif (CONFIG_ARC_MPU_VER == 3) || (CONFIG_ARC_MPU_VER == 4) || (CONFIG_ARC_MPU_VER == 6)
#elif (CONFIG_ARC_MPU_VER == 3) || (CONFIG_ARC_MPU_VER == 4) || \
(CONFIG_ARC_MPU_VER == 6) || (CONFIG_ARC_MPU_VER == 8)
#define Z_ARC_MPU_ALIGN 32
#else
#error "Unsupported MPU version"

View File

@ -30,7 +30,8 @@
#ifdef CONFIG_ARC_MPU_ENABLE
#if CONFIG_ARC_MPU_VER == 2
#define MPU_MIN_SIZE 2048
#elif (CONFIG_ARC_MPU_VER == 3) || (CONFIG_ARC_MPU_VER == 4) || (CONFIG_ARC_MPU_VER == 6)
#elif (CONFIG_ARC_MPU_VER == 3) || (CONFIG_ARC_MPU_VER == 4) || \
(CONFIG_ARC_MPU_VER == 6) || (CONFIG_ARC_MPU_VER == 8)
#define MPU_MIN_SIZE 32
#endif
#define MPU_MIN_SIZE_ALIGN . = ALIGN(MPU_MIN_SIZE);