blob: 7f460401fd87212a59da587b21b2589f4ff1ac83 [file] [log] [blame]
Juan Manuel Cruzd15251f2015-05-20 11:40:39 -05001# Kconfig - general architecture configuration options
2
3#
4# Copyright (c) 2014-2015 Wind River Systems, Inc.
5# Copyright (c) 2015 Intel Corporation
Mazen NEIFER1cded672017-01-13 12:14:33 +01006# Copyright (c) 2016 Cadence Design Systems, Inc.
Juan Manuel Cruzd15251f2015-05-20 11:40:39 -05007#
David B. Kinderac74d8b2017-01-18 17:01:01 -08008# SPDX-License-Identifier: Apache-2.0
Juan Manuel Cruzd15251f2015-05-20 11:40:39 -05009#
10
11
Anas Nashif77ba3c32015-10-09 06:20:52 -040012choice
13 prompt "Architecture"
14 default X86
15
16config ARC
17 bool "ARC architecture"
18
19config ARM
20 bool "ARM architecture"
21
22config X86
23 bool "x86 architecture"
Andrew Boie6a1474e2016-07-15 13:15:00 -070024 select ATOMIC_OPERATIONS_BUILTIN
Anas Nashif77ba3c32015-10-09 06:20:52 -040025
Andrew Boie94338952016-04-21 14:47:09 -070026config NIOS2
27 bool "Nios II Gen 2 architecture"
Andrew Boie6a1474e2016-07-15 13:15:00 -070028 select ATOMIC_OPERATIONS_C
Andrew Boie94338952016-04-21 14:47:09 -070029
Jean-Paul Etiennecd83e852017-01-11 00:24:30 +010030config RISCV32
31 bool "RISCV32 architecture"
32
Mazen NEIFER1cded672017-01-13 12:14:33 +010033config XTENSA
34 bool "Xtensa architecture"
35
Anas Nashif77ba3c32015-10-09 06:20:52 -040036endchoice
37
Anas Nashif46f66f42017-09-08 21:14:06 -040038
39menu "General Architecture Options"
40
41config HW_STACK_PROTECTION
42 bool "Hardware Stack Protection"
43 depends on ARCH_HAS_STACK_PROTECTION
44 help
Andrew Boie2a8684f2017-11-06 11:42:54 -080045 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. Kinder7e3ed142017-11-08 10:35:48 -080050 Note that this does not necessarily prevent corruption and assertions
Andrew Boie2a8684f2017-11-06 11:42:54 -080051 about the overall system state when a fault is triggered cannot be
52 made.
Anas Nashif46f66f42017-09-08 21:14:06 -040053
Andrew Boie9f70c7b2017-09-11 10:34:49 -070054config USERSPACE
Andrew Boieda4024b2017-10-13 13:03:32 -070055 bool "User mode threads (EXPERIMENTAL)"
Andrew Boie9f70c7b2017-09-11 10:34:49 -070056 depends on ARCH_HAS_USERSPACE
Andrew Boie9f70c7b2017-09-11 10:34:49 -070057 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 Boie2a8684f2017-11-06 11:42:54 -080063 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 Boieda4024b2017-10-13 13:03:32 -070069 This feature is under heavy development and APIs related to it are
70 subject to change, even if declared non-private.
71
Andrew Boie9f70c7b2017-09-11 10:34:49 -070072config 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 Nashifd414e7c2017-09-09 08:40:43 -040082config 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 Nashif8379b7b2017-09-09 08:39:38 -040093menu "Interrupt Configuration"
94#
95# Interrupt related configs
96#
97config 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
106config 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
119config 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
130config 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
142endmenu # Interrupt configuration
143
Anas Nashif46f66f42017-09-08 21:14:06 -0400144endmenu
145
Anas Nashif8379b7b2017-09-09 08:39:38 -0400146#
147# Architecture Capabilities
148#
Anas Nashif46f66f42017-09-08 21:14:06 -0400149config ARCH_HAS_STACK_PROTECTION
150 bool
151
Andrew Boie9f70c7b2017-09-11 10:34:49 -0700152config ARCH_HAS_USERSPACE
153 bool
154
Leandro Pereirab007b642017-10-17 17:01:48 -0700155config ARCH_HAS_EXECUTABLE_PAGE_BIT
156 bool
157
Ramesh Thomasbb19e6f2016-03-18 16:43:40 -0700158#
159# Hidden PM feature configs which are to be selected by
160# individual SoC.
161#
162config SYS_POWER_LOW_POWER_STATE_SUPPORTED
163 # Hidden
Kumar Gala9ec2f3b2016-05-24 18:17:13 -0500164 bool
165 default n
166 help
167 This option signifies that the target supports the SYS_POWER_LOW_POWER_STATE
168 configuration option.
Ramesh Thomasbb19e6f2016-03-18 16:43:40 -0700169
170config SYS_POWER_DEEP_SLEEP_SUPPORTED
171 # Hidden
Kumar Gala9ec2f3b2016-05-24 18:17:13 -0500172 bool
173 default n
174 help
175 This option signifies that the target supports the SYS_POWER_DEEP_SLEEP
176 configuration option.
Ramesh Thomasa3dc53f2016-11-09 23:16:27 -0800177
178config 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 Thomasbb19e6f2016-03-18 16:43:40 -0700186#
187# End hidden PM feature configs
188#
189
Anas Nashif77ba3c32015-10-09 06:20:52 -0400190config ARCH
191 string
192 help
193 System architecture string.
194
195config SOC
Anas Nashifa02c34e2016-03-31 08:07:42 -0400196 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
203config 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
210config 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 Nashif66233112015-11-29 19:47:21 -0500216
Anas Nashif2d762242015-12-07 20:20:25 -0500217config BOARD
218 string
219 help
David B. Kinder3561c732017-04-24 11:30:10 -0700220 This option holds the name of the board and is used to locate the files
Anas Nashifa02c34e2016-03-31 08:07:42 -0400221 related to the board in the source tree (under boards/).
Andrew Boieff872dc2016-05-04 13:13:56 -0700222 The Board is the first location where we search for a linker.ld file,
Anas Nashifa02c34e2016-03-31 08:07:42 -0400223 if not found we look for the linker file in
224 arch/<arch>/soc/<family>/<series>
Anas Nashif2d762242015-12-07 20:20:25 -0500225
Andrew Boie1927b3d2017-02-08 17:16:29 -0800226
Anas Nashif77ba3c32015-10-09 06:20:52 -0400227source "arch/*/Kconfig"
Anas Nashiffdb1daf2015-12-13 05:54:28 -0500228
229source "boards/Kconfig"