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 | |
Christoph Hellwig | c3e4ed0 | 2018-04-27 08:38:23 +0200 | [diff] [blame] | 6 | config 64BIT |
| 7 | bool |
| 8 | |
| 9 | config 32BIT |
| 10 | bool |
| 11 | |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 12 | config RISCV |
| 13 | def_bool y |
Christoph Hellwig | d4a451d | 2018-04-03 16:24:20 +0200 | [diff] [blame] | 14 | # even on 32-bit, physical (and DMA) addresses are > 32-bits |
| 15 | select PHYS_ADDR_T_64BIT |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 16 | select OF |
| 17 | select OF_EARLY_FLATTREE |
| 18 | select OF_IRQ |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 19 | select ARCH_WANT_FRAME_POINTERS |
| 20 | select CLONE_BACKWARDS |
| 21 | select COMMON_CLK |
Christoph Hellwig | 86e1175 | 2018-04-16 14:53:51 +0200 | [diff] [blame] | 22 | select DMA_DIRECT_OPS |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 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 |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 31 | select HAVE_MEMBLOCK |
Christoph Hellwig | 5ec9c4f | 2018-01-16 09:37:50 +0100 | [diff] [blame] | 32 | select HAVE_MEMBLOCK_NODE_MAP |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 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 |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 43 | select RISCV_TIMER |
Palmer Dabbelt | cc6c984 | 2018-03-07 15:57:28 -0800 | [diff] [blame] | 44 | select GENERIC_IRQ_MULTI_HANDLER |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 45 | |
| 46 | config MMU |
| 47 | def_bool y |
| 48 | |
Christoph Hellwig | 5ec9c4f | 2018-01-16 09:37:50 +0100 | [diff] [blame] | 49 | config ZONE_DMA32 |
| 50 | bool |
Christoph Hellwig | f1306f0 | 2018-04-27 08:41:09 +0200 | [diff] [blame] | 51 | default y if 64BIT |
Christoph Hellwig | 5ec9c4f | 2018-01-16 09:37:50 +0100 | [diff] [blame] | 52 | |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 53 | config 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 | |
| 59 | config STACKTRACE_SUPPORT |
| 60 | def_bool y |
| 61 | |
Alan Kao | 10626c3 | 2017-12-18 17:52:48 +0800 | [diff] [blame] | 62 | config TRACE_IRQFLAGS_SUPPORT |
| 63 | def_bool y |
| 64 | |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 65 | config RWSEM_GENERIC_SPINLOCK |
| 66 | def_bool y |
| 67 | |
| 68 | config GENERIC_BUG |
| 69 | def_bool y |
| 70 | depends on BUG |
| 71 | select GENERIC_BUG_RELATIVE_POINTERS if 64BIT |
| 72 | |
| 73 | config GENERIC_BUG_RELATIVE_POINTERS |
| 74 | bool |
| 75 | |
| 76 | config GENERIC_CALIBRATE_DELAY |
| 77 | def_bool y |
| 78 | |
| 79 | config GENERIC_CSUM |
| 80 | def_bool y |
| 81 | |
| 82 | config GENERIC_HWEIGHT |
| 83 | def_bool y |
| 84 | |
| 85 | config PGTABLE_LEVELS |
| 86 | int |
| 87 | default 3 if 64BIT |
| 88 | default 2 |
| 89 | |
| 90 | config HAVE_KPROBES |
| 91 | def_bool n |
| 92 | |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 93 | menu "Platform type" |
| 94 | |
| 95 | choice |
| 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 | |
| 102 | config ARCH_RV32I |
| 103 | bool "RV32I" |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 104 | select 32BIT |
| 105 | select GENERIC_ASHLDI3 |
| 106 | select GENERIC_ASHRDI3 |
| 107 | select GENERIC_LSHRDI3 |
| 108 | |
| 109 | config ARCH_RV64I |
| 110 | bool "RV64I" |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 111 | select 64BIT |
Alan Kao | 10626c3 | 2017-12-18 17:52:48 +0800 | [diff] [blame] | 112 | select HAVE_FUNCTION_TRACER |
| 113 | select HAVE_FUNCTION_GRAPH_TRACER |
Alan Kao | a1d2a6b | 2018-02-13 13:13:16 +0800 | [diff] [blame] | 114 | select HAVE_FTRACE_MCOUNT_RECORD |
Alan Kao | c15ac4f | 2018-02-13 13:13:17 +0800 | [diff] [blame] | 115 | select HAVE_DYNAMIC_FTRACE |
Alan Kao | aea4c67 | 2018-02-13 13:13:20 +0800 | [diff] [blame] | 116 | select HAVE_DYNAMIC_FTRACE_WITH_REGS |
Christoph Hellwig | 10314e0 | 2018-04-27 08:43:14 +0200 | [diff] [blame^] | 117 | select SWIOTLB |
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 | |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 173 | choice |
| 174 | prompt "CPU Tuning" |
| 175 | default TUNE_GENERIC |
| 176 | |
| 177 | config TUNE_GENERIC |
| 178 | bool "generic" |
| 179 | |
| 180 | endchoice |
| 181 | |
| 182 | config 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 | |
| 192 | config RISCV_ISA_A |
| 193 | def_bool y |
| 194 | |
| 195 | endmenu |
| 196 | |
| 197 | menu "Kernel type" |
| 198 | |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 199 | source "mm/Kconfig" |
| 200 | |
| 201 | source "kernel/Kconfig.preempt" |
| 202 | |
| 203 | source "kernel/Kconfig.hz" |
| 204 | |
| 205 | endmenu |
| 206 | |
| 207 | menu "Bus support" |
| 208 | |
| 209 | config 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 | |
| 219 | config PCI_DOMAINS |
| 220 | def_bool PCI |
| 221 | |
| 222 | config PCI_DOMAINS_GENERIC |
| 223 | def_bool PCI |
| 224 | |
| 225 | source "drivers/pci/Kconfig" |
| 226 | |
| 227 | endmenu |
| 228 | |
| 229 | source "init/Kconfig" |
| 230 | |
| 231 | source "kernel/Kconfig.freezer" |
| 232 | |
| 233 | menu "Executable file formats" |
| 234 | |
| 235 | source "fs/Kconfig.binfmt" |
| 236 | |
| 237 | endmenu |
| 238 | |
| 239 | menu "Power management options" |
| 240 | |
| 241 | source kernel/power/Kconfig |
| 242 | |
| 243 | endmenu |
| 244 | |
| 245 | source "net/Kconfig" |
| 246 | |
| 247 | source "drivers/Kconfig" |
| 248 | |
| 249 | source "fs/Kconfig" |
| 250 | |
| 251 | menu "Kernel hacking" |
| 252 | |
| 253 | config 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 |
Palmer Dabbelt | f6a11d9 | 2018-03-13 13:31:20 -0700 | [diff] [blame] | 267 | line if CMDLINE_FORCE is set to 'N'. Otherwise, the default |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 268 | command line will be ignored and replaced by the built-in string. |
| 269 | |
| 270 | config 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 | |
Palmer Dabbelt | f6a11d9 | 2018-03-13 13:31:20 -0700 | [diff] [blame] | 277 | config CMDLINE_FORCE |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 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 | |
| 287 | config EARLY_PRINTK |
| 288 | def_bool y |
| 289 | |
| 290 | source "lib/Kconfig.debug" |
| 291 | |
| 292 | config CMDLINE_BOOL |
| 293 | bool |
| 294 | endmenu |
| 295 | |
| 296 | source "security/Kconfig" |
| 297 | |
| 298 | source "crypto/Kconfig" |
| 299 | |
| 300 | source "lib/Kconfig" |