Juan Manuel Cruz | d15251f | 2015-05-20 11:40:39 -0500 | [diff] [blame] | 1 | # Kconfig - general architecture configuration options |
| 2 | |
| 3 | # |
| 4 | # Copyright (c) 2014-2015 Wind River Systems, Inc. |
| 5 | # Copyright (c) 2015 Intel Corporation |
Mazen NEIFER | 1cded67 | 2017-01-13 12:14:33 +0100 | [diff] [blame] | 6 | # Copyright (c) 2016 Cadence Design Systems, Inc. |
Juan Manuel Cruz | d15251f | 2015-05-20 11:40:39 -0500 | [diff] [blame] | 7 | # |
David B. Kinder | ac74d8b | 2017-01-18 17:01:01 -0800 | [diff] [blame] | 8 | # SPDX-License-Identifier: Apache-2.0 |
Juan Manuel Cruz | d15251f | 2015-05-20 11:40:39 -0500 | [diff] [blame] | 9 | # |
| 10 | |
| 11 | |
Anas Nashif | 77ba3c3 | 2015-10-09 06:20:52 -0400 | [diff] [blame] | 12 | choice |
| 13 | prompt "Architecture" |
| 14 | default X86 |
| 15 | |
| 16 | config ARC |
| 17 | bool "ARC architecture" |
| 18 | |
| 19 | config ARM |
| 20 | bool "ARM architecture" |
| 21 | |
| 22 | config X86 |
| 23 | bool "x86 architecture" |
Andrew Boie | 6a1474e | 2016-07-15 13:15:00 -0700 | [diff] [blame] | 24 | select ATOMIC_OPERATIONS_BUILTIN |
Anas Nashif | 77ba3c3 | 2015-10-09 06:20:52 -0400 | [diff] [blame] | 25 | |
Andrew Boie | 9433895 | 2016-04-21 14:47:09 -0700 | [diff] [blame] | 26 | config NIOS2 |
| 27 | bool "Nios II Gen 2 architecture" |
Andrew Boie | 6a1474e | 2016-07-15 13:15:00 -0700 | [diff] [blame] | 28 | select ATOMIC_OPERATIONS_C |
Andrew Boie | 9433895 | 2016-04-21 14:47:09 -0700 | [diff] [blame] | 29 | |
Jean-Paul Etienne | cd83e85 | 2017-01-11 00:24:30 +0100 | [diff] [blame] | 30 | config RISCV32 |
| 31 | bool "RISCV32 architecture" |
| 32 | |
Mazen NEIFER | 1cded67 | 2017-01-13 12:14:33 +0100 | [diff] [blame] | 33 | config XTENSA |
| 34 | bool "Xtensa architecture" |
| 35 | |
Anas Nashif | 77ba3c3 | 2015-10-09 06:20:52 -0400 | [diff] [blame] | 36 | endchoice |
| 37 | |
Anas Nashif | 46f66f4 | 2017-09-08 21:14:06 -0400 | [diff] [blame] | 38 | |
| 39 | menu "General Architecture Options" |
| 40 | |
| 41 | config HW_STACK_PROTECTION |
| 42 | bool "Hardware Stack Protection" |
| 43 | depends on ARCH_HAS_STACK_PROTECTION |
| 44 | help |
Andrew Boie | 2a8684f | 2017-11-06 11:42:54 -0800 | [diff] [blame] | 45 | Select this option to enable hardware-based platform features to |
| 46 | catch stack overflows when the system is running in privileged |
| 47 | mode. If CONFIG_USERSPACE is not enabled, the system is always |
| 48 | running in privileged mode. |
| 49 | |
David B. Kinder | 7e3ed14 | 2017-11-08 10:35:48 -0800 | [diff] [blame] | 50 | Note that this does not necessarily prevent corruption and assertions |
Andrew Boie | 2a8684f | 2017-11-06 11:42:54 -0800 | [diff] [blame] | 51 | about the overall system state when a fault is triggered cannot be |
| 52 | made. |
Anas Nashif | 46f66f4 | 2017-09-08 21:14:06 -0400 | [diff] [blame] | 53 | |
Andrew Boie | 9f70c7b | 2017-09-11 10:34:49 -0700 | [diff] [blame] | 54 | config USERSPACE |
Andrew Boie | da4024b | 2017-10-13 13:03:32 -0700 | [diff] [blame] | 55 | bool "User mode threads (EXPERIMENTAL)" |
Andrew Boie | 9f70c7b | 2017-09-11 10:34:49 -0700 | [diff] [blame] | 56 | depends on ARCH_HAS_USERSPACE |
Andrew Boie | 9f70c7b | 2017-09-11 10:34:49 -0700 | [diff] [blame] | 57 | help |
| 58 | When enabled, threads may be created or dropped down to user mode, |
| 59 | which has significantly restricted permissions and must interact |
| 60 | with the kernel via system calls. See Zephyr documentation for more |
| 61 | details about this feature. |
| 62 | |
Andrew Boie | 2a8684f | 2017-11-06 11:42:54 -0800 | [diff] [blame] | 63 | If a user thread overflows its stack, this will be caught and the |
| 64 | kernel itself will be shielded from harm. Enabling this option |
| 65 | may or may not catch stack overflows when the system is in |
| 66 | privileged mode or handling a system call; to ensure these are always |
| 67 | caught, enable CONFIG_HW_STACK_PROTECTION. |
| 68 | |
Andrew Boie | da4024b | 2017-10-13 13:03:32 -0700 | [diff] [blame] | 69 | This feature is under heavy development and APIs related to it are |
| 70 | subject to change, even if declared non-private. |
| 71 | |
Andrew Boie | 9f70c7b | 2017-09-11 10:34:49 -0700 | [diff] [blame] | 72 | config MAX_THREAD_BYTES |
| 73 | int "Bytes to use when tracking object thread permissions" |
| 74 | default 2 |
| 75 | depends on USERSPACE |
| 76 | help |
| 77 | Every kernel object will have an associated bitfield to store |
| 78 | thread permissions for that object. This controls the size of the |
| 79 | bitfield (in bytes) and imposes a limit on how many threads can |
| 80 | be created in the system. |
| 81 | |
Anas Nashif | d414e7c | 2017-09-09 08:40:43 -0400 | [diff] [blame] | 82 | config SIMPLE_FATAL_ERROR_HANDLER |
| 83 | prompt "Simple system fatal error handler" |
| 84 | bool |
| 85 | default n |
| 86 | default y if !MULTITHREADING |
| 87 | help |
| 88 | Provides an implementation of _SysFatalErrorHandler() that hard hangs |
| 89 | instead of aborting the faulting thread, and does not print anything, |
| 90 | for footprint-concerned systems. Only enable this option if you do not |
| 91 | want debug capabilities in case of system fatal error. |
| 92 | |
Anas Nashif | 8379b7b | 2017-09-09 08:39:38 -0400 | [diff] [blame] | 93 | menu "Interrupt Configuration" |
| 94 | # |
| 95 | # Interrupt related configs |
| 96 | # |
| 97 | config GEN_ISR_TABLES |
| 98 | bool |
| 99 | prompt "Use generated IRQ tables" |
| 100 | default n |
| 101 | help |
| 102 | This option controls whether a platform uses the gen_isr_tables |
| 103 | script to generate its interrupt tables. This mechanism will create |
| 104 | an appropriate hardware vector table and/or software IRQ table. |
| 105 | |
| 106 | config GEN_IRQ_VECTOR_TABLE |
| 107 | bool |
| 108 | prompt "Generate an interrupt vector table" |
| 109 | default y |
| 110 | depends on GEN_ISR_TABLES |
| 111 | help |
| 112 | This option controls whether a platform using gen_isr_tables |
| 113 | needs an interrupt vector table created. Only disable this if the |
| 114 | platform does not use a vector table at all, or requires the vector |
| 115 | table to be in a format that is not an array of function pointers |
| 116 | indexed by IRQ line. In the latter case, the vector table must be |
| 117 | supplied by the application or architecture code. |
| 118 | |
| 119 | config GEN_SW_ISR_TABLE |
| 120 | bool |
| 121 | prompt "Generate a software ISR table" |
| 122 | default y |
| 123 | depends on GEN_ISR_TABLES |
| 124 | help |
| 125 | This option controls whether a platform using gen_isr_tables |
| 126 | needs a software ISR table table created. This is an array of struct |
| 127 | _isr_table_entry containing the interrupt service routine and supplied |
| 128 | parameter. |
| 129 | |
| 130 | config GEN_IRQ_START_VECTOR |
| 131 | int |
| 132 | default 0 |
| 133 | depends on GEN_ISR_TABLES |
| 134 | help |
| 135 | On some architectures, part of the vector table may be reserved for |
| 136 | system exceptions and is declared separately from the tables |
| 137 | created by gen_isr_tables.py. When creating these tables, this value |
| 138 | will be subtracted from CONFIG_NUM_IRQS to properly size them. |
| 139 | This is a hidden option which needs to be set per architecture and |
| 140 | left alone. |
| 141 | |
| 142 | endmenu # Interrupt configuration |
| 143 | |
Anas Nashif | 46f66f4 | 2017-09-08 21:14:06 -0400 | [diff] [blame] | 144 | endmenu |
| 145 | |
Anas Nashif | 8379b7b | 2017-09-09 08:39:38 -0400 | [diff] [blame] | 146 | # |
| 147 | # Architecture Capabilities |
| 148 | # |
Anas Nashif | 46f66f4 | 2017-09-08 21:14:06 -0400 | [diff] [blame] | 149 | config ARCH_HAS_STACK_PROTECTION |
| 150 | bool |
| 151 | |
Andrew Boie | 9f70c7b | 2017-09-11 10:34:49 -0700 | [diff] [blame] | 152 | config ARCH_HAS_USERSPACE |
| 153 | bool |
| 154 | |
Leandro Pereira | b007b64 | 2017-10-17 17:01:48 -0700 | [diff] [blame] | 155 | config ARCH_HAS_EXECUTABLE_PAGE_BIT |
| 156 | bool |
| 157 | |
Ramesh Thomas | bb19e6f | 2016-03-18 16:43:40 -0700 | [diff] [blame] | 158 | # |
| 159 | # Hidden PM feature configs which are to be selected by |
| 160 | # individual SoC. |
| 161 | # |
| 162 | config SYS_POWER_LOW_POWER_STATE_SUPPORTED |
| 163 | # Hidden |
Kumar Gala | 9ec2f3b | 2016-05-24 18:17:13 -0500 | [diff] [blame] | 164 | bool |
| 165 | default n |
| 166 | help |
| 167 | This option signifies that the target supports the SYS_POWER_LOW_POWER_STATE |
| 168 | configuration option. |
Ramesh Thomas | bb19e6f | 2016-03-18 16:43:40 -0700 | [diff] [blame] | 169 | |
| 170 | config SYS_POWER_DEEP_SLEEP_SUPPORTED |
| 171 | # Hidden |
Kumar Gala | 9ec2f3b | 2016-05-24 18:17:13 -0500 | [diff] [blame] | 172 | bool |
| 173 | default n |
| 174 | help |
| 175 | This option signifies that the target supports the SYS_POWER_DEEP_SLEEP |
| 176 | configuration option. |
Ramesh Thomas | a3dc53f | 2016-11-09 23:16:27 -0800 | [diff] [blame] | 177 | |
| 178 | config BOOTLOADER_CONTEXT_RESTORE_SUPPORTED |
| 179 | # Hidden |
| 180 | bool |
| 181 | default n |
| 182 | help |
| 183 | This option signifies that the target has options of bootloaders |
| 184 | that support context restore upon resume from deep sleep |
| 185 | |
Ramesh Thomas | bb19e6f | 2016-03-18 16:43:40 -0700 | [diff] [blame] | 186 | # |
| 187 | # End hidden PM feature configs |
| 188 | # |
| 189 | |
Anas Nashif | 77ba3c3 | 2015-10-09 06:20:52 -0400 | [diff] [blame] | 190 | config ARCH |
| 191 | string |
| 192 | help |
| 193 | System architecture string. |
| 194 | |
| 195 | config SOC |
Anas Nashif | a02c34e | 2016-03-31 08:07:42 -0400 | [diff] [blame] | 196 | string |
| 197 | help |
| 198 | SoC name which can be found under arch/<arch>/soc/<soc name>. |
| 199 | This option holds the directory name used by the build system to locate |
| 200 | the correct linker and header files for the SoC. This option will go away |
| 201 | once all SoCs are using family/series structure. |
| 202 | |
| 203 | config SOC_SERIES |
| 204 | string |
| 205 | help |
| 206 | SoC series name which can be found under arch/<arch>/soc/<family>/<series>. |
| 207 | This option holds the directory name used by the build system to locate |
| 208 | the correct linker and header files. |
| 209 | |
| 210 | config SOC_FAMILY |
| 211 | string |
| 212 | help |
| 213 | SoC family name which can be found under arch/<arch>/soc/<family>. |
| 214 | This option holds the directory name used by the build system to locate |
| 215 | the correct linker and header files. |
Anas Nashif | 6623311 | 2015-11-29 19:47:21 -0500 | [diff] [blame] | 216 | |
Anas Nashif | 2d76224 | 2015-12-07 20:20:25 -0500 | [diff] [blame] | 217 | config BOARD |
| 218 | string |
| 219 | help |
David B. Kinder | 3561c73 | 2017-04-24 11:30:10 -0700 | [diff] [blame] | 220 | This option holds the name of the board and is used to locate the files |
Anas Nashif | a02c34e | 2016-03-31 08:07:42 -0400 | [diff] [blame] | 221 | related to the board in the source tree (under boards/). |
Andrew Boie | ff872dc | 2016-05-04 13:13:56 -0700 | [diff] [blame] | 222 | The Board is the first location where we search for a linker.ld file, |
Anas Nashif | a02c34e | 2016-03-31 08:07:42 -0400 | [diff] [blame] | 223 | if not found we look for the linker file in |
| 224 | arch/<arch>/soc/<family>/<series> |
Anas Nashif | 2d76224 | 2015-12-07 20:20:25 -0500 | [diff] [blame] | 225 | |
Andrew Boie | 1927b3d | 2017-02-08 17:16:29 -0800 | [diff] [blame] | 226 | |
Anas Nashif | 77ba3c3 | 2015-10-09 06:20:52 -0400 | [diff] [blame] | 227 | source "arch/*/Kconfig" |
Anas Nashif | fdb1daf | 2015-12-13 05:54:28 -0500 | [diff] [blame] | 228 | |
| 229 | source "boards/Kconfig" |