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