David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-only |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 2 | # |
| 3 | # For a description of the syntax of this configuration file, |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 4 | # see Documentation/kbuild/kconfig-language.rst. |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 5 | # |
| 6 | |
| 7 | config 64BIT |
| 8 | bool |
| 9 | |
| 10 | config 32BIT |
| 11 | bool |
| 12 | |
| 13 | config RISCV |
| 14 | def_bool y |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 15 | select ARCH_CLOCKSOURCE_INIT |
| 16 | select ARCH_SUPPORTS_ATOMIC_RMW |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 17 | select ARCH_HAS_BINFMT_FLAT |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 18 | select ARCH_HAS_DEBUG_VM_PGTABLE |
| 19 | select ARCH_HAS_DEBUG_VIRTUAL if MMU |
| 20 | select ARCH_HAS_DEBUG_WX |
| 21 | select ARCH_HAS_GCOV_PROFILE_ALL |
| 22 | select ARCH_HAS_GIGANTIC_PAGE |
| 23 | select ARCH_HAS_KCOV |
| 24 | select ARCH_HAS_MMIOWB |
| 25 | select ARCH_HAS_PTE_SPECIAL |
| 26 | select ARCH_HAS_SET_DIRECT_MAP |
| 27 | select ARCH_HAS_SET_MEMORY |
| 28 | select ARCH_HAS_STRICT_KERNEL_RWX if MMU |
| 29 | select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX |
| 30 | select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT |
| 31 | select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 32 | select ARCH_WANT_FRAME_POINTERS |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 33 | select ARCH_WANT_HUGE_PMD_SHARE if 64BIT |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 34 | select CLONE_BACKWARDS |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 35 | select CLINT_TIMER if !MMU |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 36 | select COMMON_CLK |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 37 | select EDAC_SUPPORT |
Olivier Deprez | 92d4c21 | 2022-12-06 15:05:30 +0100 | [diff] [blame] | 38 | select GENERIC_ARCH_TOPOLOGY |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 39 | select GENERIC_ATOMIC64 if !64BIT |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 40 | select GENERIC_CLOCKEVENTS |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 41 | select GENERIC_EARLY_IOREMAP |
| 42 | select GENERIC_GETTIMEOFDAY if HAVE_GENERIC_VDSO |
| 43 | select GENERIC_IOREMAP |
| 44 | select GENERIC_IRQ_MULTI_HANDLER |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 45 | select GENERIC_IRQ_SHOW |
| 46 | select GENERIC_PCI_IOMAP |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 47 | select GENERIC_PTDUMP if MMU |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 48 | select GENERIC_SCHED_CLOCK |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 49 | select GENERIC_SMP_IDLE_THREAD |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 50 | select GENERIC_STRNCPY_FROM_USER if MMU |
| 51 | select GENERIC_STRNLEN_USER if MMU |
| 52 | select GENERIC_TIME_VSYSCALL if MMU && 64BIT |
| 53 | select HANDLE_DOMAIN_IRQ |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 54 | select HAVE_ARCH_AUDITSYSCALL |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 55 | select HAVE_ARCH_JUMP_LABEL |
| 56 | select HAVE_ARCH_JUMP_LABEL_RELATIVE |
| 57 | select HAVE_ARCH_KASAN if MMU && 64BIT |
| 58 | select HAVE_ARCH_KGDB |
| 59 | select HAVE_ARCH_KGDB_QXFER_PKT |
| 60 | select HAVE_ARCH_MMAP_RND_BITS if MMU |
| 61 | select HAVE_ARCH_SECCOMP_FILTER |
| 62 | select HAVE_ARCH_TRACEHOOK |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 63 | select HAVE_ASM_MODVERSIONS |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 64 | select HAVE_CONTEXT_TRACKING |
| 65 | select HAVE_DEBUG_KMEMLEAK |
| 66 | select HAVE_DMA_CONTIGUOUS if MMU |
| 67 | select HAVE_EBPF_JIT if MMU |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 68 | select HAVE_FUTEX_CMPXCHG if FUTEX |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 69 | select HAVE_GCC_PLUGINS |
| 70 | select HAVE_GENERIC_VDSO if MMU && 64BIT |
| 71 | select HAVE_PCI |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 72 | select HAVE_PERF_EVENTS |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 73 | select HAVE_PERF_REGS |
| 74 | select HAVE_PERF_USER_STACK_DUMP |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 75 | select HAVE_STACKPROTECTOR |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 76 | select HAVE_SYSCALL_TRACEPOINTS |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 77 | select IRQ_DOMAIN |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 78 | select MODULES_USE_ELF_RELA if MODULES |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 79 | select MODULE_SECTIONS if MODULES |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 80 | select OF |
| 81 | select OF_EARLY_FLATTREE |
| 82 | select OF_IRQ |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 83 | select PCI_DOMAINS_GENERIC if PCI |
| 84 | select PCI_MSI if PCI |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 85 | select RISCV_INTC |
| 86 | select RISCV_TIMER if RISCV_SBI |
| 87 | select SPARSE_IRQ |
| 88 | select SYSCTL_EXCEPTION_TRACE |
| 89 | select THREAD_INFO_IN_TASK |
| 90 | select UACCESS_MEMCPY if !MMU |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 91 | |
| 92 | config ARCH_MMAP_RND_BITS_MIN |
| 93 | default 18 if 64BIT |
| 94 | default 8 |
| 95 | |
| 96 | # max bits determined by the following formula: |
| 97 | # VA_BITS - PAGE_SHIFT - 3 |
| 98 | config ARCH_MMAP_RND_BITS_MAX |
| 99 | default 24 if 64BIT # SV39 based |
| 100 | default 17 |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 101 | |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 102 | # set if we run in machine mode, cleared if we run in supervisor mode |
| 103 | config RISCV_M_MODE |
| 104 | bool |
| 105 | default !MMU |
| 106 | |
| 107 | # set if we are running in S-mode and can use SBI calls |
| 108 | config RISCV_SBI |
| 109 | bool |
| 110 | depends on !RISCV_M_MODE |
| 111 | default y |
| 112 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 113 | config MMU |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 114 | bool "MMU-based Paged Memory Management Support" |
| 115 | default y |
| 116 | help |
| 117 | Select if you want MMU-based virtualised addressing space |
| 118 | support by paged memory management. If unsure, say 'Y'. |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 119 | |
| 120 | config ZONE_DMA32 |
| 121 | bool |
| 122 | default y if 64BIT |
| 123 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 124 | config VA_BITS |
| 125 | int |
| 126 | default 32 if 32BIT |
| 127 | default 39 if 64BIT |
| 128 | |
| 129 | config PA_BITS |
| 130 | int |
| 131 | default 34 if 32BIT |
| 132 | default 56 if 64BIT |
| 133 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 134 | config PAGE_OFFSET |
| 135 | hex |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 136 | default 0xC0000000 if 32BIT && MAXPHYSMEM_1GB |
| 137 | default 0x80000000 if 64BIT && !MMU |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 138 | default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB |
| 139 | default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB |
| 140 | |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 141 | config KASAN_SHADOW_OFFSET |
| 142 | hex |
| 143 | depends on KASAN_GENERIC |
| 144 | default 0xdfffffc800000000 if 64BIT |
| 145 | default 0xffffffff if 32BIT |
| 146 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 147 | config ARCH_FLATMEM_ENABLE |
| 148 | def_bool y |
| 149 | |
| 150 | config ARCH_SPARSEMEM_ENABLE |
| 151 | def_bool y |
Olivier Deprez | 0e64123 | 2021-09-23 10:07:05 +0200 | [diff] [blame] | 152 | depends on MMU |
| 153 | select SPARSEMEM_STATIC if 32BIT && SPARSEMEM |
| 154 | select SPARSEMEM_VMEMMAP_ENABLE if 64BIT |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 155 | |
| 156 | config ARCH_SELECT_MEMORY_MODEL |
| 157 | def_bool ARCH_SPARSEMEM_ENABLE |
| 158 | |
| 159 | config ARCH_WANT_GENERAL_HUGETLB |
| 160 | def_bool y |
| 161 | |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 162 | config ARCH_SUPPORTS_DEBUG_PAGEALLOC |
| 163 | def_bool y |
| 164 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 165 | config SYS_SUPPORTS_HUGETLBFS |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 166 | depends on MMU |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 167 | def_bool y |
| 168 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 169 | config STACKTRACE_SUPPORT |
| 170 | def_bool y |
| 171 | |
| 172 | config TRACE_IRQFLAGS_SUPPORT |
| 173 | def_bool y |
| 174 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 175 | config GENERIC_BUG |
| 176 | def_bool y |
| 177 | depends on BUG |
| 178 | select GENERIC_BUG_RELATIVE_POINTERS if 64BIT |
| 179 | |
| 180 | config GENERIC_BUG_RELATIVE_POINTERS |
| 181 | bool |
| 182 | |
| 183 | config GENERIC_CALIBRATE_DELAY |
| 184 | def_bool y |
| 185 | |
| 186 | config GENERIC_CSUM |
| 187 | def_bool y |
| 188 | |
| 189 | config GENERIC_HWEIGHT |
| 190 | def_bool y |
| 191 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 192 | config FIX_EARLYCON_MEM |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 193 | def_bool MMU |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 194 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 195 | config PGTABLE_LEVELS |
| 196 | int |
| 197 | default 3 if 64BIT |
| 198 | default 2 |
| 199 | |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 200 | config LOCKDEP_SUPPORT |
| 201 | def_bool y |
| 202 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 203 | source "arch/riscv/Kconfig.socs" |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 204 | |
| 205 | menu "Platform type" |
| 206 | |
| 207 | choice |
| 208 | prompt "Base ISA" |
| 209 | default ARCH_RV64I |
| 210 | help |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 211 | This selects the base ISA that this kernel will target and must match |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 212 | the target platform. |
| 213 | |
| 214 | config ARCH_RV32I |
| 215 | bool "RV32I" |
| 216 | select 32BIT |
| 217 | select GENERIC_LIB_ASHLDI3 |
| 218 | select GENERIC_LIB_ASHRDI3 |
| 219 | select GENERIC_LIB_LSHRDI3 |
| 220 | select GENERIC_LIB_UCMPDI2 |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 221 | select MMU |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 222 | |
| 223 | config ARCH_RV64I |
| 224 | bool "RV64I" |
| 225 | select 64BIT |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 226 | select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && GCC_VERSION >= 50000 |
| 227 | select HAVE_DYNAMIC_FTRACE if MMU |
| 228 | select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 229 | select HAVE_FTRACE_MCOUNT_RECORD |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 230 | select HAVE_FUNCTION_GRAPH_TRACER |
| 231 | select HAVE_FUNCTION_TRACER |
| 232 | select SWIOTLB if MMU |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 233 | |
| 234 | endchoice |
| 235 | |
| 236 | # We must be able to map all physical memory into the kernel, but the compiler |
| 237 | # is still a bit more efficient when generating code if it's setup in a manner |
| 238 | # such that it can only map 2GiB of memory. |
| 239 | choice |
| 240 | prompt "Kernel Code Model" |
| 241 | default CMODEL_MEDLOW if 32BIT |
| 242 | default CMODEL_MEDANY if 64BIT |
| 243 | |
| 244 | config CMODEL_MEDLOW |
| 245 | bool "medium low code model" |
| 246 | config CMODEL_MEDANY |
| 247 | bool "medium any code model" |
| 248 | endchoice |
| 249 | |
| 250 | config MODULE_SECTIONS |
| 251 | bool |
| 252 | select HAVE_MOD_ARCH_SPECIFIC |
| 253 | |
| 254 | choice |
| 255 | prompt "Maximum Physical Memory" |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 256 | default MAXPHYSMEM_1GB if 32BIT |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 257 | default MAXPHYSMEM_2GB if 64BIT && CMODEL_MEDLOW |
| 258 | default MAXPHYSMEM_128GB if 64BIT && CMODEL_MEDANY |
| 259 | |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 260 | config MAXPHYSMEM_1GB |
| 261 | depends on 32BIT |
| 262 | bool "1GiB" |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 263 | config MAXPHYSMEM_2GB |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 264 | depends on 64BIT && CMODEL_MEDLOW |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 265 | bool "2GiB" |
| 266 | config MAXPHYSMEM_128GB |
| 267 | depends on 64BIT && CMODEL_MEDANY |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 268 | bool "128GiB" |
| 269 | endchoice |
| 270 | |
| 271 | |
| 272 | config SMP |
| 273 | bool "Symmetric Multi-Processing" |
| 274 | help |
| 275 | This enables support for systems with more than one CPU. If |
| 276 | you say N here, the kernel will run on single and |
| 277 | multiprocessor machines, but will use only one CPU of a |
| 278 | multiprocessor machine. If you say Y here, the kernel will run |
| 279 | on many, but not all, single processor machines. On a single |
| 280 | processor machine, the kernel will run faster if you say N |
| 281 | here. |
| 282 | |
| 283 | If you don't know what to do here, say N. |
| 284 | |
| 285 | config NR_CPUS |
| 286 | int "Maximum number of CPUs (2-32)" |
| 287 | range 2 32 |
| 288 | depends on SMP |
| 289 | default "8" |
| 290 | |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 291 | config HOTPLUG_CPU |
| 292 | bool "Support for hot-pluggable CPUs" |
| 293 | depends on SMP |
| 294 | select GENERIC_IRQ_MIGRATION |
| 295 | help |
| 296 | |
| 297 | Say Y here to experiment with turning CPUs off and on. CPUs |
| 298 | can be controlled through /sys/devices/system/cpu. |
| 299 | |
| 300 | Say N if you want to disable CPU hotplug. |
| 301 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 302 | choice |
| 303 | prompt "CPU Tuning" |
| 304 | default TUNE_GENERIC |
| 305 | |
| 306 | config TUNE_GENERIC |
| 307 | bool "generic" |
| 308 | |
| 309 | endchoice |
| 310 | |
| 311 | config RISCV_ISA_C |
| 312 | bool "Emit compressed instructions when building Linux" |
| 313 | default y |
| 314 | help |
| 315 | Adds "C" to the ISA subsets that the toolchain is allowed to emit |
| 316 | when building Linux, which results in compressed instructions in the |
| 317 | Linux binary. |
| 318 | |
| 319 | If you don't know what to do here, say Y. |
| 320 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 321 | menu "supported PMU type" |
| 322 | depends on PERF_EVENTS |
| 323 | |
| 324 | config RISCV_BASE_PMU |
| 325 | bool "Base Performance Monitoring Unit" |
| 326 | def_bool y |
| 327 | help |
| 328 | A base PMU that serves as a reference implementation and has limited |
| 329 | feature of perf. It can run on any RISC-V machines so serves as the |
| 330 | fallback, but this option can also be disable to reduce kernel size. |
| 331 | |
| 332 | endmenu |
| 333 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 334 | config FPU |
| 335 | bool "FPU support" |
| 336 | default y |
| 337 | help |
| 338 | Say N here if you want to disable all floating-point related procedure |
| 339 | in the kernel. |
| 340 | |
| 341 | If you don't know what to do here, say Y. |
| 342 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 343 | endmenu |
| 344 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 345 | menu "Kernel features" |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 346 | |
| 347 | source "kernel/Kconfig.hz" |
| 348 | |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 349 | config RISCV_SBI_V01 |
| 350 | bool "SBI v0.1 support" |
| 351 | default y |
| 352 | depends on RISCV_SBI |
| 353 | help |
| 354 | This config allows kernel to use SBI v0.1 APIs. This will be |
| 355 | deprecated in future once legacy M-mode software are no longer in use. |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 356 | endmenu |
| 357 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 358 | menu "Boot options" |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 359 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 360 | config CMDLINE |
| 361 | string "Built-in kernel command line" |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 362 | help |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 363 | For most platforms, the arguments for the kernel's command line |
| 364 | are provided at run-time, during boot. However, there are cases |
| 365 | where either no arguments are being provided or the provided |
| 366 | arguments are insufficient or even invalid. |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 367 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 368 | When that occurs, it is possible to define a built-in command |
| 369 | line here and choose how the kernel should use it later on. |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 370 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 371 | choice |
| 372 | prompt "Built-in command line usage" if CMDLINE != "" |
| 373 | default CMDLINE_FALLBACK |
| 374 | help |
| 375 | Choose how the kernel will handle the provided built-in command |
| 376 | line. |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 377 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 378 | config CMDLINE_FALLBACK |
| 379 | bool "Use bootloader kernel arguments if available" |
| 380 | help |
| 381 | Use the built-in command line as fallback in case we get nothing |
| 382 | during boot. This is the default behaviour. |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 383 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 384 | config CMDLINE_EXTEND |
| 385 | bool "Extend bootloader kernel arguments" |
| 386 | help |
| 387 | The command-line arguments provided during boot will be |
| 388 | appended to the built-in command line. This is useful in |
| 389 | cases where the provided arguments are insufficient and |
| 390 | you don't want to or cannot modify them. |
| 391 | |
| 392 | |
| 393 | config CMDLINE_FORCE |
| 394 | bool "Always use the default kernel command string" |
| 395 | help |
| 396 | Always use the built-in command line, even if we get one during |
| 397 | boot. This is useful in case you need to override the provided |
| 398 | command line on systems where you don't have or want control |
| 399 | over it. |
| 400 | |
| 401 | endchoice |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 402 | |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 403 | config EFI_STUB |
| 404 | bool |
| 405 | |
| 406 | config EFI |
| 407 | bool "UEFI runtime support" |
| 408 | depends on OF |
| 409 | select LIBFDT |
| 410 | select UCS2_STRING |
| 411 | select EFI_PARAMS_FROM_FDT |
| 412 | select EFI_STUB |
| 413 | select EFI_GENERIC_STUB |
| 414 | select EFI_RUNTIME_WRAPPERS |
| 415 | select RISCV_ISA_C |
| 416 | depends on MMU |
| 417 | default y |
| 418 | help |
| 419 | This option provides support for runtime services provided |
| 420 | by UEFI firmware (such as non-volatile variables, realtime |
| 421 | clock, and platform reset). A UEFI stub is also provided to |
| 422 | allow the kernel to be booted as an EFI application. This |
| 423 | is only useful on systems that have UEFI firmware. |
| 424 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 425 | endmenu |
| 426 | |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 427 | config BUILTIN_DTB |
| 428 | def_bool n |
| 429 | depends on RISCV_M_MODE |
| 430 | depends on OF |
| 431 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 432 | menu "Power management options" |
| 433 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 434 | source "kernel/power/Kconfig" |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 435 | |
| 436 | endmenu |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame] | 437 | |
| 438 | source "drivers/firmware/Kconfig" |