arch: arc: fix mpu version number
ARC mpu version used a wrong number 3, could cause conflict in future. This commit fix this issue to version number 4. Signed-off-by: Yuguo Zou <yuguo.zou@synopsys.com>
This commit is contained in:
parent
15e3355d85
commit
a8b6936c7d
9 changed files with 20 additions and 20 deletions
|
@ -52,13 +52,13 @@ extern "C" {
|
|||
*
|
||||
* For regions that are NOT the minimum size, this define has no semantics
|
||||
* on ARC MPUv2 as its regions must be power of two size and aligned to their
|
||||
* own size. On ARC MPUv3, region sizes are arbitrary and this just indicates
|
||||
* own size. On ARC MPUv4, region sizes are arbitrary and this just indicates
|
||||
* the required size granularity.
|
||||
*/
|
||||
#ifdef CONFIG_ARC_CORE_MPU
|
||||
#if CONFIG_ARC_MPU_VER == 2
|
||||
#define Z_ARC_MPU_ALIGN 2048
|
||||
#elif CONFIG_ARC_MPU_VER == 3
|
||||
#elif CONFIG_ARC_MPU_VER == 4
|
||||
#define Z_ARC_MPU_ALIGN 32
|
||||
#else
|
||||
#error "Unsupported MPU version"
|
||||
|
@ -244,7 +244,7 @@ BUILD_ASSERT(CONFIG_PRIVILEGED_STACK_SIZE % Z_ARC_MPU_ALIGN == 0,
|
|||
"the size of the partition must be power of 2" \
|
||||
" and greater than or equal to the mpu adddress alignment." \
|
||||
"start address of the partition must align with size.")
|
||||
#elif CONFIG_ARC_MPU_VER == 3
|
||||
#elif CONFIG_ARC_MPU_VER == 4
|
||||
#define _ARCH_MEM_PARTITION_ALIGN_CHECK(start, size) \
|
||||
BUILD_ASSERT((size) % Z_ARC_MPU_ALIGN == 0 && \
|
||||
(size) >= Z_ARC_MPU_ALIGN && \
|
||||
|
|
|
@ -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 == 3
|
||||
#elif 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