Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 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 |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 11 | select ARCH_WANT_FRAME_POINTERS |
| 12 | select CLONE_BACKWARDS |
| 13 | select COMMON_CLK |
Christoph Hellwig | 86e1175 | 2018-04-16 14:53:51 +0200 | [diff] [blame] | 14 | select DMA_DIRECT_OPS |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 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 |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 23 | select HAVE_MEMBLOCK |
Christoph Hellwig | 5ec9c4f | 2018-01-16 09:37:50 +0100 | [diff] [blame] | 24 | select HAVE_MEMBLOCK_NODE_MAP |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 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 Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 35 | select RISCV_TIMER |
Palmer Dabbelt | cc6c984 | 2018-03-07 15:57:28 -0800 | [diff] [blame] | 36 | select GENERIC_IRQ_MULTI_HANDLER |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 37 | |
| 38 | config MMU |
| 39 | def_bool y |
| 40 | |
| 41 | # even on 32-bit, physical (and DMA) addresses are > 32-bits |
| 42 | config ARCH_PHYS_ADDR_T_64BIT |
| 43 | def_bool y |
| 44 | |
Christoph Hellwig | 5ec9c4f | 2018-01-16 09:37:50 +0100 | [diff] [blame] | 45 | config ZONE_DMA32 |
| 46 | bool |
| 47 | default y |
| 48 | |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 49 | config ARCH_DMA_ADDR_T_64BIT |
| 50 | def_bool y |
| 51 | |
| 52 | config 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 | |
| 58 | config STACKTRACE_SUPPORT |
| 59 | def_bool y |
| 60 | |
Alan Kao | 10626c3 | 2017-12-18 17:52:48 +0800 | [diff] [blame] | 61 | config TRACE_IRQFLAGS_SUPPORT |
| 62 | def_bool y |
| 63 | |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 64 | config RWSEM_GENERIC_SPINLOCK |
| 65 | def_bool y |
| 66 | |
| 67 | config GENERIC_BUG |
| 68 | def_bool y |
| 69 | depends on BUG |
| 70 | select GENERIC_BUG_RELATIVE_POINTERS if 64BIT |
| 71 | |
| 72 | config GENERIC_BUG_RELATIVE_POINTERS |
| 73 | bool |
| 74 | |
| 75 | config GENERIC_CALIBRATE_DELAY |
| 76 | def_bool y |
| 77 | |
| 78 | config GENERIC_CSUM |
| 79 | def_bool y |
| 80 | |
| 81 | config GENERIC_HWEIGHT |
| 82 | def_bool y |
| 83 | |
| 84 | config PGTABLE_LEVELS |
| 85 | int |
| 86 | default 3 if 64BIT |
| 87 | default 2 |
| 88 | |
| 89 | config HAVE_KPROBES |
| 90 | def_bool n |
| 91 | |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 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 |
Alan Kao | 10626c3 | 2017-12-18 17:52:48 +0800 | [diff] [blame] | 113 | select HAVE_FUNCTION_TRACER |
| 114 | select HAVE_FUNCTION_GRAPH_TRACER |
Alan Kao | a1d2a6b | 2018-02-13 13:13:16 +0800 | [diff] [blame] | 115 | select HAVE_FTRACE_MCOUNT_RECORD |
Alan Kao | c15ac4f | 2018-02-13 13:13:17 +0800 | [diff] [blame] | 116 | select HAVE_DYNAMIC_FTRACE |
Alan Kao | aea4c67 | 2018-02-13 13:13:20 +0800 | [diff] [blame] | 117 | select HAVE_DYNAMIC_FTRACE_WITH_REGS |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 118 | |
| 119 | endchoice |
| 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. |
| 124 | choice |
| 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" |
| 133 | endchoice |
| 134 | |
Zong Li | ab1ef68 | 2018-03-15 16:50:41 +0800 | [diff] [blame] | 135 | config MODULE_SECTIONS |
| 136 | bool |
| 137 | select HAVE_MOD_ARCH_SPECIFIC |
| 138 | |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 139 | choice |
| 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 |
Zong Li | ab1ef68 | 2018-03-15 16:50:41 +0800 | [diff] [blame] | 149 | select MODULE_SECTIONS if MODULES |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 150 | bool "128GiB" |
| 151 | endchoice |
| 152 | |
| 153 | |
| 154 | config 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 | |
| 167 | config NR_CPUS |
| 168 | int "Maximum number of CPUs (2-32)" |
| 169 | range 2 32 |
| 170 | depends on SMP |
| 171 | default "8" |
| 172 | |
| 173 | config CPU_SUPPORTS_32BIT_KERNEL |
| 174 | bool |
| 175 | config CPU_SUPPORTS_64BIT_KERNEL |
| 176 | bool |
| 177 | |
| 178 | choice |
| 179 | prompt "CPU Tuning" |
| 180 | default TUNE_GENERIC |
| 181 | |
| 182 | config TUNE_GENERIC |
| 183 | bool "generic" |
| 184 | |
| 185 | endchoice |
| 186 | |
| 187 | config RISCV_ISA_C |
| 188 | bool "Emit compressed instructions when building Linux" |
| 189 | default y |
| 190 | help |
| 191 | Adds "C" to the ISA subsets that the toolchain is allowed to emit |
| 192 | when building Linux, which results in compressed instructions in the |
| 193 | Linux binary. |
| 194 | |
| 195 | If you don't know what to do here, say Y. |
| 196 | |
| 197 | config RISCV_ISA_A |
| 198 | def_bool y |
| 199 | |
| 200 | endmenu |
| 201 | |
| 202 | menu "Kernel type" |
| 203 | |
| 204 | choice |
| 205 | prompt "Kernel code model" |
| 206 | default 64BIT |
| 207 | |
| 208 | config 32BIT |
| 209 | bool "32-bit kernel" |
| 210 | depends on CPU_SUPPORTS_32BIT_KERNEL |
| 211 | help |
| 212 | Select this option to build a 32-bit kernel. |
| 213 | |
| 214 | config 64BIT |
| 215 | bool "64-bit kernel" |
| 216 | depends on CPU_SUPPORTS_64BIT_KERNEL |
| 217 | help |
| 218 | Select this option to build a 64-bit kernel. |
| 219 | |
| 220 | endchoice |
| 221 | |
| 222 | source "mm/Kconfig" |
| 223 | |
| 224 | source "kernel/Kconfig.preempt" |
| 225 | |
| 226 | source "kernel/Kconfig.hz" |
| 227 | |
| 228 | endmenu |
| 229 | |
| 230 | menu "Bus support" |
| 231 | |
| 232 | config PCI |
| 233 | bool "PCI support" |
| 234 | select PCI_MSI |
| 235 | help |
| 236 | This feature enables support for PCI bus system. If you say Y |
| 237 | here, the kernel will include drivers and infrastructure code |
| 238 | to support PCI bus devices. |
| 239 | |
| 240 | If you don't know what to do here, say Y. |
| 241 | |
| 242 | config PCI_DOMAINS |
| 243 | def_bool PCI |
| 244 | |
| 245 | config PCI_DOMAINS_GENERIC |
| 246 | def_bool PCI |
| 247 | |
| 248 | source "drivers/pci/Kconfig" |
| 249 | |
| 250 | endmenu |
| 251 | |
| 252 | source "init/Kconfig" |
| 253 | |
| 254 | source "kernel/Kconfig.freezer" |
| 255 | |
| 256 | menu "Executable file formats" |
| 257 | |
| 258 | source "fs/Kconfig.binfmt" |
| 259 | |
| 260 | endmenu |
| 261 | |
| 262 | menu "Power management options" |
| 263 | |
| 264 | source kernel/power/Kconfig |
| 265 | |
| 266 | endmenu |
| 267 | |
| 268 | source "net/Kconfig" |
| 269 | |
| 270 | source "drivers/Kconfig" |
| 271 | |
| 272 | source "fs/Kconfig" |
| 273 | |
| 274 | menu "Kernel hacking" |
| 275 | |
| 276 | config CMDLINE_BOOL |
| 277 | bool "Built-in kernel command line" |
| 278 | help |
| 279 | For most platforms, it is firmware or second stage bootloader |
| 280 | that by default specifies the kernel command line options. |
| 281 | However, it might be necessary or advantageous to either override |
| 282 | the default kernel command line or add a few extra options to it. |
| 283 | For such cases, this option allows hardcoding command line options |
| 284 | directly into the kernel. |
| 285 | |
| 286 | For that, choose 'Y' here and fill in the extra boot parameters |
| 287 | in CONFIG_CMDLINE. |
| 288 | |
| 289 | The built-in options will be concatenated to the default command |
Palmer Dabbelt | f6a11d9 | 2018-03-13 13:31:20 -0700 | [diff] [blame] | 290 | line if CMDLINE_FORCE is set to 'N'. Otherwise, the default |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 291 | command line will be ignored and replaced by the built-in string. |
| 292 | |
| 293 | config CMDLINE |
| 294 | string "Built-in kernel command string" |
| 295 | depends on CMDLINE_BOOL |
| 296 | default "" |
| 297 | help |
| 298 | Supply command-line options at build time by entering them here. |
| 299 | |
Palmer Dabbelt | f6a11d9 | 2018-03-13 13:31:20 -0700 | [diff] [blame] | 300 | config CMDLINE_FORCE |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 301 | bool "Built-in command line overrides bootloader arguments" |
| 302 | depends on CMDLINE_BOOL |
| 303 | help |
| 304 | Set this option to 'Y' to have the kernel ignore the bootloader |
| 305 | or firmware command line. Instead, the built-in command line |
| 306 | will be used exclusively. |
| 307 | |
| 308 | If you don't know what to do here, say N. |
| 309 | |
| 310 | config EARLY_PRINTK |
| 311 | def_bool y |
| 312 | |
| 313 | source "lib/Kconfig.debug" |
| 314 | |
| 315 | config CMDLINE_BOOL |
| 316 | bool |
| 317 | endmenu |
| 318 | |
| 319 | source "security/Kconfig" |
| 320 | |
| 321 | source "crypto/Kconfig" |
| 322 | |
| 323 | source "lib/Kconfig" |