2019-11-01 20:45:29 +08:00
|
|
|
# Memory Protection Unit (MPU) configuration options
|
2017-08-15 12:20:42 +08:00
|
|
|
|
|
|
|
# Copyright (c) 2017 Synopsys
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2019-11-01 20:45:29 +08:00
|
|
|
|
2017-08-15 12:20:42 +08:00
|
|
|
config ARC_MPU_VER
|
2018-08-14 22:19:20 +08:00
|
|
|
int "ARC MPU version"
|
2023-02-15 21:37:58 +08:00
|
|
|
range 2 8
|
2017-08-15 12:20:42 +08:00
|
|
|
default 2
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
ARC MPU has several versions. For MPU v2, the minimum region is 2048 bytes;
|
2021-08-24 20:42:46 +08:00
|
|
|
For other versions, the minimum region is 32 bytes; v4 has secure features,
|
2023-02-15 21:37:58 +08:00
|
|
|
v6 supports up to 32 regions. Note: MPU v5 & v7 are not supported.
|
2017-08-15 12:20:42 +08:00
|
|
|
|
|
|
|
config ARC_CORE_MPU
|
|
|
|
bool "ARC Core MPU functionalities"
|
|
|
|
help
|
2017-08-16 16:59:54 +08:00
|
|
|
ARC core MPU functionalities
|
2017-08-15 12:20:42 +08:00
|
|
|
|
|
|
|
config MPU_STACK_GUARD
|
|
|
|
bool "Thread Stack Guards"
|
2020-04-18 11:42:36 +08:00
|
|
|
depends on ARC_CORE_MPU && ARC_MPU_VER !=2
|
2017-08-15 12:20:42 +08:00
|
|
|
help
|
2017-08-16 16:59:54 +08:00
|
|
|
Enable thread stack guards via MPU. ARC supports built-in stack protection.
|
2020-04-18 11:42:36 +08: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 12:20:42 +08:00
|
|
|
|
|
|
|
config ARC_MPU
|
|
|
|
bool "ARC MPU Support"
|
2020-11-06 06:30:20 +08:00
|
|
|
select MPU
|
|
|
|
select SRAM_REGION_PERMISSIONS
|
2017-08-15 12:20:42 +08:00
|
|
|
select ARC_CORE_MPU
|
2018-02-01 16:36:47 +08:00
|
|
|
select THREAD_STACK_INFO
|
2023-05-24 18:24:15 +08: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)
|
2017-08-15 12:20:42 +08:00
|
|
|
help
|
2023-05-24 18:24:15 +08:00
|
|
|
Target has ARC MPU
|