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