1 # SPDX-License-Identifier: GPL-2.0-only
3 # For a description of the syntax of this configuration file,
4 # see Documentation/kbuild/kconfig-language.rst.
15 select ACPI_GENERIC_GSI if ACPI
16 select ACPI_REDUCED_HARDWARE_ONLY if ACPI
17 select ARCH_DMA_DEFAULT_COHERENT
18 select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION
19 select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2
20 select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
21 select ARCH_HAS_BINFMT_FLAT
22 select ARCH_HAS_CURRENT_STACK_POINTER
23 select ARCH_HAS_DEBUG_VIRTUAL if MMU
24 select ARCH_HAS_DEBUG_VM_PGTABLE
25 select ARCH_HAS_DEBUG_WX
26 select ARCH_HAS_FORTIFY_SOURCE
27 select ARCH_HAS_GCOV_PROFILE_ALL
28 select ARCH_HAS_GIGANTIC_PAGE
30 select ARCH_HAS_MMIOWB
31 select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
32 select ARCH_HAS_PMEM_API
33 select ARCH_HAS_PTE_SPECIAL
34 select ARCH_HAS_SET_DIRECT_MAP if MMU
35 select ARCH_HAS_SET_MEMORY if MMU
36 select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL
37 select ARCH_HAS_STRICT_MODULE_RWX if MMU && !XIP_KERNEL
38 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
39 select ARCH_HAS_UBSAN_SANITIZE_ALL
40 select ARCH_HAS_VDSO_DATA
41 select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
42 select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
44 select ARCH_SUPPORTS_ATOMIC_RMW
45 select ARCH_SUPPORTS_DEBUG_PAGEALLOC if MMU
46 select ARCH_SUPPORTS_HUGETLBFS if MMU
47 select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU
48 select ARCH_SUPPORTS_PER_VMA_LOCK if MMU
49 select ARCH_USE_MEMTEST
50 select ARCH_USE_QUEUED_RWLOCKS
51 select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
52 select ARCH_WANT_FRAME_POINTERS
53 select ARCH_WANT_GENERAL_HUGETLB if !RISCV_ISA_SVNAPOT
54 select ARCH_WANT_HUGE_PMD_SHARE if 64BIT
55 select ARCH_WANT_LD_ORPHAN_WARN if !XIP_KERNEL
56 select ARCH_WANT_OPTIMIZE_VMEMMAP
57 select ARCH_WANTS_THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE
58 select BINFMT_FLAT_NO_DATA_START_OFFSET if !MMU
59 select BUILDTIME_TABLE_SORT if MMU
60 select CLINT_TIMER if !MMU
61 select CLONE_BACKWARDS
63 select CPU_PM if CPU_IDLE || HIBERNATION
65 select FRAME_POINTER if PERF_EVENTS || (FUNCTION_TRACER && !DYNAMIC_FTRACE)
66 select GENERIC_ARCH_TOPOLOGY
67 select GENERIC_ATOMIC64 if !64BIT
68 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
69 select GENERIC_EARLY_IOREMAP
71 select GENERIC_GETTIMEOFDAY if HAVE_GENERIC_VDSO
72 select GENERIC_IDLE_POLL_SETUP
73 select GENERIC_IOREMAP if MMU
74 select GENERIC_IRQ_IPI if SMP
75 select GENERIC_IRQ_IPI_MUX if SMP
76 select GENERIC_IRQ_MULTI_HANDLER
77 select GENERIC_IRQ_SHOW
78 select GENERIC_IRQ_SHOW_LEVEL
79 select GENERIC_LIB_DEVMEM_IS_ALLOWED
80 select GENERIC_PCI_IOMAP
81 select GENERIC_PTDUMP if MMU
82 select GENERIC_SCHED_CLOCK
83 select GENERIC_SMP_IDLE_THREAD
84 select GENERIC_TIME_VSYSCALL if MMU && 64BIT
85 select GENERIC_VDSO_TIME_NS if HAVE_GENERIC_VDSO
86 select HARDIRQS_SW_RESEND
87 select HAS_IOPORT if MMU
88 select HAVE_ARCH_AUDITSYSCALL
89 select HAVE_ARCH_HUGE_VMALLOC if HAVE_ARCH_HUGE_VMAP
90 select HAVE_ARCH_HUGE_VMAP if MMU && 64BIT && !XIP_KERNEL
91 select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
92 select HAVE_ARCH_JUMP_LABEL_RELATIVE if !XIP_KERNEL
93 select HAVE_ARCH_KASAN if MMU && 64BIT
94 select HAVE_ARCH_KASAN_VMALLOC if MMU && 64BIT
95 select HAVE_ARCH_KFENCE if MMU && 64BIT
96 select HAVE_ARCH_KGDB if !XIP_KERNEL
97 select HAVE_ARCH_KGDB_QXFER_PKT
98 select HAVE_ARCH_MMAP_RND_BITS if MMU
99 select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
100 select HAVE_ARCH_SECCOMP_FILTER
101 select HAVE_ARCH_THREAD_STRUCT_WHITELIST
102 select HAVE_ARCH_TRACEHOOK
103 select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT && MMU
104 select HAVE_ARCH_USERFAULTFD_MINOR if 64BIT && USERFAULTFD
105 select HAVE_ARCH_VMAP_STACK if MMU && 64BIT
106 select HAVE_ASM_MODVERSIONS
107 select HAVE_CONTEXT_TRACKING_USER
108 select HAVE_DEBUG_KMEMLEAK
109 select HAVE_DMA_CONTIGUOUS if MMU
110 select HAVE_DYNAMIC_FTRACE if !XIP_KERNEL && MMU && (CLANG_SUPPORTS_DYNAMIC_FTRACE || GCC_SUPPORTS_DYNAMIC_FTRACE)
111 select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE
112 select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL
113 select HAVE_FUNCTION_GRAPH_TRACER
114 select HAVE_FUNCTION_GRAPH_RETVAL if HAVE_FUNCTION_GRAPH_TRACER
115 select HAVE_FUNCTION_TRACER if !XIP_KERNEL && !PREEMPTION
116 select HAVE_EBPF_JIT if MMU
117 select HAVE_FUNCTION_ARG_ACCESS_API
118 select HAVE_FUNCTION_ERROR_INJECTION
119 select HAVE_GCC_PLUGINS
120 select HAVE_GENERIC_VDSO if MMU && 64BIT
121 select HAVE_IRQ_TIME_ACCOUNTING
122 select HAVE_KPROBES if !XIP_KERNEL
123 select HAVE_KPROBES_ON_FTRACE if !XIP_KERNEL
124 select HAVE_KRETPROBES if !XIP_KERNEL
125 # https://github.com/ClangBuiltLinux/linux/issues/1881
126 select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if !LD_IS_LLD
130 select HAVE_PERF_EVENTS
131 select HAVE_PERF_REGS
132 select HAVE_PERF_USER_STACK_DUMP
133 select HAVE_POSIX_CPU_TIMERS_TASK_WORK
134 select HAVE_REGS_AND_STACK_ACCESS_API
135 select HAVE_RETHOOK if !XIP_KERNEL
137 select HAVE_STACKPROTECTOR
138 select HAVE_SYSCALL_TRACEPOINTS
139 select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU
141 select IRQ_FORCED_THREADING
142 select KASAN_VMALLOC if KASAN
143 select LOCK_MM_AND_FIND_VMA
144 select MODULES_USE_ELF_RELA if MODULES
145 select MODULE_SECTIONS if MODULES
147 select OF_EARLY_FLATTREE
149 select PCI_DOMAINS_GENERIC if PCI
150 select PCI_MSI if PCI
151 select RISCV_ALTERNATIVE if !XIP_KERNEL
153 select RISCV_TIMER if RISCV_SBI
156 select SYSCTL_EXCEPTION_TRACE
157 select THREAD_INFO_IN_TASK
158 select TRACE_IRQFLAGS_SUPPORT
159 select UACCESS_MEMCPY if !MMU
160 select ZONE_DMA32 if 64BIT
162 config CLANG_SUPPORTS_DYNAMIC_FTRACE
164 # https://github.com/llvm/llvm-project/commit/6ab8927931851bb42b2c93a00801dc499d7d9b1e
165 depends on CLANG_VERSION >= 130000
166 # https://github.com/ClangBuiltLinux/linux/issues/1817
167 depends on AS_IS_GNU || (AS_IS_LLVM && (LD_IS_LLD || LD_VERSION >= 23600))
169 config GCC_SUPPORTS_DYNAMIC_FTRACE
171 depends on $(cc-option,-fpatchable-function-entry=8)
173 config ARCH_MMAP_RND_BITS_MIN
177 config ARCH_MMAP_RND_COMPAT_BITS_MIN
180 # max bits determined by the following formula:
181 # VA_BITS - PAGE_SHIFT - 3
182 config ARCH_MMAP_RND_BITS_MAX
183 default 24 if 64BIT # SV39 based
186 config ARCH_MMAP_RND_COMPAT_BITS_MAX
189 # set if we run in machine mode, cleared if we run in supervisor mode
194 # set if we are running in S-mode and can use SBI calls
197 depends on !RISCV_M_MODE
201 bool "MMU-based Paged Memory Management Support"
204 Select if you want MMU-based virtualised addressing space
205 support by paged memory management. If unsure, say 'Y'.
209 default 0xC0000000 if 32BIT && MMU
210 default 0x80000000 if !MMU
211 default 0xff60000000000000 if 64BIT
213 config KASAN_SHADOW_OFFSET
215 depends on KASAN_GENERIC
216 default 0xdfffffff00000000 if 64BIT
217 default 0xffffffff if 32BIT
219 config ARCH_FLATMEM_ENABLE
222 config ARCH_SPARSEMEM_ENABLE
225 select SPARSEMEM_STATIC if 32BIT && SPARSEMEM
226 select SPARSEMEM_VMEMMAP_ENABLE if 64BIT
228 config ARCH_SELECT_MEMORY_MODEL
229 def_bool ARCH_SPARSEMEM_ENABLE
231 config ARCH_SUPPORTS_UPROBES
234 config STACKTRACE_SUPPORT
240 select GENERIC_BUG_RELATIVE_POINTERS if 64BIT
242 config GENERIC_BUG_RELATIVE_POINTERS
245 config GENERIC_CALIBRATE_DELAY
251 config GENERIC_HWEIGHT
254 config FIX_EARLYCON_MEM
257 config PGTABLE_LEVELS
262 config LOCKDEP_SUPPORT
265 config RISCV_DMA_NONCOHERENT
267 select ARCH_HAS_DMA_PREP_COHERENT
268 select ARCH_HAS_SETUP_DMA_OPS
269 select ARCH_HAS_SYNC_DMA_FOR_CPU
270 select ARCH_HAS_SYNC_DMA_FOR_DEVICE
271 select DMA_DIRECT_REMAP
274 def_bool $(as-instr,.insn r 51$(comma) 0$(comma) 0$(comma) t0$(comma) t0$(comma) zero)
276 config AS_HAS_OPTION_ARCH
277 # https://reviews.llvm.org/D123515
279 depends on $(as-instr, .option arch$(comma) +m)
280 depends on !$(as-instr, .option arch$(comma) -i)
282 source "arch/riscv/Kconfig.socs"
283 source "arch/riscv/Kconfig.errata"
288 bool "Allow configurations that result in non-portable kernels"
290 RISC-V kernel binaries are compatible between all known systems
291 whenever possible, but there are some use cases that can only be
292 satisfied by configurations that result in kernel binaries that are
293 not portable between systems.
295 Selecting N does not guarantee kernels will be portable to all known
296 systems. Selecting any of the options guarded by NONPORTABLE will
297 result in kernel binaries that are unlikely to be portable between
306 This selects the base ISA that this kernel will target and must match
311 depends on NONPORTABLE
313 select GENERIC_LIB_ASHLDI3
314 select GENERIC_LIB_ASHRDI3
315 select GENERIC_LIB_LSHRDI3
316 select GENERIC_LIB_UCMPDI2
321 select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
322 select SWIOTLB if MMU
326 # We must be able to map all physical memory into the kernel, but the compiler
327 # is still a bit more efficient when generating code if it's setup in a manner
328 # such that it can only map 2GiB of memory.
330 prompt "Kernel Code Model"
331 default CMODEL_MEDLOW if 32BIT
332 default CMODEL_MEDANY if 64BIT
335 bool "medium low code model"
337 bool "medium any code model"
340 config MODULE_SECTIONS
342 select HAVE_MOD_ARCH_SPECIFIC
345 bool "Symmetric Multi-Processing"
347 This enables support for systems with more than one CPU. If
348 you say N here, the kernel will run on single and
349 multiprocessor machines, but will use only one CPU of a
350 multiprocessor machine. If you say Y here, the kernel will run
351 on many, but not all, single processor machines. On a single
352 processor machine, the kernel will run faster if you say N
355 If you don't know what to do here, say N.
358 bool "Multi-core scheduler support"
361 Multi-core scheduler support improves the CPU scheduler's decision
362 making when dealing with multi-core CPU chips at a cost of slightly
363 increased overhead in some places. If unsure say N here.
366 int "Maximum number of CPUs (2-512)"
368 range 2 512 if !RISCV_SBI_V01
369 range 2 32 if RISCV_SBI_V01 && 32BIT
370 range 2 64 if RISCV_SBI_V01 && 64BIT
371 default "32" if 32BIT
372 default "64" if 64BIT
375 bool "Support for hot-pluggable CPUs"
377 select GENERIC_IRQ_MIGRATION
380 Say Y here to experiment with turning CPUs off and on. CPUs
381 can be controlled through /sys/devices/system/cpu.
383 Say N if you want to disable CPU hotplug.
394 # Common NUMA Features
396 bool "NUMA Memory Allocation and Scheduler Support"
397 depends on SMP && MMU
398 select ARCH_SUPPORTS_NUMA_BALANCING
399 select GENERIC_ARCH_NUMA
400 select NEED_PER_CPU_EMBED_FIRST_CHUNK
402 select USE_PERCPU_NUMA_NODE_ID
404 Enable NUMA (Non-Uniform Memory Access) support.
406 The kernel will try to allocate memory used by a CPU on the
407 local memory of the CPU and add some more NUMA awareness to the kernel.
410 int "Maximum NUMA Nodes (as a power of 2)"
415 Specify the maximum number of NUMA Nodes available on the target
416 system. Increases memory reserved to accommodate various tables.
418 config RISCV_ALTERNATIVE
420 depends on !XIP_KERNEL
422 This Kconfig allows the kernel to automatically patch the
423 erratum or cpufeature required by the execution platform at run
424 time. The code patching overhead is minimal, as it's only done
425 once at boot and once on each module load.
427 config RISCV_ALTERNATIVE_EARLY
429 depends on RISCV_ALTERNATIVE
431 Allows early patching of the kernel for special errata
434 bool "Emit compressed instructions when building Linux"
437 Adds "C" to the ISA subsets that the toolchain is allowed to emit
438 when building Linux, which results in compressed instructions in the
441 If you don't know what to do here, say Y.
443 config RISCV_ISA_SVNAPOT
444 bool "Svnapot extension support for supervisor mode NAPOT pages"
445 depends on 64BIT && MMU
446 depends on RISCV_ALTERNATIVE
449 Allow kernel to detect the Svnapot ISA-extension dynamically at boot
450 time and enable its usage.
452 The Svnapot extension is used to mark contiguous PTEs as a range
453 of contiguous virtual-to-physical translations for a naturally
454 aligned power-of-2 (NAPOT) granularity larger than the base 4KB page
455 size. When HUGETLBFS is also selected this option unconditionally
456 allocates some memory for each NAPOT page size supported by the kernel.
457 When optimizing for low memory consumption and for platforms without
458 the Svnapot extension, it may be better to say N here.
460 If you don't know what to do here, say Y.
462 config RISCV_ISA_SVPBMT
463 bool "Svpbmt extension support for supervisor mode page-based memory types"
464 depends on 64BIT && MMU
465 depends on RISCV_ALTERNATIVE
468 Adds support to dynamically detect the presence of the Svpbmt
469 ISA-extension (Supervisor-mode: page-based memory types) and
472 The memory type for a page contains a combination of attributes
473 that indicate the cacheability, idempotency, and ordering
474 properties for access to that page.
476 The Svpbmt extension is only available on 64-bit cpus.
478 If you don't know what to do here, say Y.
480 config TOOLCHAIN_HAS_V
483 depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64iv)
484 depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32iv)
485 depends on LLD_VERSION >= 140000 || LD_VERSION >= 23800
486 depends on AS_HAS_OPTION_ARCH
489 bool "VECTOR extension support"
490 depends on TOOLCHAIN_HAS_V
492 select DYNAMIC_SIGFRAME
495 Say N here if you want to disable all vector related procedure
498 If you don't know what to do here, say Y.
500 config RISCV_ISA_V_DEFAULT_ENABLE
501 bool "Enable userspace Vector by default"
502 depends on RISCV_ISA_V
505 Say Y here if you want to enable Vector in userspace by default.
506 Otherwise, userspace has to make explicit prctl() call to enable
507 Vector, or enable it via the sysctl interface.
509 If you don't know what to do here, say Y.
511 config TOOLCHAIN_HAS_ZBB
514 depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbb)
515 depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbb)
516 depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900
517 depends on AS_HAS_OPTION_ARCH
520 bool "Zbb extension support for bit manipulation instructions"
521 depends on TOOLCHAIN_HAS_ZBB
523 depends on RISCV_ALTERNATIVE
526 Adds support to dynamically detect the presence of the ZBB
527 extension (basic bit manipulation) and enable its usage.
529 The Zbb extension provides instructions to accelerate a number
530 of bit-specific operations (count bit population, sign extending,
533 If you don't know what to do here, say Y.
535 config RISCV_ISA_ZICBOM
536 bool "Zicbom extension support for non-coherent DMA operation"
538 depends on RISCV_ALTERNATIVE
540 select RISCV_DMA_NONCOHERENT
542 Adds support to dynamically detect the presence of the ZICBOM
543 extension (Cache Block Management Operations) and enable its
546 The Zicbom extension can be used to handle for example
547 non-coherent DMA support on devices that need it.
549 If you don't know what to do here, say Y.
551 config RISCV_ISA_ZICBOZ
552 bool "Zicboz extension support for faster zeroing of memory"
554 depends on RISCV_ALTERNATIVE
557 Enable the use of the Zicboz extension (cbo.zero instruction)
560 The Zicboz extension is used for faster zeroing of memory.
562 If you don't know what to do here, say Y.
564 config TOOLCHAIN_HAS_ZIHINTPAUSE
567 depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zihintpause)
568 depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zihintpause)
569 depends on LLD_VERSION >= 150000 || LD_VERSION >= 23600
571 config TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
573 # https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=aed44286efa8ae8717a77d94b51ac3614e2ca6dc
574 depends on AS_IS_GNU && AS_VERSION >= 23800
576 Newer binutils versions default to ISA spec version 20191213 which
577 moves some instructions from the I extension to the Zicsr and Zifencei
580 config TOOLCHAIN_NEEDS_OLD_ISA_SPEC
582 depends on TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
583 # https://github.com/llvm/llvm-project/commit/22e199e6afb1263c943c0c0d4498694e15bf8a16
584 depends on CC_IS_CLANG && CLANG_VERSION < 170000
586 Certain versions of clang do not support zicsr and zifencei via -march
587 but newer versions of binutils require it for the reasons noted in the
588 help text of CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI. This
589 option causes an older ISA spec compatible with these older versions
590 of clang to be passed to GAS, which has the same result as passing zicsr
591 and zifencei to -march.
597 Say N here if you want to disable all floating-point related procedure
600 If you don't know what to do here, say Y.
603 bool "Independent irq & softirq stacks" if EXPERT
605 select HAVE_IRQ_EXIT_ON_IRQ_STACK
606 select HAVE_SOFTIRQ_ON_OWN_STACK
608 Add independent irq & softirq stacks for percpu to prevent kernel stack
609 overflows. We may save some memory footprint by disabling IRQ_STACKS.
611 config THREAD_SIZE_ORDER
612 int "Kernel stack size (in power-of-two numbers of page size)" if VMAP_STACK && EXPERT
614 default 1 if 32BIT && !KASAN
615 default 3 if 64BIT && KASAN
618 Specify the Pages of thread stack size (from 4KB to 64KB), which also
619 affects irq stack size, which is equal to thread stack size.
621 endmenu # "Platform type"
623 menu "Kernel features"
625 source "kernel/Kconfig.hz"
628 bool "SBI v0.1 support"
631 This config allows kernel to use SBI v0.1 APIs. This will be
632 deprecated in future once legacy M-mode software are no longer in use.
634 config RISCV_BOOT_SPINWAIT
635 bool "Spinwait booting method"
637 default y if RISCV_SBI_V01 || RISCV_M_MODE
639 This enables support for booting Linux via spinwait method. In the
640 spinwait method, all cores randomly jump to Linux. One of the cores
641 gets chosen via lottery and all other keep spinning on a percpu
642 variable. This method cannot support CPU hotplug and sparse hartid
643 scheme. It should be only enabled for M-mode Linux or platforms relying
644 on older firmware without SBI HSM extension. All other platforms should
645 rely on ordered booting via SBI HSM extension which gets chosen
646 dynamically at runtime if the firmware supports it.
648 Since spinwait is incompatible with sparse hart IDs, it requires
649 NR_CPUS be large enough to contain the physical hart ID of the first
652 If unsure what to do here, say N.
655 bool "Kexec system call"
657 select HOTPLUG_CPU if SMP
660 kexec is a system call that implements the ability to shutdown your
661 current kernel, and to start another kernel. It is like a reboot
662 but it is independent of the system firmware. And like a reboot
663 you can start any kernel with it, not just Linux.
665 The name comes from the similarity to the exec system call.
668 bool "kexec file based systmem call"
669 depends on 64BIT && MMU
670 select HAVE_IMA_KEXEC if IMA
674 This is new version of kexec system call. This system call is
675 file based and takes file descriptors as system call argument
676 for kernel and initramfs as opposed to list of segments as
677 accepted by previous system call.
679 If you don't know what to do here, say Y.
681 config ARCH_HAS_KEXEC_PURGATORY
684 depends on CRYPTO_SHA256=y
687 bool "Build kdump crash kernel"
689 Generate crash dump after being started by kexec. This should
690 be normally only set in special crash dump kernels which are
691 loaded in the main kernel with kexec-tools into a specially
692 reserved region and then later executed after a crash by
695 For more details see Documentation/admin-guide/kdump/kdump.rst
698 bool "Kernel support for 32-bit U-mode"
700 depends on 64BIT && MMU
702 This option enables support for a 32-bit U-mode running under a 64-bit
703 kernel at S-mode. riscv32-specific components such as system calls,
704 the user helper functions (vdso), signal rt_frame functions and the
705 ptrace interface are handled appropriately by the kernel.
707 If you want to execute 32-bit userspace applications, say Y.
710 bool "Build a relocatable kernel"
711 depends on MMU && 64BIT && !XIP_KERNEL
713 This builds a kernel as a Position Independent Executable (PIE),
714 which retains all relocation metadata required to relocate the
715 kernel binary at runtime to a different virtual address than the
716 address it was linked at.
717 Since RISCV uses the RELA relocation format, this requires a
718 relocation pass at runtime even if the kernel is loaded at the
719 same address it was linked at.
723 endmenu # "Kernel features"
728 string "Built-in kernel command line"
730 For most platforms, the arguments for the kernel's command line
731 are provided at run-time, during boot. However, there are cases
732 where either no arguments are being provided or the provided
733 arguments are insufficient or even invalid.
735 When that occurs, it is possible to define a built-in command
736 line here and choose how the kernel should use it later on.
739 prompt "Built-in command line usage" if CMDLINE != ""
740 default CMDLINE_FALLBACK
742 Choose how the kernel will handle the provided built-in command
745 config CMDLINE_FALLBACK
746 bool "Use bootloader kernel arguments if available"
748 Use the built-in command line as fallback in case we get nothing
749 during boot. This is the default behaviour.
751 config CMDLINE_EXTEND
752 bool "Extend bootloader kernel arguments"
754 The command-line arguments provided during boot will be
755 appended to the built-in command line. This is useful in
756 cases where the provided arguments are insufficient and
757 you don't want to or cannot modify them.
760 bool "Always use the default kernel command string"
762 Always use the built-in command line, even if we get one during
763 boot. This is useful in case you need to override the provided
764 command line on systems where you don't have or want control
773 bool "UEFI runtime support"
774 depends on OF && !XIP_KERNEL
777 select ARCH_SUPPORTS_ACPI if 64BIT
778 select EFI_GENERIC_STUB
779 select EFI_PARAMS_FROM_FDT
780 select EFI_RUNTIME_WRAPPERS
786 This option provides support for runtime services provided
787 by UEFI firmware (such as non-volatile variables, realtime
788 clock, and platform reset). A UEFI stub is also provided to
789 allow the kernel to be booted as an EFI application. This
790 is only useful on systems that have UEFI firmware.
792 config CC_HAVE_STACKPROTECTOR_TLS
793 def_bool $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=tp -mstack-protector-guard-offset=0)
795 config STACKPROTECTOR_PER_TASK
797 depends on !RANDSTRUCT
798 depends on STACKPROTECTOR && CC_HAVE_STACKPROTECTOR_TLS
800 config PHYS_RAM_BASE_FIXED
801 bool "Explicitly specified physical RAM address"
802 depends on NONPORTABLE
806 hex "Platform Physical RAM address"
807 depends on PHYS_RAM_BASE_FIXED
810 This is the physical address of RAM in the system. It has to be
811 explicitly specified to run early relocations of read-write data
815 bool "Kernel Execute-In-Place from ROM"
816 depends on MMU && SPARSEMEM && NONPORTABLE
817 # This prevents XIP from being enabled by all{yes,mod}config, which
818 # fail to build since XIP doesn't support large kernels.
819 depends on !COMPILE_TEST
820 select PHYS_RAM_BASE_FIXED
822 Execute-In-Place allows the kernel to run from non-volatile storage
823 directly addressable by the CPU, such as NOR flash. This saves RAM
824 space since the text section of the kernel is not loaded from flash
825 to RAM. Read-write sections, such as the data section and stack,
826 are still copied to RAM. The XIP kernel is not compressed since
827 it has to run directly from flash, so it will take more space to
828 store it. The flash address used to link the kernel object files,
829 and for storing it, is configuration dependent. Therefore, if you
830 say Y here, you must know the proper physical address where to
831 store the kernel image depending on your own flash memory usage.
833 Also note that the make target becomes "make xipImage" rather than
834 "make zImage" or "make Image". The final kernel binary to put in
835 ROM memory will be arch/riscv/boot/xipImage.
837 SPARSEMEM is required because the kernel text and rodata that are
838 flash resident are not backed by memmap, then any attempt to get
839 a struct page on those regions will trigger a fault.
844 hex "XIP Kernel Physical Location"
845 depends on XIP_KERNEL
848 This is the physical address in your flash memory the kernel will
849 be linked for and stored to. This address is dependent on your
852 config RISCV_ISA_FALLBACK
853 bool "Permit falling back to parsing riscv,isa for extension support by default"
856 Parsing the "riscv,isa" devicetree property has been deprecated and
857 replaced by a list of explicitly defined strings. For compatibility
858 with existing platforms, the kernel will fall back to parsing the
859 "riscv,isa" property if the replacements are not found.
861 Selecting N here will result in a kernel that does not use the
862 fallback, unless the commandline "riscv_isa_fallback" parameter is
865 Please see the dt-binding, located at
866 Documentation/devicetree/bindings/riscv/extensions.yaml for details
867 on the replacement properties, "riscv,isa-base" and
868 "riscv,isa-extensions".
870 endmenu # "Boot options"
874 depends on OF && NONPORTABLE
875 default y if XIP_KERNEL
884 menu "Power management options"
886 source "kernel/power/Kconfig"
888 # Hibernation is only possible on systems where the SBI implementation has
889 # marked its reserved memory as not accessible from, or does not run
890 # from the same memory as, Linux
891 config ARCH_HIBERNATION_POSSIBLE
894 config ARCH_HIBERNATION_HEADER
897 config ARCH_SUSPEND_POSSIBLE
900 endmenu # "Power management options"
902 menu "CPU Power Management"
904 source "drivers/cpuidle/Kconfig"
906 source "drivers/cpufreq/Kconfig"
908 endmenu # "CPU Power Management"
910 source "arch/riscv/kvm/Kconfig"
912 source "drivers/acpi/Kconfig"