blob: c9ccc6ea43710bdbb44201dcb393ccb9dcaa441c [file] [log] [blame]
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -07001#
2# For a description of the syntax of this configuration file,
3# see Documentation/kbuild/kconfig-language.txt.
4#
5
6config RISCV
7 def_bool y
8 select OF
9 select OF_EARLY_FLATTREE
10 select OF_IRQ
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070011 select ARCH_WANT_FRAME_POINTERS
12 select CLONE_BACKWARDS
13 select COMMON_CLK
14 select GENERIC_CLOCKEVENTS
15 select GENERIC_CPU_DEVICES
16 select GENERIC_IRQ_SHOW
17 select GENERIC_PCI_IOMAP
18 select GENERIC_STRNCPY_FROM_USER
19 select GENERIC_STRNLEN_USER
20 select GENERIC_SMP_IDLE_THREAD
21 select GENERIC_ATOMIC64 if !64BIT || !RISCV_ISA_A
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070022 select HAVE_MEMBLOCK
Christoph Hellwig5ec9c4f2018-01-16 09:37:50 +010023 select HAVE_MEMBLOCK_NODE_MAP
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070024 select HAVE_DMA_API_DEBUG
25 select HAVE_DMA_CONTIGUOUS
26 select HAVE_GENERIC_DMA_COHERENT
27 select IRQ_DOMAIN
28 select NO_BOOTMEM
29 select RISCV_ISA_A if SMP
30 select SPARSE_IRQ
31 select SYSCTL_EXCEPTION_TRACE
32 select HAVE_ARCH_TRACEHOOK
33 select MODULES_USE_ELF_RELA if MODULES
34 select THREAD_INFO_IN_TASK
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070035 select RISCV_TIMER
36
37config MMU
38 def_bool y
39
40# even on 32-bit, physical (and DMA) addresses are > 32-bits
41config ARCH_PHYS_ADDR_T_64BIT
42 def_bool y
43
Christoph Hellwig5ec9c4f2018-01-16 09:37:50 +010044config ZONE_DMA32
45 bool
46 default y
47
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070048config ARCH_DMA_ADDR_T_64BIT
49 def_bool y
50
51config PAGE_OFFSET
52 hex
53 default 0xC0000000 if 32BIT && MAXPHYSMEM_2GB
54 default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB
55 default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB
56
57config STACKTRACE_SUPPORT
58 def_bool y
59
Alan Kao10626c32017-12-18 17:52:48 +080060config TRACE_IRQFLAGS_SUPPORT
61 def_bool y
62
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070063config RWSEM_GENERIC_SPINLOCK
64 def_bool y
65
66config GENERIC_BUG
67 def_bool y
68 depends on BUG
69 select GENERIC_BUG_RELATIVE_POINTERS if 64BIT
70
71config GENERIC_BUG_RELATIVE_POINTERS
72 bool
73
74config GENERIC_CALIBRATE_DELAY
75 def_bool y
76
77config GENERIC_CSUM
78 def_bool y
79
80config GENERIC_HWEIGHT
81 def_bool y
82
83config PGTABLE_LEVELS
84 int
85 default 3 if 64BIT
86 default 2
87
88config HAVE_KPROBES
89 def_bool n
90
Christoph Hellwig002e6742018-01-09 16:30:23 +010091config DMA_DIRECT_OPS
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070092 def_bool y
93
94menu "Platform type"
95
96choice
97 prompt "Base ISA"
98 default ARCH_RV64I
99 help
100 This selects the base ISA that this kernel will traget and must match
101 the target platform.
102
103config ARCH_RV32I
104 bool "RV32I"
105 select CPU_SUPPORTS_32BIT_KERNEL
106 select 32BIT
107 select GENERIC_ASHLDI3
108 select GENERIC_ASHRDI3
109 select GENERIC_LSHRDI3
110
111config ARCH_RV64I
112 bool "RV64I"
113 select CPU_SUPPORTS_64BIT_KERNEL
114 select 64BIT
Alan Kao10626c32017-12-18 17:52:48 +0800115 select HAVE_FUNCTION_TRACER
116 select HAVE_FUNCTION_GRAPH_TRACER
Alan Kaoa1d2a6b2018-02-13 13:13:16 +0800117 select HAVE_FTRACE_MCOUNT_RECORD
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -0700118
119endchoice
120
121# We must be able to map all physical memory into the kernel, but the compiler
122# is still a bit more efficient when generating code if it's setup in a manner
123# such that it can only map 2GiB of memory.
124choice
125 prompt "Kernel Code Model"
126 default CMODEL_MEDLOW if 32BIT
127 default CMODEL_MEDANY if 64BIT
128
129 config CMODEL_MEDLOW
130 bool "medium low code model"
131 config CMODEL_MEDANY
132 bool "medium any code model"
133endchoice
134
135choice
136 prompt "Maximum Physical Memory"
137 default MAXPHYSMEM_2GB if 32BIT
138 default MAXPHYSMEM_2GB if 64BIT && CMODEL_MEDLOW
139 default MAXPHYSMEM_128GB if 64BIT && CMODEL_MEDANY
140
141 config MAXPHYSMEM_2GB
142 bool "2GiB"
143 config MAXPHYSMEM_128GB
144 depends on 64BIT && CMODEL_MEDANY
145 bool "128GiB"
146endchoice
147
148
149config SMP
150 bool "Symmetric Multi-Processing"
151 help
152 This enables support for systems with more than one CPU. If
153 you say N here, the kernel will run on single and
154 multiprocessor machines, but will use only one CPU of a
155 multiprocessor machine. If you say Y here, the kernel will run
156 on many, but not all, single processor machines. On a single
157 processor machine, the kernel will run faster if you say N
158 here.
159
160 If you don't know what to do here, say N.
161
162config NR_CPUS
163 int "Maximum number of CPUs (2-32)"
164 range 2 32
165 depends on SMP
166 default "8"
167
168config CPU_SUPPORTS_32BIT_KERNEL
169 bool
170config CPU_SUPPORTS_64BIT_KERNEL
171 bool
172
173choice
174 prompt "CPU Tuning"
175 default TUNE_GENERIC
176
177config TUNE_GENERIC
178 bool "generic"
179
180endchoice
181
182config RISCV_ISA_C
183 bool "Emit compressed instructions when building Linux"
184 default y
185 help
186 Adds "C" to the ISA subsets that the toolchain is allowed to emit
187 when building Linux, which results in compressed instructions in the
188 Linux binary.
189
190 If you don't know what to do here, say Y.
191
192config RISCV_ISA_A
193 def_bool y
194
195endmenu
196
197menu "Kernel type"
198
199choice
200 prompt "Kernel code model"
201 default 64BIT
202
203config 32BIT
204 bool "32-bit kernel"
205 depends on CPU_SUPPORTS_32BIT_KERNEL
206 help
207 Select this option to build a 32-bit kernel.
208
209config 64BIT
210 bool "64-bit kernel"
211 depends on CPU_SUPPORTS_64BIT_KERNEL
212 help
213 Select this option to build a 64-bit kernel.
214
215endchoice
216
217source "mm/Kconfig"
218
219source "kernel/Kconfig.preempt"
220
221source "kernel/Kconfig.hz"
222
223endmenu
224
225menu "Bus support"
226
227config PCI
228 bool "PCI support"
229 select PCI_MSI
230 help
231 This feature enables support for PCI bus system. If you say Y
232 here, the kernel will include drivers and infrastructure code
233 to support PCI bus devices.
234
235 If you don't know what to do here, say Y.
236
237config PCI_DOMAINS
238 def_bool PCI
239
240config PCI_DOMAINS_GENERIC
241 def_bool PCI
242
243source "drivers/pci/Kconfig"
244
245endmenu
246
247source "init/Kconfig"
248
249source "kernel/Kconfig.freezer"
250
251menu "Executable file formats"
252
253source "fs/Kconfig.binfmt"
254
255endmenu
256
257menu "Power management options"
258
259source kernel/power/Kconfig
260
261endmenu
262
263source "net/Kconfig"
264
265source "drivers/Kconfig"
266
267source "fs/Kconfig"
268
269menu "Kernel hacking"
270
271config CMDLINE_BOOL
272 bool "Built-in kernel command line"
273 help
274 For most platforms, it is firmware or second stage bootloader
275 that by default specifies the kernel command line options.
276 However, it might be necessary or advantageous to either override
277 the default kernel command line or add a few extra options to it.
278 For such cases, this option allows hardcoding command line options
279 directly into the kernel.
280
281 For that, choose 'Y' here and fill in the extra boot parameters
282 in CONFIG_CMDLINE.
283
284 The built-in options will be concatenated to the default command
285 line if CMDLINE_OVERRIDE is set to 'N'. Otherwise, the default
286 command line will be ignored and replaced by the built-in string.
287
288config CMDLINE
289 string "Built-in kernel command string"
290 depends on CMDLINE_BOOL
291 default ""
292 help
293 Supply command-line options at build time by entering them here.
294
295config CMDLINE_OVERRIDE
296 bool "Built-in command line overrides bootloader arguments"
297 depends on CMDLINE_BOOL
298 help
299 Set this option to 'Y' to have the kernel ignore the bootloader
300 or firmware command line. Instead, the built-in command line
301 will be used exclusively.
302
303 If you don't know what to do here, say N.
304
305config EARLY_PRINTK
306 def_bool y
307
308source "lib/Kconfig.debug"
309
310config CMDLINE_BOOL
311 bool
312endmenu
313
314source "security/Kconfig"
315
316source "crypto/Kconfig"
317
318source "lib/Kconfig"