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