Ulf Magnusson | bd6e044 | 2019-11-01 13:45:29 +0100 | [diff] [blame] | 1 | # General architecture configuration options |
Juan Manuel Cruz | d15251f | 2015-05-20 11:40:39 -0500 | [diff] [blame] | 2 | |
Juan Manuel Cruz | d15251f | 2015-05-20 11:40:39 -0500 | [diff] [blame] | 3 | # Copyright (c) 2014-2015 Wind River Systems, Inc. |
| 4 | # Copyright (c) 2015 Intel Corporation |
Mazen NEIFER | 1cded67 | 2017-01-13 12:14:33 +0100 | [diff] [blame] | 5 | # Copyright (c) 2016 Cadence Design Systems, Inc. |
David B. Kinder | ac74d8b | 2017-01-18 17:01:01 -0800 | [diff] [blame] | 6 | # SPDX-License-Identifier: Apache-2.0 |
Juan Manuel Cruz | d15251f | 2015-05-20 11:40:39 -0500 | [diff] [blame] | 7 | |
Ulf Magnusson | ec3eff5 | 2018-07-30 10:57:47 +0200 | [diff] [blame] | 8 | # Include these first so that any properties (e.g. defaults) below can be |
Anas Nashif | f2cb20c | 2019-06-18 14:45:40 -0400 | [diff] [blame] | 9 | # overridden (by defining symbols in multiple locations) |
Ulf Magnusson | ec3eff5 | 2018-07-30 10:57:47 +0200 | [diff] [blame] | 10 | |
Ulf Magnusson | d0e8752 | 2018-09-05 12:58:05 +0200 | [diff] [blame] | 11 | # Note: $ARCH might be a glob pattern |
Klaus Petersen | c66cb76 | 2018-11-15 10:37:46 +0100 | [diff] [blame] | 12 | source "$(ARCH_DIR)/$(ARCH)/Kconfig" |
Ulf Magnusson | ec3eff5 | 2018-07-30 10:57:47 +0200 | [diff] [blame] | 13 | |
Ulf Magnusson | c5839f8 | 2020-02-06 18:26:14 +0100 | [diff] [blame] | 14 | # Architecture symbols |
| 15 | # |
| 16 | # Should be 'select'ed by low-level symbols like SOC_SERIES_* or, lacking that, |
| 17 | # by SOC_*. |
Anas Nashif | 77ba3c3 | 2015-10-09 06:20:52 -0400 | [diff] [blame] | 18 | |
| 19 | config ARC |
Ulf Magnusson | c5839f8 | 2020-02-06 18:26:14 +0100 | [diff] [blame] | 20 | bool |
Ulf Magnusson | de42aea | 2020-02-07 00:48:22 +0100 | [diff] [blame] | 21 | select ARCH_IS_SET |
Kumar Gala | 311e6b9 | 2018-03-14 19:16:40 -0500 | [diff] [blame] | 22 | select HAS_DTS |
Anas Nashif | ce59510 | 2020-08-02 10:45:10 -0400 | [diff] [blame] | 23 | imply XIP |
Daniel Leung | c7704d8 | 2020-10-30 10:21:40 -0700 | [diff] [blame] | 24 | select ARCH_HAS_THREAD_LOCAL_STORAGE |
Ulf Magnusson | c5839f8 | 2020-02-06 18:26:14 +0100 | [diff] [blame] | 25 | help |
| 26 | ARC architecture |
Anas Nashif | 77ba3c3 | 2015-10-09 06:20:52 -0400 | [diff] [blame] | 27 | |
| 28 | config ARM |
Ulf Magnusson | c5839f8 | 2020-02-06 18:26:14 +0100 | [diff] [blame] | 29 | bool |
Ulf Magnusson | de42aea | 2020-02-07 00:48:22 +0100 | [diff] [blame] | 30 | select ARCH_IS_SET |
Daniel Leung | 181d073 | 2020-08-18 12:55:08 -0700 | [diff] [blame] | 31 | select ARCH_SUPPORTS_COREDUMP if CPU_CORTEX_M |
Kumar Gala | 37f9113 | 2018-11-03 07:19:18 -0500 | [diff] [blame] | 32 | select HAS_DTS |
Andrew Boie | 28be793 | 2020-03-11 10:56:19 -0700 | [diff] [blame] | 33 | # FIXME: current state of the code for all ARM requires this, but |
| 34 | # is really only necessary for Cortex-M with ARM MPU! |
Carlo Caione | 3539c2f | 2021-03-25 11:56:15 +0100 | [diff] [blame] | 35 | select GEN_PRIV_STACKS |
Keith Packard | 1638d48 | 2021-12-20 14:56:39 -0800 | [diff] [blame] | 36 | select ARCH_HAS_THREAD_LOCAL_STORAGE if CPU_AARCH32_CORTEX_R || CPU_CORTEX_M || CPU_AARCH32_CORTEX_A |
Ulf Magnusson | c5839f8 | 2020-02-06 18:26:14 +0100 | [diff] [blame] | 37 | help |
| 38 | ARM architecture |
Anas Nashif | 77ba3c3 | 2015-10-09 06:20:52 -0400 | [diff] [blame] | 39 | |
Carlo Caione | 3539c2f | 2021-03-25 11:56:15 +0100 | [diff] [blame] | 40 | config ARM64 |
| 41 | bool |
| 42 | select ARCH_IS_SET |
| 43 | select 64BIT |
| 44 | select HAS_DTS |
| 45 | select HAS_ARM_SMCCC |
| 46 | select ARCH_HAS_THREAD_LOCAL_STORAGE |
| 47 | select USE_SWITCH |
| 48 | select USE_SWITCH_SUPPORTED |
Nicolas Pitre | bd941bc | 2022-03-11 21:29:06 -0500 | [diff] [blame] | 49 | select IRQ_OFFLOAD_NESTED if IRQ_OFFLOAD |
Carlo Caione | 3539c2f | 2021-03-25 11:56:15 +0100 | [diff] [blame] | 50 | help |
| 51 | ARM64 (AArch64) architecture |
| 52 | |
Antony Pavlov | 0369998 | 2020-12-01 13:29:58 +0300 | [diff] [blame] | 53 | config MIPS |
| 54 | bool |
| 55 | select ARCH_IS_SET |
| 56 | select ATOMIC_OPERATIONS_C |
| 57 | select HAS_DTS |
| 58 | help |
| 59 | MIPS architecture |
| 60 | |
Martin Åberg | 07160fa | 2020-10-16 20:53:59 +0200 | [diff] [blame] | 61 | config SPARC |
| 62 | bool |
| 63 | select ARCH_IS_SET |
Morten Priess | a0dd44c | 2021-04-21 15:15:26 +0200 | [diff] [blame] | 64 | select HAS_DTS |
Martin Åberg | 07160fa | 2020-10-16 20:53:59 +0200 | [diff] [blame] | 65 | select USE_SWITCH |
| 66 | select USE_SWITCH_SUPPORTED |
| 67 | select BIG_ENDIAN |
| 68 | select ATOMIC_OPERATIONS_BUILTIN if SPARC_CASA |
| 69 | select ATOMIC_OPERATIONS_C if !SPARC_CASA |
Martin Åberg | feae324 | 2020-10-27 12:31:41 +0100 | [diff] [blame] | 70 | select ARCH_HAS_THREAD_LOCAL_STORAGE |
Martin Åberg | 83f733c | 2021-02-16 15:38:58 +0100 | [diff] [blame] | 71 | select ARCH_HAS_EXTRA_EXCEPTION_INFO |
Martin Åberg | 07160fa | 2020-10-16 20:53:59 +0200 | [diff] [blame] | 72 | help |
| 73 | SPARC architecture |
| 74 | |
Anas Nashif | 77ba3c3 | 2015-10-09 06:20:52 -0400 | [diff] [blame] | 75 | config X86 |
Ulf Magnusson | c5839f8 | 2020-02-06 18:26:14 +0100 | [diff] [blame] | 76 | bool |
Ulf Magnusson | de42aea | 2020-02-07 00:48:22 +0100 | [diff] [blame] | 77 | select ARCH_IS_SET |
Andrew Boie | 6a1474e | 2016-07-15 13:15:00 -0700 | [diff] [blame] | 78 | select ATOMIC_OPERATIONS_BUILTIN |
Kumar Gala | 37f9113 | 2018-11-03 07:19:18 -0500 | [diff] [blame] | 79 | select HAS_DTS |
Daniel Leung | 8fbb14e | 2020-08-13 19:18:52 -0700 | [diff] [blame] | 80 | select ARCH_SUPPORTS_COREDUMP |
Andrew Boie | ff294e0 | 2020-06-12 16:50:16 -0700 | [diff] [blame] | 81 | select CPU_HAS_MMU |
Andrew Boie | d2a7227 | 2020-10-27 11:27:37 -0700 | [diff] [blame] | 82 | select ARCH_MEM_DOMAIN_DATA if USERSPACE && !X86_COMMON_PAGE_TABLE |
Andrew Boie | 00f71b0 | 2020-08-25 17:02:38 -0700 | [diff] [blame] | 83 | select ARCH_MEM_DOMAIN_SYNCHRONOUS_API if USERSPACE |
Flavio Ceolin | 5408f31 | 2020-05-21 16:55:28 -0700 | [diff] [blame] | 84 | select ARCH_HAS_GDBSTUB if !X86_64 |
Anas Nashif | 5dec235 | 2020-08-27 23:07:01 -0400 | [diff] [blame] | 85 | select ARCH_HAS_TIMING_FUNCTIONS |
Daniel Leung | 4b38392 | 2020-09-29 15:32:35 -0700 | [diff] [blame] | 86 | select ARCH_HAS_THREAD_LOCAL_STORAGE |
Andrew Boie | ed22064 | 2020-12-09 10:37:52 -0800 | [diff] [blame] | 87 | select ARCH_HAS_DEMAND_PAGING |
Andy Ross | 73453a3 | 2022-02-14 14:30:34 -0800 | [diff] [blame] | 88 | select IRQ_OFFLOAD_NESTED if IRQ_OFFLOAD |
Daniel Leung | 1eba354 | 2021-03-31 14:51:58 -0700 | [diff] [blame] | 89 | select NEED_LIBC_MEM_PARTITION if USERSPACE && TIMING_FUNCTIONS \ |
| 90 | && !BOARD_HAS_TIMING_FUNCTIONS \ |
| 91 | && !SOC_HAS_TIMING_FUNCTIONS |
Ulf Magnusson | c5839f8 | 2020-02-06 18:26:14 +0100 | [diff] [blame] | 92 | help |
| 93 | x86 architecture |
Anas Nashif | 77ba3c3 | 2015-10-09 06:20:52 -0400 | [diff] [blame] | 94 | |
Andrew Boie | 9433895 | 2016-04-21 14:47:09 -0700 | [diff] [blame] | 95 | config NIOS2 |
Ulf Magnusson | c5839f8 | 2020-02-06 18:26:14 +0100 | [diff] [blame] | 96 | bool |
Ulf Magnusson | de42aea | 2020-02-07 00:48:22 +0100 | [diff] [blame] | 97 | select ARCH_IS_SET |
Andrew Boie | 6a1474e | 2016-07-15 13:15:00 -0700 | [diff] [blame] | 98 | select ATOMIC_OPERATIONS_C |
Kumar Gala | 37f9113 | 2018-11-03 07:19:18 -0500 | [diff] [blame] | 99 | select HAS_DTS |
Anas Nashif | ce59510 | 2020-08-02 10:45:10 -0400 | [diff] [blame] | 100 | imply XIP |
Anas Nashif | 150c82c | 2020-08-27 23:16:48 -0400 | [diff] [blame] | 101 | select ARCH_HAS_TIMING_FUNCTIONS |
Ulf Magnusson | c5839f8 | 2020-02-06 18:26:14 +0100 | [diff] [blame] | 102 | help |
| 103 | Nios II Gen 2 architecture |
Andrew Boie | 9433895 | 2016-04-21 14:47:09 -0700 | [diff] [blame] | 104 | |
Nicolas Pitre | 1f4b5dd | 2019-07-17 13:17:05 -0400 | [diff] [blame] | 105 | config RISCV |
Ulf Magnusson | c5839f8 | 2020-02-06 18:26:14 +0100 | [diff] [blame] | 106 | bool |
Ulf Magnusson | de42aea | 2020-02-07 00:48:22 +0100 | [diff] [blame] | 107 | select ARCH_IS_SET |
Kumar Gala | 8ded3fb | 2018-11-02 13:29:59 -0500 | [diff] [blame] | 108 | select HAS_DTS |
Mark Holden | 1a697cc | 2021-11-12 13:21:43 -0800 | [diff] [blame] | 109 | select ARCH_SUPPORTS_COREDUMP |
Daniel Leung | 8a79ce1 | 2020-10-02 13:09:32 -0700 | [diff] [blame] | 110 | select ARCH_HAS_THREAD_LOCAL_STORAGE |
Nicolas Pitre | df852a0 | 2022-03-14 14:51:04 -0400 | [diff] [blame] | 111 | select IRQ_OFFLOAD_NESTED if IRQ_OFFLOAD |
Nicolas Pitre | ce8dabf | 2022-03-07 17:01:36 -0500 | [diff] [blame] | 112 | select USE_SWITCH_SUPPORTED |
| 113 | select USE_SWITCH |
Ederson de Souza | 2aab236 | 2022-01-05 14:33:11 -0800 | [diff] [blame] | 114 | select SCHED_IPI_SUPPORTED if SMP |
Anas Nashif | ce59510 | 2020-08-02 10:45:10 -0400 | [diff] [blame] | 115 | imply XIP |
Ulf Magnusson | c5839f8 | 2020-02-06 18:26:14 +0100 | [diff] [blame] | 116 | help |
| 117 | RISCV architecture |
Jean-Paul Etienne | cd83e85 | 2017-01-11 00:24:30 +0100 | [diff] [blame] | 118 | |
Mazen NEIFER | 1cded67 | 2017-01-13 12:14:33 +0100 | [diff] [blame] | 119 | config XTENSA |
Ulf Magnusson | c5839f8 | 2020-02-06 18:26:14 +0100 | [diff] [blame] | 120 | bool |
Ulf Magnusson | de42aea | 2020-02-07 00:48:22 +0100 | [diff] [blame] | 121 | select ARCH_IS_SET |
Kumar Gala | 31503a8 | 2019-02-01 07:52:05 -0600 | [diff] [blame] | 122 | select HAS_DTS |
Andrew Boie | 6fd6b7e | 2019-08-13 14:02:29 -0700 | [diff] [blame] | 123 | select USE_SWITCH |
| 124 | select USE_SWITCH_SUPPORTED |
Andy Ross | 73453a3 | 2022-02-14 14:30:34 -0800 | [diff] [blame] | 125 | select IRQ_OFFLOAD_NESTED if IRQ_OFFLOAD |
Andy Ross | 12eda76 | 2022-06-06 07:49:27 -0700 | [diff] [blame] | 126 | select ARCH_HAS_TIMING_FUNCTIONS |
Daniel Leung | 64e99df | 2021-04-01 11:35:31 -0700 | [diff] [blame] | 127 | imply ATOMIC_OPERATIONS_ARCH |
Ulf Magnusson | c5839f8 | 2020-02-06 18:26:14 +0100 | [diff] [blame] | 128 | help |
| 129 | Xtensa architecture |
Mazen NEIFER | 1cded67 | 2017-01-13 12:14:33 +0100 | [diff] [blame] | 130 | |
Alberto Escolar Piedras | 76f76441 | 2017-10-03 16:31:55 +0200 | [diff] [blame] | 131 | config ARCH_POSIX |
Ulf Magnusson | c5839f8 | 2020-02-06 18:26:14 +0100 | [diff] [blame] | 132 | bool |
Ulf Magnusson | de42aea | 2020-02-07 00:48:22 +0100 | [diff] [blame] | 133 | select ARCH_IS_SET |
Kumar Gala | cd88902 | 2020-04-03 14:08:58 -0500 | [diff] [blame] | 134 | select HAS_DTS |
Alberto Escolar Piedras | 76f76441 | 2017-10-03 16:31:55 +0200 | [diff] [blame] | 135 | select ATOMIC_OPERATIONS_BUILTIN |
| 136 | select ARCH_HAS_CUSTOM_SWAP_TO_MAIN |
| 137 | select ARCH_HAS_CUSTOM_BUSY_WAIT |
| 138 | select ARCH_HAS_THREAD_ABORT |
| 139 | select NATIVE_APPLICATION |
Alberto Escolar Piedras | 2cd70e6 | 2019-02-03 13:04:17 +0100 | [diff] [blame] | 140 | select HAS_COVERAGE_SUPPORT |
Ulf Magnusson | c5839f8 | 2020-02-06 18:26:14 +0100 | [diff] [blame] | 141 | help |
| 142 | POSIX (native) architecture |
Anas Nashif | 46f66f4 | 2017-09-08 21:14:06 -0400 | [diff] [blame] | 143 | |
Ulf Magnusson | de42aea | 2020-02-07 00:48:22 +0100 | [diff] [blame] | 144 | config ARCH_IS_SET |
| 145 | bool |
| 146 | help |
| 147 | Helper symbol to detect SoCs forgetting to select one of the arch |
| 148 | symbols above. See the top-level CMakeLists.txt. |
| 149 | |
Anas Nashif | 46f66f4 | 2017-09-08 21:14:06 -0400 | [diff] [blame] | 150 | menu "General Architecture Options" |
| 151 | |
Jordan Yates | 070422d | 2022-03-30 17:51:54 +1000 | [diff] [blame] | 152 | source "$(ARCH_DIR)/common/Kconfig" |
| 153 | |
Anas Nashif | 8e38670 | 2018-09-17 09:56:20 -0500 | [diff] [blame] | 154 | module = ARCH |
| 155 | module-str = arch |
| 156 | source "subsys/logging/Kconfig.template.log_config" |
| 157 | |
| 158 | module = MPU |
| 159 | module-str = mpu |
| 160 | source "subsys/logging/Kconfig.template.log_config" |
| 161 | |
Yasushi SHOJI | 6fc0d77 | 2018-10-09 18:59:16 +0900 | [diff] [blame] | 162 | config BIG_ENDIAN |
Ulf Magnusson | 975de21 | 2019-11-01 10:24:07 +0100 | [diff] [blame] | 163 | bool |
| 164 | help |
| 165 | This option tells the build system that the target system is big-endian. |
| 166 | Little-endian architecture is the default and should leave this option |
| 167 | unselected. This option is selected by arch/$ARCH/Kconfig, |
| 168 | soc/**/Kconfig, or boards/**/Kconfig and the user should generally avoid |
| 169 | modifying it. The option is used to select linker script OUTPUT_FORMAT |
| 170 | and command line option for gen_isr_tables.py. |
Yasushi SHOJI | 6fc0d77 | 2018-10-09 18:59:16 +0900 | [diff] [blame] | 171 | |
Nicolas Pitre | 9bd9b75 | 2019-05-17 15:15:24 -0400 | [diff] [blame] | 172 | config 64BIT |
| 173 | bool |
| 174 | help |
| 175 | This option tells the build system that the target system is |
| 176 | using a 64-bit address space, meaning that pointer and long types |
| 177 | are 64 bits wide. This option is selected by arch/$ARCH/Kconfig, |
| 178 | soc/**/Kconfig, or boards/**/Kconfig and the user should generally |
| 179 | avoid modifying it. |
| 180 | |
Kumar Gala | 8ce0cf0 | 2019-08-28 09:29:26 -0500 | [diff] [blame] | 181 | # Workaround for not being able to have commas in macro arguments |
| 182 | DT_CHOSEN_Z_SRAM := zephyr,sram |
| 183 | |
Kumar Gala | ce7ed18 | 2018-12-07 10:35:04 -0600 | [diff] [blame] | 184 | config SRAM_SIZE |
| 185 | int "SRAM Size in kB" |
Kumar Gala | 22e7449 | 2019-10-23 15:15:59 -0500 | [diff] [blame] | 186 | default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_SRAM),0,K) |
Kumar Gala | ce7ed18 | 2018-12-07 10:35:04 -0600 | [diff] [blame] | 187 | help |
Ulf Magnusson | def1f0e | 2019-12-26 16:08:19 +0100 | [diff] [blame] | 188 | The SRAM size in kB. The default value comes from /chosen/zephyr,sram in |
| 189 | devicetree. The user should generally avoid changing it via menuconfig or |
| 190 | in configuration files. |
Kumar Gala | ce7ed18 | 2018-12-07 10:35:04 -0600 | [diff] [blame] | 191 | |
| 192 | config SRAM_BASE_ADDRESS |
| 193 | hex "SRAM Base Address" |
Kumar Gala | 22e7449 | 2019-10-23 15:15:59 -0500 | [diff] [blame] | 194 | default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_SRAM)) |
Kumar Gala | ce7ed18 | 2018-12-07 10:35:04 -0600 | [diff] [blame] | 195 | help |
Ulf Magnusson | def1f0e | 2019-12-26 16:08:19 +0100 | [diff] [blame] | 196 | The SRAM base address. The default value comes from from |
| 197 | /chosen/zephyr,sram in devicetree. The user should generally avoid |
| 198 | changing it via menuconfig or in configuration files. |
| 199 | |
Carlo Caione | 3539c2f | 2021-03-25 11:56:15 +0100 | [diff] [blame] | 200 | if ARC || ARM || ARM64 || NIOS2 || X86 |
Kumar Gala | ce7ed18 | 2018-12-07 10:35:04 -0600 | [diff] [blame] | 201 | |
Kumar Gala | 8ce0cf0 | 2019-08-28 09:29:26 -0500 | [diff] [blame] | 202 | # Workaround for not being able to have commas in macro arguments |
| 203 | DT_CHOSEN_Z_FLASH := zephyr,flash |
| 204 | |
Kumar Gala | ce7ed18 | 2018-12-07 10:35:04 -0600 | [diff] [blame] | 205 | config FLASH_SIZE |
| 206 | int "Flash Size in kB" |
Carlo Caione | 3539c2f | 2021-03-25 11:56:15 +0100 | [diff] [blame] | 207 | default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_FLASH),0,K) if (XIP && (ARM ||ARM64)) || !ARM |
Kumar Gala | ce7ed18 | 2018-12-07 10:35:04 -0600 | [diff] [blame] | 208 | help |
| 209 | This option specifies the size of the flash in kB. It is normally set by |
| 210 | the board's defconfig file and the user should generally avoid modifying |
| 211 | it via the menu configuration. |
| 212 | |
| 213 | config FLASH_BASE_ADDRESS |
| 214 | hex "Flash Base Address" |
Carlo Caione | 3539c2f | 2021-03-25 11:56:15 +0100 | [diff] [blame] | 215 | default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH)) if (XIP && (ARM || ARM64)) || !ARM |
Kumar Gala | ce7ed18 | 2018-12-07 10:35:04 -0600 | [diff] [blame] | 216 | help |
Ioannis Glaropoulos | 0348c53 | 2019-02-12 15:16:16 +0100 | [diff] [blame] | 217 | This option specifies the base address of the flash on the board. It is |
Kumar Gala | ce7ed18 | 2018-12-07 10:35:04 -0600 | [diff] [blame] | 218 | normally set by the board's defconfig file and the user should generally |
| 219 | avoid modifying it via the menu configuration. |
| 220 | |
Carlo Caione | 3539c2f | 2021-03-25 11:56:15 +0100 | [diff] [blame] | 221 | endif # ARM || ARM64 || ARC || NIOS2 || X86 |
Kumar Gala | ce7ed18 | 2018-12-07 10:35:04 -0600 | [diff] [blame] | 222 | |
Ioannis Glaropoulos | 1cc66cf | 2018-10-12 09:27:28 +0200 | [diff] [blame] | 223 | if ARCH_HAS_TRUSTED_EXECUTION |
| 224 | |
| 225 | config TRUSTED_EXECUTION_SECURE |
| 226 | bool "Trusted Execution: Secure firmware image" |
| 227 | help |
| 228 | Select this option to enable building a Secure firmware |
| 229 | image for a platform that supports Trusted Execution. A |
| 230 | Secure firmware image will execute in Secure state. It may |
| 231 | allow the CPU to execute in Non-Secure (Normal) state. |
| 232 | Therefore, a Secure firmware image shall be able to |
| 233 | configure security attributions of CPU resources (memory |
| 234 | areas, peripherals, interrupts, etc.) as well as to handle |
| 235 | faults, related to security violations. It may optionally |
| 236 | allow certain functions to be called from the Non-Secure |
| 237 | (Normal) domain. |
| 238 | |
| 239 | config TRUSTED_EXECUTION_NONSECURE |
| 240 | depends on !TRUSTED_EXECUTION_SECURE |
| 241 | bool "Trusted Execution: Non-Secure firmware image" |
| 242 | help |
| 243 | Select this option to enable building a Non-Secure |
| 244 | firmware image for a platform that supports Trusted |
| 245 | Execution. A Non-Secure firmware image will execute |
| 246 | in Non-Secure (Normal) state. Therefore, it shall not |
| 247 | access CPU resources (memory areas, peripherals, |
| 248 | interrupts etc.) belonging to the Secure domain. |
| 249 | |
| 250 | endif # ARCH_HAS_TRUSTED_EXECUTION |
| 251 | |
Anas Nashif | 46f66f4 | 2017-09-08 21:14:06 -0400 | [diff] [blame] | 252 | config HW_STACK_PROTECTION |
| 253 | bool "Hardware Stack Protection" |
| 254 | depends on ARCH_HAS_STACK_PROTECTION |
| 255 | help |
Anas Nashif | 429c2a4 | 2017-12-13 10:08:21 -0500 | [diff] [blame] | 256 | Select this option to enable hardware-based platform features to |
| 257 | catch stack overflows when the system is running in privileged |
| 258 | mode. If CONFIG_USERSPACE is not enabled, the system is always |
| 259 | running in privileged mode. |
Andrew Boie | 2a8684f | 2017-11-06 11:42:54 -0800 | [diff] [blame] | 260 | |
Anas Nashif | 429c2a4 | 2017-12-13 10:08:21 -0500 | [diff] [blame] | 261 | Note that this does not necessarily prevent corruption and assertions |
| 262 | about the overall system state when a fault is triggered cannot be |
| 263 | made. |
Anas Nashif | 46f66f4 | 2017-09-08 21:14:06 -0400 | [diff] [blame] | 264 | |
Andrew Boie | 9f70c7b | 2017-09-11 10:34:49 -0700 | [diff] [blame] | 265 | config USERSPACE |
Andrew Boie | 53b5204 | 2019-01-18 11:41:06 -0800 | [diff] [blame] | 266 | bool "User mode threads" |
Andrew Boie | 9f70c7b | 2017-09-11 10:34:49 -0700 | [diff] [blame] | 267 | depends on ARCH_HAS_USERSPACE |
Anas Nashif | 22b95a2 | 2019-11-24 11:28:38 -0500 | [diff] [blame] | 268 | depends on RUNTIME_ERROR_CHECKS |
Andrew Boie | 5a58ad5 | 2020-11-05 14:30:20 -0800 | [diff] [blame] | 269 | depends on SRAM_REGION_PERMISSIONS |
Carlo Caione | d770880 | 2020-11-12 14:44:14 +0100 | [diff] [blame] | 270 | select THREAD_STACK_INFO |
Andrew Boie | 9f70c7b | 2017-09-11 10:34:49 -0700 | [diff] [blame] | 271 | help |
Anas Nashif | 429c2a4 | 2017-12-13 10:08:21 -0500 | [diff] [blame] | 272 | When enabled, threads may be created or dropped down to user mode, |
| 273 | which has significantly restricted permissions and must interact |
| 274 | with the kernel via system calls. See Zephyr documentation for more |
Dominik Ermel | 86a1252 | 2021-07-15 10:08:48 +0000 | [diff] [blame] | 275 | details about this feature. |
Andrew Boie | 9f70c7b | 2017-09-11 10:34:49 -0700 | [diff] [blame] | 276 | |
Anas Nashif | 429c2a4 | 2017-12-13 10:08:21 -0500 | [diff] [blame] | 277 | If a user thread overflows its stack, this will be caught and the |
| 278 | kernel itself will be shielded from harm. Enabling this option |
| 279 | may or may not catch stack overflows when the system is in |
| 280 | privileged mode or handling a system call; to ensure these are always |
| 281 | caught, enable CONFIG_HW_STACK_PROTECTION. |
Andrew Boie | 2a8684f | 2017-11-06 11:42:54 -0800 | [diff] [blame] | 282 | |
Chunlin Han | 18560a0 | 2018-02-01 01:19:49 -0600 | [diff] [blame] | 283 | config PRIVILEGED_STACK_SIZE |
| 284 | int "Size of privileged stack" |
Andrew Boie | 606e607 | 2019-03-28 16:48:43 -0700 | [diff] [blame] | 285 | default 1024 |
Chunlin Han | 18560a0 | 2018-02-01 01:19:49 -0600 | [diff] [blame] | 286 | depends on ARCH_HAS_USERSPACE |
| 287 | help |
Anas Nashif | 8949233 | 2018-02-15 07:36:16 -0600 | [diff] [blame] | 288 | This option sets the privileged stack region size that will be used |
| 289 | in addition to the user mode thread stack. During normal execution, |
| 290 | this region will be inaccessible from user mode. During system calls, |
Andrew Boie | 28be793 | 2020-03-11 10:56:19 -0700 | [diff] [blame] | 291 | this region will be utilized by the system call. This value must be |
| 292 | a multiple of the minimum stack alignment. |
Anas Nashif | eb29978 | 2018-10-07 11:41:18 -0400 | [diff] [blame] | 293 | |
| 294 | config KOBJECT_TEXT_AREA |
Daniel Leung | 1117169 | 2021-03-18 14:00:07 -0700 | [diff] [blame] | 295 | int "Size of kobject text area" |
Adithya Baglody | 71e90f9 | 2018-08-29 16:44:16 +0530 | [diff] [blame] | 296 | default 512 if COVERAGE_GCOV |
Sebastian Bøe | efc6d0a | 2019-03-15 10:54:06 +0100 | [diff] [blame] | 297 | default 512 if NO_OPTIMIZATIONS |
Alexandre Mergnat | 4b97619 | 2020-10-29 19:20:06 +0100 | [diff] [blame] | 298 | default 512 if STACK_CANARIES && RISCV |
Andrew Boie | 794d382 | 2019-02-20 14:49:36 -0800 | [diff] [blame] | 299 | default 256 |
Anas Nashif | eb29978 | 2018-10-07 11:41:18 -0400 | [diff] [blame] | 300 | depends on ARCH_HAS_USERSPACE |
| 301 | help |
| 302 | Size of kernel object text area. Used in linker script. |
| 303 | |
Daniel Leung | 1117169 | 2021-03-18 14:00:07 -0700 | [diff] [blame] | 304 | config KOBJECT_DATA_AREA_RESERVE_EXTRA_PERCENT |
| 305 | int "Reserve extra kobject data area (in percentage)" |
| 306 | default 100 |
| 307 | depends on ARCH_HAS_USERSPACE |
| 308 | help |
| 309 | Multiplication factor used to calculate the size of placeholder to |
| 310 | reserve space for kobject metadata hash table. The hash table is |
| 311 | generated via gperf is highly dependent on the absolute addresses of |
| 312 | kobjects which might change between prebuilts. To reserve enough |
| 313 | space for the hash table during final linking passes to keep |
| 314 | kobjects in same place, the size of reserved space is calculated |
| 315 | from the first prebuilt plus additional space calculated with |
| 316 | this percentage (of the kobject data area in first prebuilt). |
| 317 | |
| 318 | config KOBJECT_RODATA_AREA_EXTRA_BYTES |
| 319 | int "Reserve extra bytes for kobject rodata area" |
| 320 | default 16 |
| 321 | depends on ARCH_HAS_USERSPACE |
| 322 | help |
| 323 | Reserve a few more bytes for the RODATA region for kobject metadata. |
| 324 | This is to account for the uncertainty of tables generated by gperf. |
| 325 | |
Andrew Boie | 28be793 | 2020-03-11 10:56:19 -0700 | [diff] [blame] | 326 | config GEN_PRIV_STACKS |
| 327 | bool |
| 328 | help |
| 329 | Selected if the architecture requires that privilege elevation stacks |
| 330 | be allocated in a separate memory area. This is typical of arches |
| 331 | whose MPUs require regions to be power-of-two aligned/sized. |
| 332 | |
| 333 | FIXME: This should be removed and replaced with checks against |
| 334 | CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT, but both ARM and ARC |
| 335 | changes will be necessary for this. |
| 336 | |
Andrew Boie | a967915 | 2018-03-06 13:17:57 -0800 | [diff] [blame] | 337 | config STACK_GROWS_UP |
| 338 | bool "Stack grows towards higher memory addresses" |
Andrew Boie | a967915 | 2018-03-06 13:17:57 -0800 | [diff] [blame] | 339 | help |
| 340 | Select this option if the architecture has upward growing thread |
| 341 | stacks. This is not common. |
| 342 | |
Andrew Boie | efc5fe0 | 2020-02-05 10:41:58 -0800 | [diff] [blame] | 343 | config NO_UNUSED_STACK_INSPECTION |
| 344 | bool |
| 345 | help |
| 346 | Selected if the architecture will generate a fault if unused stack |
| 347 | memory is examined, which is the region between the current stack |
| 348 | pointer and the deepest available address in the current stack |
| 349 | region. |
| 350 | |
Andrew Boie | 9f70c7b | 2017-09-11 10:34:49 -0700 | [diff] [blame] | 351 | config MAX_THREAD_BYTES |
| 352 | int "Bytes to use when tracking object thread permissions" |
| 353 | default 2 |
| 354 | depends on USERSPACE |
| 355 | help |
Anas Nashif | 429c2a4 | 2017-12-13 10:08:21 -0500 | [diff] [blame] | 356 | Every kernel object will have an associated bitfield to store |
| 357 | thread permissions for that object. This controls the size of the |
| 358 | bitfield (in bytes) and imposes a limit on how many threads can |
| 359 | be created in the system. |
Andrew Boie | 9f70c7b | 2017-09-11 10:34:49 -0700 | [diff] [blame] | 360 | |
Andrew Boie | 31bdfc0 | 2017-11-08 16:38:03 -0800 | [diff] [blame] | 361 | config DYNAMIC_OBJECTS |
Andrew Boie | 97bf001 | 2018-04-24 17:01:37 -0700 | [diff] [blame] | 362 | bool "Allow kernel objects to be allocated at runtime" |
Andrew Boie | 31bdfc0 | 2017-11-08 16:38:03 -0800 | [diff] [blame] | 363 | depends on USERSPACE |
Andrew Boie | 31bdfc0 | 2017-11-08 16:38:03 -0800 | [diff] [blame] | 364 | help |
Ulf Magnusson | 975de21 | 2019-11-01 10:24:07 +0100 | [diff] [blame] | 365 | Enabling this option allows for kernel objects to be requested from |
| 366 | the calling thread's resource pool, at a slight cost in performance |
| 367 | due to the supplemental run-time tables required to validate such |
| 368 | objects. |
Andrew Boie | 97bf001 | 2018-04-24 17:01:37 -0700 | [diff] [blame] | 369 | |
Ulf Magnusson | 975de21 | 2019-11-01 10:24:07 +0100 | [diff] [blame] | 370 | Objects allocated in this way can be freed with a supervisor-only |
| 371 | API call, or when the number of references to that object drops to |
| 372 | zero. |
Andrew Boie | 31bdfc0 | 2017-11-08 16:38:03 -0800 | [diff] [blame] | 373 | |
Aurelien Jarno | 6fd1691 | 2018-11-07 23:40:43 +0100 | [diff] [blame] | 374 | config NOCACHE_MEMORY |
| 375 | bool "Support for uncached memory" |
Ulf Magnusson | 378d6b1 | 2020-02-09 22:26:07 +0100 | [diff] [blame] | 376 | depends on ARCH_HAS_NOCACHE_MEMORY_SUPPORT |
Aurelien Jarno | 6fd1691 | 2018-11-07 23:40:43 +0100 | [diff] [blame] | 377 | help |
| 378 | Add a "nocache" read-write memory section that is configured to |
| 379 | not be cached. This memory section can be used to perform DMA |
| 380 | transfers when cache coherence issues are not optimal or can not |
| 381 | be solved using cache maintenance operations. |
| 382 | |
Anas Nashif | 8379b7b | 2017-09-09 08:39:38 -0400 | [diff] [blame] | 383 | menu "Interrupt Configuration" |
Ulf Magnusson | 4171324 | 2019-12-21 08:17:02 +0100 | [diff] [blame] | 384 | |
Andrew Boie | ff6cce6 | 2018-10-30 16:53:56 -0700 | [diff] [blame] | 385 | config DYNAMIC_INTERRUPTS |
Gerard Marull-Paretas | 95fb0de | 2022-03-09 12:05:12 +0100 | [diff] [blame] | 386 | bool "Installation of IRQs at runtime" |
Andrew Boie | ff6cce6 | 2018-10-30 16:53:56 -0700 | [diff] [blame] | 387 | help |
| 388 | Enable installation of interrupts at runtime, which will move some |
| 389 | interrupt-related data structures to RAM instead of ROM, and |
| 390 | on some architectures increase code size. |
| 391 | |
Anas Nashif | 8379b7b | 2017-09-09 08:39:38 -0400 | [diff] [blame] | 392 | config GEN_ISR_TABLES |
Ulf Magnusson | 8cf8db3 | 2018-08-14 16:19:20 +0200 | [diff] [blame] | 393 | bool "Use generated IRQ tables" |
Anas Nashif | 8379b7b | 2017-09-09 08:39:38 -0400 | [diff] [blame] | 394 | help |
Anas Nashif | 429c2a4 | 2017-12-13 10:08:21 -0500 | [diff] [blame] | 395 | This option controls whether a platform uses the gen_isr_tables |
| 396 | script to generate its interrupt tables. This mechanism will create |
| 397 | an appropriate hardware vector table and/or software IRQ table. |
Anas Nashif | 8379b7b | 2017-09-09 08:39:38 -0400 | [diff] [blame] | 398 | |
| 399 | config GEN_IRQ_VECTOR_TABLE |
Ulf Magnusson | 8cf8db3 | 2018-08-14 16:19:20 +0200 | [diff] [blame] | 400 | bool "Generate an interrupt vector table" |
Anas Nashif | 8379b7b | 2017-09-09 08:39:38 -0400 | [diff] [blame] | 401 | default y |
| 402 | depends on GEN_ISR_TABLES |
| 403 | help |
Anas Nashif | 429c2a4 | 2017-12-13 10:08:21 -0500 | [diff] [blame] | 404 | This option controls whether a platform using gen_isr_tables |
| 405 | needs an interrupt vector table created. Only disable this if the |
| 406 | platform does not use a vector table at all, or requires the vector |
| 407 | table to be in a format that is not an array of function pointers |
| 408 | indexed by IRQ line. In the latter case, the vector table must be |
| 409 | supplied by the application or architecture code. |
Anas Nashif | 8379b7b | 2017-09-09 08:39:38 -0400 | [diff] [blame] | 410 | |
| 411 | config GEN_SW_ISR_TABLE |
Ulf Magnusson | 8cf8db3 | 2018-08-14 16:19:20 +0200 | [diff] [blame] | 412 | bool "Generate a software ISR table" |
Anas Nashif | 8379b7b | 2017-09-09 08:39:38 -0400 | [diff] [blame] | 413 | default y |
| 414 | depends on GEN_ISR_TABLES |
| 415 | help |
Anas Nashif | 429c2a4 | 2017-12-13 10:08:21 -0500 | [diff] [blame] | 416 | This option controls whether a platform using gen_isr_tables |
| 417 | needs a software ISR table table created. This is an array of struct |
| 418 | _isr_table_entry containing the interrupt service routine and supplied |
| 419 | parameter. |
Anas Nashif | 8379b7b | 2017-09-09 08:39:38 -0400 | [diff] [blame] | 420 | |
Yasushi SHOJI | 51bc0a0 | 2019-06-20 18:28:37 +0900 | [diff] [blame] | 421 | config ARCH_SW_ISR_TABLE_ALIGN |
| 422 | int "Alignment size of a software ISR table" |
| 423 | default 0 |
| 424 | depends on GEN_SW_ISR_TABLE |
| 425 | help |
| 426 | This option controls alignment size of generated |
| 427 | _sw_isr_table. Some architecture needs a software ISR table |
| 428 | to be aligned to architecture specific size. The default |
| 429 | size is 0 for no alignment. |
| 430 | |
Anas Nashif | 8379b7b | 2017-09-09 08:39:38 -0400 | [diff] [blame] | 431 | config GEN_IRQ_START_VECTOR |
| 432 | int |
| 433 | default 0 |
| 434 | depends on GEN_ISR_TABLES |
| 435 | help |
Anas Nashif | 429c2a4 | 2017-12-13 10:08:21 -0500 | [diff] [blame] | 436 | On some architectures, part of the vector table may be reserved for |
| 437 | system exceptions and is declared separately from the tables |
| 438 | created by gen_isr_tables.py. When creating these tables, this value |
| 439 | will be subtracted from CONFIG_NUM_IRQS to properly size them. |
| 440 | This is a hidden option which needs to be set per architecture and |
| 441 | left alone. |
Anas Nashif | 8379b7b | 2017-09-09 08:39:38 -0400 | [diff] [blame] | 442 | |
Anas Nashif | a372eae | 2017-11-23 12:05:55 -0500 | [diff] [blame] | 443 | config IRQ_OFFLOAD |
Gerard Marull-Paretas | 95fb0de | 2022-03-09 12:05:12 +0100 | [diff] [blame] | 444 | bool "IRQ offload" |
Andrew Boie | beba1e0 | 2019-11-07 10:33:09 -0800 | [diff] [blame] | 445 | depends on TEST |
Anas Nashif | a372eae | 2017-11-23 12:05:55 -0500 | [diff] [blame] | 446 | help |
| 447 | Enable irq_offload() API which allows functions to be synchronously |
Andrew Boie | beba1e0 | 2019-11-07 10:33:09 -0800 | [diff] [blame] | 448 | run in interrupt context. Only useful for test cases that need |
| 449 | to validate the correctness of kernel objects in IRQ context. |
Anas Nashif | a372eae | 2017-11-23 12:05:55 -0500 | [diff] [blame] | 450 | |
Andy Ross | 73453a3 | 2022-02-14 14:30:34 -0800 | [diff] [blame] | 451 | config IRQ_OFFLOAD_NESTED |
| 452 | bool "irq_offload() supports nested IRQs" |
| 453 | depends on IRQ_OFFLOAD |
| 454 | help |
| 455 | When set by the arch layer, indicates that irq_offload() may |
| 456 | legally be called in interrupt context to cause a |
| 457 | synchronous nested interrupt on the current CPU. Not all |
| 458 | hardware is capable. |
Chris Coleman | 99a268f | 2020-08-28 09:02:20 -0400 | [diff] [blame] | 459 | |
| 460 | config EXTRA_EXCEPTION_INFO |
| 461 | bool "Collect extra exception info" |
| 462 | depends on ARCH_HAS_EXTRA_EXCEPTION_INFO |
| 463 | help |
| 464 | This option enables the collection of extra information, such as |
| 465 | register state, when a fault occurs. This information can be useful |
| 466 | to collect for post-mortem analysis and debug of issues. |
| 467 | |
Anas Nashif | 8379b7b | 2017-09-09 08:39:38 -0400 | [diff] [blame] | 468 | endmenu # Interrupt configuration |
| 469 | |
Ioannis Glaropoulos | 20a9848 | 2020-10-21 15:48:41 +0200 | [diff] [blame] | 470 | config INIT_ARCH_HW_AT_BOOT |
| 471 | bool "Initialize internal architecture state at boot" |
| 472 | depends on ARCH_SUPPORTS_ARCH_HW_INIT |
| 473 | help |
| 474 | This option instructs Zephyr to force the initialization |
| 475 | of the internal architectural state (for example ARCH-level |
| 476 | HW registers and system control blocks) during boot to |
| 477 | the reset values as specified by the corresponding |
| 478 | architecture manual. The option is useful when the Zephyr |
| 479 | firmware image is chain-loaded, for example, by a debugger |
| 480 | or a bootloader, and we need to guarantee that the internal |
| 481 | states of the architecture core blocks are restored to the |
| 482 | reset values (as specified by the architecture). |
| 483 | |
| 484 | Note: the functionality is architecture-specific. For the |
| 485 | implementation details refer to each architecture where |
| 486 | this feature is supported. |
| 487 | |
Anas Nashif | 46f66f4 | 2017-09-08 21:14:06 -0400 | [diff] [blame] | 488 | endmenu |
| 489 | |
Anas Nashif | 8379b7b | 2017-09-09 08:39:38 -0400 | [diff] [blame] | 490 | # |
| 491 | # Architecture Capabilities |
| 492 | # |
Ulf Magnusson | 4171324 | 2019-12-21 08:17:02 +0100 | [diff] [blame] | 493 | |
Ioannis Glaropoulos | 4084242 | 2021-05-19 17:45:25 +0200 | [diff] [blame] | 494 | config ARCH_HAS_SINGLE_THREAD_SUPPORT |
| 495 | bool |
| 496 | |
Anas Nashif | 5dec235 | 2020-08-27 23:07:01 -0400 | [diff] [blame] | 497 | config ARCH_HAS_TIMING_FUNCTIONS |
| 498 | bool |
| 499 | |
Ioannis Glaropoulos | 1cc66cf | 2018-10-12 09:27:28 +0200 | [diff] [blame] | 500 | config ARCH_HAS_TRUSTED_EXECUTION |
| 501 | bool |
| 502 | |
Anas Nashif | 46f66f4 | 2017-09-08 21:14:06 -0400 | [diff] [blame] | 503 | config ARCH_HAS_STACK_PROTECTION |
| 504 | bool |
| 505 | |
Andrew Boie | 9f70c7b | 2017-09-11 10:34:49 -0700 | [diff] [blame] | 506 | config ARCH_HAS_USERSPACE |
| 507 | bool |
| 508 | |
Leandro Pereira | b007b64 | 2017-10-17 17:01:48 -0700 | [diff] [blame] | 509 | config ARCH_HAS_EXECUTABLE_PAGE_BIT |
| 510 | bool |
| 511 | |
Aurelien Jarno | 6fd1691 | 2018-11-07 23:40:43 +0100 | [diff] [blame] | 512 | config ARCH_HAS_NOCACHE_MEMORY_SUPPORT |
| 513 | bool |
| 514 | |
Aurelien Jarno | 992f29a | 2019-02-10 11:05:51 +0100 | [diff] [blame] | 515 | config ARCH_HAS_RAMFUNC_SUPPORT |
| 516 | bool |
| 517 | |
Ioannis Glaropoulos | f030608 | 2019-10-17 19:13:12 +0200 | [diff] [blame] | 518 | config ARCH_HAS_NESTED_EXCEPTION_DETECTION |
| 519 | bool |
| 520 | |
Daniel Leung | 49206a8 | 2020-08-07 10:47:37 -0700 | [diff] [blame] | 521 | config ARCH_SUPPORTS_COREDUMP |
| 522 | bool |
| 523 | |
Ioannis Glaropoulos | 20a9848 | 2020-10-21 15:48:41 +0200 | [diff] [blame] | 524 | config ARCH_SUPPORTS_ARCH_HW_INIT |
| 525 | bool |
| 526 | |
Chris Coleman | 99a268f | 2020-08-28 09:02:20 -0400 | [diff] [blame] | 527 | config ARCH_HAS_EXTRA_EXCEPTION_INFO |
| 528 | bool |
| 529 | |
Flavio Ceolin | 5408f31 | 2020-05-21 16:55:28 -0700 | [diff] [blame] | 530 | config ARCH_HAS_GDBSTUB |
| 531 | bool |
| 532 | |
Andy Ross | f6d32ab | 2020-05-13 15:34:04 +0000 | [diff] [blame] | 533 | config ARCH_HAS_COHERENCE |
| 534 | bool |
| 535 | help |
| 536 | When selected, the architecture supports the |
| 537 | arch_mem_coherent() API and can link into incoherent/cached |
| 538 | memory using the ".cached" linker section. |
| 539 | |
Daniel Leung | 240beb4 | 2020-09-28 11:03:52 -0700 | [diff] [blame] | 540 | config ARCH_HAS_THREAD_LOCAL_STORAGE |
| 541 | bool |
| 542 | |
Ramesh Thomas | bb19e6f | 2016-03-18 16:43:40 -0700 | [diff] [blame] | 543 | # |
Anas Nashif | f4ddb62 | 2017-12-05 09:07:39 -0500 | [diff] [blame] | 544 | # Other architecture related options |
| 545 | # |
| 546 | |
| 547 | config ARCH_HAS_THREAD_ABORT |
| 548 | bool |
| 549 | |
Ulf Magnusson | 4171324 | 2019-12-21 08:17:02 +0100 | [diff] [blame] | 550 | # |
| 551 | # Hidden CPU family configs |
Anas Nashif | 9c1da0d | 2017-11-23 17:43:54 -0500 | [diff] [blame] | 552 | # |
| 553 | |
Ioannis Glaropoulos | 1cc66cf | 2018-10-12 09:27:28 +0200 | [diff] [blame] | 554 | config CPU_HAS_TEE |
| 555 | bool |
| 556 | help |
| 557 | This option is enabled when the CPU has support for Trusted |
| 558 | Execution Environment (e.g. when it has a security attribution |
| 559 | unit). |
| 560 | |
Stephanos Ioannidis | bc8524e | 2019-10-09 00:52:18 +0900 | [diff] [blame] | 561 | config CPU_HAS_DCLS |
| 562 | bool |
| 563 | help |
| 564 | This option is enabled when the processor hardware is configured in |
| 565 | Dual-redundant Core Lock-step (DCLS) topology. |
| 566 | |
Anas Nashif | 9c1da0d | 2017-11-23 17:43:54 -0500 | [diff] [blame] | 567 | config CPU_HAS_FPU |
| 568 | bool |
Anas Nashif | 9c1da0d | 2017-11-23 17:43:54 -0500 | [diff] [blame] | 569 | help |
| 570 | This option is enabled when the CPU has hardware floating point |
| 571 | unit. |
| 572 | |
Corey Wharton | c8f7cd5 | 2020-04-14 11:06:23 -0700 | [diff] [blame] | 573 | config CPU_HAS_FPU_DOUBLE_PRECISION |
| 574 | bool |
| 575 | select CPU_HAS_FPU |
| 576 | help |
| 577 | When enabled, this indicates that the CPU has a double floating point |
| 578 | precision unit. |
| 579 | |
Anas Nashif | 9c1da0d | 2017-11-23 17:43:54 -0500 | [diff] [blame] | 580 | config CPU_HAS_MPU |
| 581 | bool |
Anas Nashif | 9c1da0d | 2017-11-23 17:43:54 -0500 | [diff] [blame] | 582 | help |
| 583 | This option is enabled when the CPU has a Memory Protection Unit (MPU). |
| 584 | |
Andrew Boie | ff294e0 | 2020-06-12 16:50:16 -0700 | [diff] [blame] | 585 | config CPU_HAS_MMU |
| 586 | bool |
| 587 | help |
| 588 | This hidden option is selected when the CPU has a Memory Management Unit |
| 589 | (MMU). |
Andrew Boie | 5a58ad5 | 2020-11-05 14:30:20 -0800 | [diff] [blame] | 590 | |
Andrew Boie | 56a9e7b | 2020-11-16 11:30:35 -0800 | [diff] [blame] | 591 | config ARCH_HAS_DEMAND_PAGING |
| 592 | bool |
| 593 | help |
| 594 | This hidden configuration should be selected by the architecture if |
| 595 | demand paging is supported. |
| 596 | |
Andrew Boie | 73a3e05 | 2020-11-18 13:11:56 -0800 | [diff] [blame] | 597 | config ARCH_HAS_RESERVED_PAGE_FRAMES |
| 598 | bool |
| 599 | help |
| 600 | This hidden configuration should be selected by the architecture if |
| 601 | certain RAM page frames need to be marked as reserved and never used for |
| 602 | memory mappings. The architecture will need to implement |
| 603 | arch_reserved_pages_update(). |
| 604 | |
Andrew Boie | 14c5d1f | 2021-01-23 14:08:12 -0800 | [diff] [blame] | 605 | config ARCH_MAPS_ALL_RAM |
| 606 | bool |
| 607 | help |
| 608 | This hidden option is selected by the architecture to inform the kernel |
| 609 | that all RAM is mapped at boot, and not just the bounds of the Zephyr image. |
| 610 | If RAM starts at 0x0, the first page must remain un-mapped to catch NULL |
| 611 | pointer dereferences. With this enabled, the kernel will not assume that |
| 612 | virtual memory addresses past the kernel image are available for mappings, |
| 613 | but instead takes into account an entire RAM mapping instead. |
| 614 | |
| 615 | This is typically set by architectures which need direct access to all memory. |
| 616 | It is the architecture's responsibility to mark reserved memory regions |
| 617 | as such in arch_reserved_pages_update(). |
| 618 | |
| 619 | Although the kernel will not disturb this RAM mapping by re-mapping the associated |
| 620 | virtual addresses elsewhere, this is limited to only management of the |
| 621 | virtual address space. The kernel's page frame ontology will not consider |
| 622 | this mapping at all; non-kernel pages will be considered free (unless marked |
| 623 | as reserved) and Z_PAGE_FRAME_MAPPED will not be set. |
| 624 | |
Andrew Boie | 5a58ad5 | 2020-11-05 14:30:20 -0800 | [diff] [blame] | 625 | menuconfig MPU |
Gerard Marull-Paretas | 95fb0de | 2022-03-09 12:05:12 +0100 | [diff] [blame] | 626 | bool "MPU features" |
Andrew Boie | 5a58ad5 | 2020-11-05 14:30:20 -0800 | [diff] [blame] | 627 | depends on CPU_HAS_MPU |
Ioannis Glaropoulos | 39bf24a | 2018-11-27 15:45:36 +0100 | [diff] [blame] | 628 | help |
Andrew Boie | 5a58ad5 | 2020-11-05 14:30:20 -0800 | [diff] [blame] | 629 | This option, when enabled, indicates to the core kernel that an MPU |
| 630 | is enabled. |
Ioannis Glaropoulos | 39bf24a | 2018-11-27 15:45:36 +0100 | [diff] [blame] | 631 | |
Andrew Boie | 5a58ad5 | 2020-11-05 14:30:20 -0800 | [diff] [blame] | 632 | if MPU |
Andy Gross | e8860fe | 2018-02-01 01:12:32 -0600 | [diff] [blame] | 633 | config MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT |
| 634 | bool |
Andy Gross | e8860fe | 2018-02-01 01:12:32 -0600 | [diff] [blame] | 635 | help |
Anas Nashif | 8949233 | 2018-02-15 07:36:16 -0600 | [diff] [blame] | 636 | This option is enabled when the MPU requires a power of two alignment |
| 637 | and size for MPU regions. |
Andy Gross | e8860fe | 2018-02-01 01:12:32 -0600 | [diff] [blame] | 638 | |
Ioannis Glaropoulos | afa7819 | 2018-09-25 14:05:56 +0200 | [diff] [blame] | 639 | config MPU_REQUIRES_NON_OVERLAPPING_REGIONS |
| 640 | bool |
Ioannis Glaropoulos | afa7819 | 2018-09-25 14:05:56 +0200 | [diff] [blame] | 641 | help |
| 642 | This option is enabled when the MPU requires the active (i.e. enabled) |
| 643 | MPU regions to be non-overlapping with each other. |
Andy Gross | e8860fe | 2018-02-01 01:12:32 -0600 | [diff] [blame] | 644 | |
Ioannis Glaropoulos | 6d78951 | 2019-10-24 15:17:09 +0200 | [diff] [blame] | 645 | config MPU_GAP_FILLING |
| 646 | bool "Force MPU to be filling in background memory regions" |
| 647 | depends on MPU_REQUIRES_NON_OVERLAPPING_REGIONS |
Ioannis Glaropoulos | 9820122 | 2019-11-11 12:46:31 +0100 | [diff] [blame] | 648 | default y if !USERSPACE |
Ioannis Glaropoulos | 6d78951 | 2019-10-24 15:17:09 +0200 | [diff] [blame] | 649 | help |
| 650 | This Kconfig option instructs the MPU driver to enforce |
| 651 | a full kernel SRAM partitioning, when it programs the |
| 652 | dynamic MPU regions (user thread stack, PRIV stack guard |
| 653 | and application memory domains) during context-switch. We |
| 654 | allow this to be a configurable option, in order to be able |
| 655 | to switch the option off and have an increased number of MPU |
| 656 | regions available for application memory domain programming. |
| 657 | |
| 658 | Notes: |
| 659 | An increased number of MPU regions should only be required, |
Ioannis Glaropoulos | 9820122 | 2019-11-11 12:46:31 +0100 | [diff] [blame] | 660 | when building with USERSPACE support. As a result, when we |
| 661 | build without USERSPACE support, gap filling should always |
| 662 | be required. |
Ioannis Glaropoulos | 6d78951 | 2019-10-24 15:17:09 +0200 | [diff] [blame] | 663 | |
| 664 | When the option is switched off, access to memory areas not |
| 665 | covered by explicit MPU regions is restricted to privileged |
| 666 | code on an ARCH-specific basis. Refer to ARCH-specific |
| 667 | documentation for more information on how this option is |
| 668 | used. |
| 669 | |
Andrew Boie | 5a58ad5 | 2020-11-05 14:30:20 -0800 | [diff] [blame] | 670 | endif # MPU |
| 671 | |
| 672 | config SRAM_REGION_PERMISSIONS |
| 673 | bool "Assign appropriate permissions to kernel areas in SRAM" |
| 674 | depends on MMU || MPU |
| 675 | default y |
| 676 | help |
| 677 | This option indicates that memory protection hardware |
| 678 | is present, enabled, and regions have been configured at boot for memory |
| 679 | ranges within the kernel image. |
| 680 | |
| 681 | If this option is turned on, certain areas of the kernel image will |
| 682 | have the following access policies applied for all threads, including |
| 683 | supervisor threads: |
| 684 | |
| 685 | 1) All program text will be have read-only, execute memory permission |
| 686 | 2) All read-only data will have read-only permission, and execution |
| 687 | disabled if the hardware supports it. |
| 688 | 3) All other RAM addresses will have read-write permission, and |
| 689 | execution disabled if the hardware supports it. |
| 690 | |
| 691 | Options such as USERSPACE or HW_STACK_PROTECTION may additionally |
| 692 | impose additional policies on the memory map, which may be global |
| 693 | or local to the current running thread. |
| 694 | |
| 695 | This option may consume additional memory to satisfy memory protection |
| 696 | hardware alignment constraints. |
| 697 | |
| 698 | If this option is disabled, the entire kernel will have default memory |
| 699 | access permissions set, typically read/write/execute. It may be desirable |
| 700 | to turn this off on MMU systems which are using the MMU for demand |
| 701 | paging, do not need memory protection, and would rather not use up |
| 702 | RAM for the alignment between regions. |
| 703 | |
Stephanos Ioannidis | 4f4e85c | 2020-04-24 14:06:37 +0900 | [diff] [blame] | 704 | menu "Floating Point Options" |
| 705 | |
| 706 | config FPU |
Gerard Marull-Paretas | 95fb0de | 2022-03-09 12:05:12 +0100 | [diff] [blame] | 707 | bool "Floating point unit (FPU)" |
Sebastian Bøe | 7201a1b | 2018-12-27 16:13:25 +0100 | [diff] [blame] | 708 | depends on CPU_HAS_FPU |
Anas Nashif | 9c1da0d | 2017-11-23 17:43:54 -0500 | [diff] [blame] | 709 | help |
Stephanos Ioannidis | 4f4e85c | 2020-04-24 14:06:37 +0900 | [diff] [blame] | 710 | This option enables the hardware Floating Point Unit (FPU), in order to |
| 711 | support using the floating point registers and instructions. |
Anas Nashif | 9c1da0d | 2017-11-23 17:43:54 -0500 | [diff] [blame] | 712 | |
Stephanos Ioannidis | 4f4e85c | 2020-04-24 14:06:37 +0900 | [diff] [blame] | 713 | When this option is enabled, by default, threads may use the floating |
| 714 | point registers only in an exclusive manner, and this usually means that |
| 715 | only one thread may perform floating point operations. |
| 716 | |
| 717 | If it is necessary for multiple threads to perform concurrent floating |
| 718 | point operations, the "FPU register sharing" option must be enabled to |
| 719 | preserve the floating point registers across context switches. |
| 720 | |
| 721 | Note that this option cannot be selected for the platforms that do not |
| 722 | include a hardware floating point unit; the floating point support for |
| 723 | those platforms is dependent on the availability of the toolchain- |
| 724 | provided software floating point library. |
Anas Nashif | 9c1da0d | 2017-11-23 17:43:54 -0500 | [diff] [blame] | 725 | |
Stephanos Ioannidis | aaf9320 | 2020-05-03 18:03:19 +0900 | [diff] [blame] | 726 | config FPU_SHARING |
Stephanos Ioannidis | 4f4e85c | 2020-04-24 14:06:37 +0900 | [diff] [blame] | 727 | bool "FPU register sharing" |
Ioannis Glaropoulos | 86c1b57 | 2021-01-27 14:24:59 +0100 | [diff] [blame] | 728 | depends on FPU && MULTITHREADING |
Anas Nashif | 9c1da0d | 2017-11-23 17:43:54 -0500 | [diff] [blame] | 729 | help |
Stephanos Ioannidis | 4f4e85c | 2020-04-24 14:06:37 +0900 | [diff] [blame] | 730 | This option enables preservation of the hardware floating point registers |
| 731 | across context switches to allow multiple threads to perform concurrent |
| 732 | floating point operations. |
| 733 | |
Nicolas Pitre | 949ef7c | 2021-04-07 21:41:06 -0400 | [diff] [blame] | 734 | Note that some compiler configurations may activate a floating point |
| 735 | context by generating FP instructions for any thread, and that |
| 736 | context must be preserved when switching such threads in and out. |
| 737 | The developers can still disable the FP sharing mode in their |
| 738 | application projects, and switch to Unshared FP registers mode, |
| 739 | if it is guaranteed that the image code does not generate FP |
| 740 | instructions outside the single thread context that is allowed |
| 741 | to do so. |
Ioannis Glaropoulos | 86c1b57 | 2021-01-27 14:24:59 +0100 | [diff] [blame] | 742 | |
Stephanos Ioannidis | 4f4e85c | 2020-04-24 14:06:37 +0900 | [diff] [blame] | 743 | endmenu |
Anas Nashif | 9c1da0d | 2017-11-23 17:43:54 -0500 | [diff] [blame] | 744 | |
Carlo Caione | 923b3be | 2020-12-02 13:05:37 +0100 | [diff] [blame] | 745 | menu "Cache Options" |
| 746 | |
Lukasz Majewski | f4f9a82 | 2022-04-08 12:29:28 +0200 | [diff] [blame] | 747 | config DCACHE |
| 748 | bool "Data cache support" |
| 749 | default y |
| 750 | help |
| 751 | This option enables data cache (d-cache). |
| 752 | |
Carlo Caione | 20f59c8 | 2020-12-03 10:49:00 +0100 | [diff] [blame] | 753 | config CACHE_MANAGEMENT |
Gerard Marull-Paretas | 95fb0de | 2022-03-09 12:05:12 +0100 | [diff] [blame] | 754 | bool "Cache management features" |
Carlo Caione | 923b3be | 2020-12-02 13:05:37 +0100 | [diff] [blame] | 755 | help |
Carlo Caione | 20f59c8 | 2020-12-03 10:49:00 +0100 | [diff] [blame] | 756 | This links in the cache management functions (for d-cache and i-cache |
| 757 | where possible). |
Carlo Caione | 923b3be | 2020-12-02 13:05:37 +0100 | [diff] [blame] | 758 | |
Carlo Caione | e77c841 | 2020-12-02 12:38:58 +0100 | [diff] [blame] | 759 | config DCACHE_LINE_SIZE_DETECT |
| 760 | bool "Detect d-cache line size at runtime" |
| 761 | depends on CACHE_MANAGEMENT |
| 762 | help |
| 763 | This option enables querying some architecture-specific hardware for |
| 764 | finding the d-cache line size at the expense of taking more memory and |
| 765 | code and a slightly increased boot time. |
| 766 | |
| 767 | If the CPU's d-cache line size is known in advance, disable this option and |
| 768 | manually enter the value for DCACHE_LINE_SIZE or set it in the DT |
| 769 | using the 'd-cache-line-size' property. |
| 770 | |
| 771 | config DCACHE_LINE_SIZE |
| 772 | int "d-cache line size" if !DCACHE_LINE_SIZE_DETECT |
| 773 | depends on CACHE_MANAGEMENT |
| 774 | default 0 |
| 775 | help |
| 776 | Size in bytes of a CPU d-cache line. If this is set to 0 the value is |
| 777 | obtained from the 'd-cache-line-size' DT property instead if present. |
| 778 | |
| 779 | |
| 780 | Detect automatically at runtime by selecting DCACHE_LINE_SIZE_DETECT. |
| 781 | |
| 782 | config ICACHE_LINE_SIZE_DETECT |
| 783 | bool "Detect i-cache line size at runtime" |
| 784 | depends on CACHE_MANAGEMENT |
| 785 | help |
| 786 | This option enables querying some architecture-specific hardware for |
| 787 | finding the i-cache line size at the expense of taking more memory and |
| 788 | code and a slightly increased boot time. |
| 789 | |
| 790 | If the CPU's i-cache line size is known in advance, disable this option and |
| 791 | manually enter the value for ICACHE_LINE_SIZE or set it in the DT |
| 792 | using the 'i-cache-line-size' property. |
| 793 | |
| 794 | config ICACHE_LINE_SIZE |
| 795 | int "i-cache line size" if !ICACHE_LINE_SIZE_DETECT |
| 796 | depends on CACHE_MANAGEMENT |
| 797 | default 0 |
| 798 | help |
| 799 | Size in bytes of a CPU i-cache line. If this is set to 0 the value is |
| 800 | obtained from the 'i-cache-line-size' DT property instead if present. |
| 801 | |
| 802 | Detect automatically at runtime by selecting ICACHE_LINE_SIZE_DETECT. |
| 803 | |
Dylan Hung | b61ea62 | 2021-07-13 15:20:47 +0800 | [diff] [blame] | 804 | choice CACHE_TYPE |
Carlo Caione | e233326 | 2021-04-28 10:38:27 +0200 | [diff] [blame] | 805 | prompt "Cache type" |
| 806 | depends on CACHE_MANAGEMENT |
| 807 | default HAS_ARCH_CACHE |
| 808 | |
| 809 | config HAS_ARCH_CACHE |
| 810 | bool "Integrated cache controller" |
| 811 | help |
Nazar Kazakov | f483b1b | 2022-03-16 21:07:43 +0000 | [diff] [blame] | 812 | "Integrated on-core cache controller" |
Carlo Caione | e233326 | 2021-04-28 10:38:27 +0200 | [diff] [blame] | 813 | |
| 814 | config HAS_EXTERNAL_CACHE |
| 815 | bool "External cache controller" |
| 816 | help |
| 817 | "External cache controller or cache management system" |
| 818 | |
| 819 | endchoice |
| 820 | |
Carlo Caione | 923b3be | 2020-12-02 13:05:37 +0100 | [diff] [blame] | 821 | endmenu |
| 822 | |
Anas Nashif | 77ba3c3 | 2015-10-09 06:20:52 -0400 | [diff] [blame] | 823 | config ARCH |
| 824 | string |
| 825 | help |
Anas Nashif | 429c2a4 | 2017-12-13 10:08:21 -0500 | [diff] [blame] | 826 | System architecture string. |
Anas Nashif | 77ba3c3 | 2015-10-09 06:20:52 -0400 | [diff] [blame] | 827 | |
| 828 | config SOC |
Anas Nashif | a02c34e | 2016-03-31 08:07:42 -0400 | [diff] [blame] | 829 | string |
| 830 | help |
Anas Nashif | 5744437 | 2018-09-03 15:44:13 -0500 | [diff] [blame] | 831 | SoC name which can be found under soc/<arch>/<soc name>. |
Anas Nashif | 429c2a4 | 2017-12-13 10:08:21 -0500 | [diff] [blame] | 832 | This option holds the directory name used by the build system to locate |
Marti Bolivar | 5ec7ed8 | 2018-11-21 14:42:47 -0500 | [diff] [blame] | 833 | the correct linker and header files for the SoC. |
Anas Nashif | a02c34e | 2016-03-31 08:07:42 -0400 | [diff] [blame] | 834 | |
| 835 | config SOC_SERIES |
| 836 | string |
| 837 | help |
Anas Nashif | 5744437 | 2018-09-03 15:44:13 -0500 | [diff] [blame] | 838 | SoC series name which can be found under soc/<arch>/<family>/<series>. |
Anas Nashif | 429c2a4 | 2017-12-13 10:08:21 -0500 | [diff] [blame] | 839 | This option holds the directory name used by the build system to locate |
| 840 | the correct linker and header files. |
Anas Nashif | a02c34e | 2016-03-31 08:07:42 -0400 | [diff] [blame] | 841 | |
| 842 | config SOC_FAMILY |
| 843 | string |
| 844 | help |
Anas Nashif | 5744437 | 2018-09-03 15:44:13 -0500 | [diff] [blame] | 845 | SoC family name which can be found under soc/<arch>/<family>. |
Anas Nashif | 429c2a4 | 2017-12-13 10:08:21 -0500 | [diff] [blame] | 846 | This option holds the directory name used by the build system to locate |
| 847 | the correct linker and header files. |
Anas Nashif | 6623311 | 2015-11-29 19:47:21 -0500 | [diff] [blame] | 848 | |
Daniel Leung | 783b207 | 2021-04-23 20:52:38 -0700 | [diff] [blame] | 849 | config TOOLCHAIN_HAS_BUILTIN_FFS |
| 850 | bool |
| 851 | default y if !(64BIT && RISCV) |
| 852 | help |
| 853 | Hidden option to signal that toolchain has __builtin_ffs*(). |