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