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"
|
2017-08-15 12:20:42 +08:00
|
|
|
range 2 4
|
|
|
|
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;
|
|
|
|
For MPU v3, the minimum region is 32 bytes
|
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"
|
|
|
|
select ARC_CORE_MPU
|
2018-02-01 16:36:47 +08:00
|
|
|
select THREAD_STACK_INFO
|
2018-11-27 22:45:36 +08:00
|
|
|
select MEMORY_PROTECTION
|
2020-04-03 12:25:29 +08:00
|
|
|
select GEN_PRIV_STACKS if ARC_MPU_VER = 2
|
2018-02-12 19:29:54 +08:00
|
|
|
select MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT if ARC_MPU_VER = 2
|
2019-11-28 16:27:59 +08:00
|
|
|
select MPU_REQUIRES_NON_OVERLAPPING_REGIONS if ARC_MPU_VER = 3
|
2017-08-15 12:20:42 +08:00
|
|
|
help
|
2017-11-29 17:42:00 +08:00
|
|
|
Target has ARC MPU (currently only works for EMSK 2.2/2.3 ARCEM7D)
|