2019-11-01 13:45:29 +01:00
|
|
|
# Memory Protection Unit (MPU) configuration options
|
2017-08-15 06:20:42 +02:00
|
|
|
|
|
|
|
# Copyright (c) 2017 Synopsys
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2019-11-01 13:45:29 +01:00
|
|
|
|
2017-08-15 06:20:42 +02:00
|
|
|
config ARC_MPU_VER
|
2018-08-14 16:19:20 +02:00
|
|
|
int "ARC MPU version"
|
2023-02-15 14:37:58 +01:00
|
|
|
range 2 8
|
2017-08-15 06:20:42 +02:00
|
|
|
default 2
|
|
|
|
help
|
2017-12-13 16:08:21 +01:00
|
|
|
ARC MPU has several versions. For MPU v2, the minimum region is 2048 bytes;
|
2021-08-24 14:42:46 +02:00
|
|
|
For other versions, the minimum region is 32 bytes; v4 has secure features,
|
2023-02-15 14:37:58 +01:00
|
|
|
v6 supports up to 32 regions. Note: MPU v5 & v7 are not supported.
|
2017-08-15 06:20:42 +02:00
|
|
|
|
|
|
|
config ARC_CORE_MPU
|
|
|
|
bool "ARC Core MPU functionalities"
|
|
|
|
help
|
2017-08-16 10:59:54 +02:00
|
|
|
ARC core MPU functionalities
|
2017-08-15 06:20:42 +02:00
|
|
|
|
|
|
|
config MPU_STACK_GUARD
|
|
|
|
bool "Thread Stack Guards"
|
2020-04-18 05:42:36 +02:00
|
|
|
depends on ARC_CORE_MPU && ARC_MPU_VER !=2
|
2017-08-15 06:20:42 +02:00
|
|
|
help
|
2017-08-16 10:59:54 +02:00
|
|
|
Enable thread stack guards via MPU. ARC supports built-in stack protection.
|
2020-04-18 05:42:36 +02:00
|
|
|
If your core supports that, it is preferred over MPU stack guard.
|
|
|
|
For ARC_MPU_VER == 2, it requires 2048 extra bytes and a strong start address
|
|
|
|
alignment, this will bring big waste of memory, so no support for it.
|
2017-08-15 06:20:42 +02:00
|
|
|
|
|
|
|
config ARC_MPU
|
|
|
|
bool "ARC MPU Support"
|
2020-11-05 23:30:20 +01:00
|
|
|
select MPU
|
|
|
|
select SRAM_REGION_PERMISSIONS
|
2017-08-15 06:20:42 +02:00
|
|
|
select ARC_CORE_MPU
|
2018-02-01 09:36:47 +01:00
|
|
|
select THREAD_STACK_INFO
|
2023-05-24 12:24:15 +02:00
|
|
|
select GEN_PRIV_STACKS if !(ARC_MPU_VER = 4 || ARC_MPU_VER = 8)
|
|
|
|
select MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT if !(ARC_MPU_VER = 4 || ARC_MPU_VER = 8)
|
|
|
|
select MPU_REQUIRES_NON_OVERLAPPING_REGIONS if (ARC_MPU_VER = 4 || ARC_MPU_VER = 8)
|
2024-05-22 15:48:23 +02:00
|
|
|
select ARCH_MEM_DOMAIN_SUPPORTS_ISOLATED_STACKS
|
|
|
|
select MEM_DOMAIN_ISOLATED_STACKS
|
2017-08-15 06:20:42 +02:00
|
|
|
help
|
2023-05-24 12:24:15 +02:00
|
|
|
Target has ARC MPU
|