arch: arc: add support of mpu v3
Add support of ARC mpu version 3 which can have region size down to 32 bytes Signed-off-by: Yuguo Zou <yuguo.zou@synopsys.com>
This commit is contained in:
parent
f4ad81bb29
commit
333501e871
3 changed files with 7 additions and 2 deletions
|
@ -17,7 +17,12 @@
|
|||
#define AUX_MPU_RDP_SIZE_MASK (0xE03)
|
||||
|
||||
/* For MPU version 2, the minimum protection region size is 2048 bytes */
|
||||
#if CONFIG_ARC_MPU_VER == 2
|
||||
#define ARC_FEATURE_MPU_ALIGNMENT_BITS 11
|
||||
/* For MPU version 3, the minimum protection region size is 32 bytes */
|
||||
#else
|
||||
#define ARC_FEATURE_MPU_ALIGNMENT_BITS 5
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This internal function initializes a MPU region
|
||||
|
|
|
@ -66,7 +66,7 @@ extern "C" {
|
|||
#ifdef CONFIG_ARC_CORE_MPU
|
||||
#if CONFIG_ARC_MPU_VER == 2
|
||||
#define Z_ARC_MPU_ALIGN 2048
|
||||
#elif CONFIG_ARC_MPU_VER == 4
|
||||
#elif (CONFIG_ARC_MPU_VER == 3) || (CONFIG_ARC_MPU_VER == 4)
|
||||
#define Z_ARC_MPU_ALIGN 32
|
||||
#else
|
||||
#error "Unsupported MPU version"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#ifdef CONFIG_ARC_MPU_ENABLE
|
||||
#if CONFIG_ARC_MPU_VER == 2
|
||||
#define MPU_MIN_SIZE 2048
|
||||
#elif CONFIG_ARC_MPU_VER == 4
|
||||
#elif (CONFIG_ARC_MPU_VER == 3) || (CONFIG_ARC_MPU_VER == 4)
|
||||
#define MPU_MIN_SIZE 32
|
||||
#endif
|
||||
#define MPU_MIN_SIZE_ALIGN . = ALIGN(MPU_MIN_SIZE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue