1# Memory Protection Unit (MPU) configuration options
2
3# Copyright (c) 2017 Synopsys
4# SPDX-License-Identifier: Apache-2.0
5
6config ARC_MPU_VER
7	int "ARC MPU version"
8	range 2 6
9	default 2
10	help
11	  ARC MPU has several versions. For MPU v2, the minimum region is 2048 bytes;
12	  For other versions, the minimum region is 32 bytes; v4 has secure features,
13	  v6 supports up to 32 regions.
14
15config ARC_CORE_MPU
16	bool "ARC Core MPU functionalities"
17	help
18	  ARC core MPU functionalities
19
20config MPU_STACK_GUARD
21	bool "Thread Stack Guards"
22	depends on ARC_CORE_MPU && ARC_MPU_VER !=2
23	help
24	  Enable thread stack guards via MPU. ARC supports built-in stack protection.
25	  If your core supports that, it is preferred over MPU stack guard.
26	  For ARC_MPU_VER == 2, it requires 2048 extra bytes and a strong start address
27	  alignment, this will bring big waste of memory, so no support for it.
28
29config ARC_MPU
30	bool "ARC MPU Support"
31	select MPU
32	select SRAM_REGION_PERMISSIONS
33	select ARC_CORE_MPU
34	select THREAD_STACK_INFO
35	select GEN_PRIV_STACKS if ARC_MPU_VER != 4
36	select MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT if ARC_MPU_VER !=4
37	select MPU_REQUIRES_NON_OVERLAPPING_REGIONS if ARC_MPU_VER = 4
38	help
39	  Target has ARC MPU (currently only works for EMSK 2.2/2.3 ARCEM7D)
40