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_PMEM_API
32 select ARCH_HAS_PTE_SPECIAL
33 select ARCH_HAS_SET_DIRECT_MAP if MMU
34 select ARCH_HAS_SET_MEMORY if MMU
35 select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL
36 select ARCH_HAS_STRICT_MODULE_RWX if MMU && !XIP_KERNEL
37 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
38 select ARCH_HAS_UBSAN_SANITIZE_ALL
39 select ARCH_HAS_VDSO_DATA
40 select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
41 select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
43 select ARCH_SUPPORTS_ATOMIC_RMW
44 select ARCH_SUPPORTS_DEBUG_PAGEALLOC if MMU
45 select ARCH_SUPPORTS_HUGETLBFS if MMU
46 select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU
47 select ARCH_SUPPORTS_PER_VMA_LOCK if MMU
48 select ARCH_USE_MEMTEST
49 select ARCH_USE_QUEUED_RWLOCKS
50 select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
51 select ARCH_WANT_FRAME_POINTERS
52 select ARCH_WANT_GENERAL_HUGETLB if !RISCV_ISA_SVNAPOT
53 select ARCH_WANT_HUGE_PMD_SHARE if 64BIT
54 select ARCH_WANT_LD_ORPHAN_WARN if !XIP_KERNEL
55 select ARCH_WANT_OPTIMIZE_VMEMMAP
56 select ARCH_WANTS_THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE
57 select BINFMT_FLAT_NO_DATA_START_OFFSET if !MMU
58 select BUILDTIME_TABLE_SORT if MMU
59 select CLINT_TIMER if !MMU
60 select CLONE_BACKWARDS
62 select CPU_PM if CPU_IDLE || HIBERNATION
64 select GENERIC_ARCH_TOPOLOGY
65 select GENERIC_ATOMIC64 if !64BIT
66 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
67 select GENERIC_EARLY_IOREMAP
69 select GENERIC_GETTIMEOFDAY if HAVE_GENERIC_VDSO
70 select GENERIC_IDLE_POLL_SETUP
71 select GENERIC_IOREMAP if MMU
72 select GENERIC_IRQ_IPI if SMP
73 select GENERIC_IRQ_IPI_MUX if SMP
74 select GENERIC_IRQ_MULTI_HANDLER
75 select GENERIC_IRQ_SHOW
76 select GENERIC_IRQ_SHOW_LEVEL
77 select GENERIC_LIB_DEVMEM_IS_ALLOWED
78 select GENERIC_PCI_IOMAP
79 select GENERIC_PTDUMP if MMU
80 select GENERIC_SCHED_CLOCK
81 select GENERIC_SMP_IDLE_THREAD
82 select GENERIC_TIME_VSYSCALL if MMU && 64BIT
83 select GENERIC_VDSO_TIME_NS if HAVE_GENERIC_VDSO
84 select HARDIRQS_SW_RESEND
85 select HAS_IOPORT if MMU
86 select HAVE_ARCH_AUDITSYSCALL
87 select HAVE_ARCH_HUGE_VMALLOC if HAVE_ARCH_HUGE_VMAP
88 select HAVE_ARCH_HUGE_VMAP if MMU && 64BIT && !XIP_KERNEL
89 select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
90 select HAVE_ARCH_JUMP_LABEL_RELATIVE if !XIP_KERNEL
91 select HAVE_ARCH_KASAN if MMU && 64BIT
92 select HAVE_ARCH_KASAN_VMALLOC if MMU && 64BIT
93 select HAVE_ARCH_KFENCE if MMU && 64BIT
94 select HAVE_ARCH_KGDB if !XIP_KERNEL
95 select HAVE_ARCH_KGDB_QXFER_PKT
96 select HAVE_ARCH_MMAP_RND_BITS if MMU
97 select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
98 select HAVE_ARCH_SECCOMP_FILTER
99 select HAVE_ARCH_THREAD_STRUCT_WHITELIST
100 select HAVE_ARCH_TRACEHOOK
101 select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT && MMU
102 select HAVE_ARCH_VMAP_STACK if MMU && 64BIT
103 select HAVE_ASM_MODVERSIONS
104 select HAVE_CONTEXT_TRACKING_USER
105 select HAVE_DEBUG_KMEMLEAK
106 select HAVE_DMA_CONTIGUOUS if MMU
107 select HAVE_EBPF_JIT if MMU
108 select HAVE_FUNCTION_ARG_ACCESS_API
109 select HAVE_FUNCTION_ERROR_INJECTION
110 select HAVE_GCC_PLUGINS
111 select HAVE_GENERIC_VDSO if MMU && 64BIT
112 select HAVE_IRQ_TIME_ACCOUNTING
113 select HAVE_KPROBES if !XIP_KERNEL
114 select HAVE_KPROBES_ON_FTRACE if !XIP_KERNEL
115 select HAVE_KRETPROBES if !XIP_KERNEL
116 select HAVE_RETHOOK if !XIP_KERNEL
120 select HAVE_PERF_EVENTS
121 select HAVE_PERF_REGS
122 select HAVE_PERF_USER_STACK_DUMP
123 select HAVE_POSIX_CPU_TIMERS_TASK_WORK
124 select HAVE_REGS_AND_STACK_ACCESS_API
126 select HAVE_STACKPROTECTOR
127 select HAVE_SYSCALL_TRACEPOINTS
129 select IRQ_FORCED_THREADING
130 select KASAN_VMALLOC if KASAN
131 select MODULES_USE_ELF_RELA if MODULES
132 select MODULE_SECTIONS if MODULES
134 select OF_EARLY_FLATTREE
136 select PCI_DOMAINS_GENERIC if PCI
137 select PCI_MSI if PCI
138 select RISCV_ALTERNATIVE if !XIP_KERNEL
140 select RISCV_TIMER if RISCV_SBI
143 select SYSCTL_EXCEPTION_TRACE
144 select THREAD_INFO_IN_TASK
145 select TRACE_IRQFLAGS_SUPPORT
146 select UACCESS_MEMCPY if !MMU
147 select ZONE_DMA32 if 64BIT
148 select HAVE_DYNAMIC_FTRACE if !XIP_KERNEL && MMU && (CLANG_SUPPORTS_DYNAMIC_FTRACE || GCC_SUPPORTS_DYNAMIC_FTRACE)
149 select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE
150 select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL
151 select HAVE_FUNCTION_GRAPH_TRACER
152 select HAVE_FUNCTION_TRACER if !XIP_KERNEL && !PREEMPTION
154 config CLANG_SUPPORTS_DYNAMIC_FTRACE
156 # https://github.com/llvm/llvm-project/commit/6ab8927931851bb42b2c93a00801dc499d7d9b1e
157 depends on CLANG_VERSION >= 130000
158 # https://github.com/ClangBuiltLinux/linux/issues/1817
159 depends on AS_IS_GNU || (AS_IS_LLVM && (LD_IS_LLD || LD_VERSION >= 23600))
161 config GCC_SUPPORTS_DYNAMIC_FTRACE
163 depends on $(cc-option,-fpatchable-function-entry=8)
165 config ARCH_MMAP_RND_BITS_MIN
169 config ARCH_MMAP_RND_COMPAT_BITS_MIN
172 # max bits determined by the following formula:
173 # VA_BITS - PAGE_SHIFT - 3
174 config ARCH_MMAP_RND_BITS_MAX
175 default 24 if 64BIT # SV39 based
178 config ARCH_MMAP_RND_COMPAT_BITS_MAX
181 # set if we run in machine mode, cleared if we run in supervisor mode
186 # set if we are running in S-mode and can use SBI calls
189 depends on !RISCV_M_MODE
193 bool "MMU-based Paged Memory Management Support"
196 Select if you want MMU-based virtualised addressing space
197 support by paged memory management. If unsure, say 'Y'.
201 default 0xC0000000 if 32BIT && MMU
202 default 0x80000000 if !MMU
203 default 0xff60000000000000 if 64BIT
205 config KASAN_SHADOW_OFFSET
207 depends on KASAN_GENERIC
208 default 0xdfffffff00000000 if 64BIT
209 default 0xffffffff if 32BIT
211 config ARCH_FLATMEM_ENABLE
214 config ARCH_SPARSEMEM_ENABLE
217 select SPARSEMEM_STATIC if 32BIT && SPARSEMEM
218 select SPARSEMEM_VMEMMAP_ENABLE if 64BIT
220 config ARCH_SELECT_MEMORY_MODEL
221 def_bool ARCH_SPARSEMEM_ENABLE
223 config ARCH_SUPPORTS_UPROBES
226 config STACKTRACE_SUPPORT
232 select GENERIC_BUG_RELATIVE_POINTERS if 64BIT
234 config GENERIC_BUG_RELATIVE_POINTERS
237 config GENERIC_CALIBRATE_DELAY
243 config GENERIC_HWEIGHT
246 config FIX_EARLYCON_MEM
249 config PGTABLE_LEVELS
254 config LOCKDEP_SUPPORT
257 config RISCV_DMA_NONCOHERENT
259 select ARCH_HAS_DMA_PREP_COHERENT
260 select ARCH_HAS_SETUP_DMA_OPS
261 select ARCH_HAS_SYNC_DMA_FOR_CPU
262 select ARCH_HAS_SYNC_DMA_FOR_DEVICE
263 select DMA_DIRECT_REMAP
266 def_bool $(as-instr,.insn r 51$(comma) 0$(comma) 0$(comma) t0$(comma) t0$(comma) zero)
268 config AS_HAS_OPTION_ARCH
269 # https://reviews.llvm.org/D123515
271 depends on $(as-instr, .option arch$(comma) +m)
272 depends on !$(as-instr, .option arch$(comma) -i)
274 source "arch/riscv/Kconfig.socs"
275 source "arch/riscv/Kconfig.errata"
280 bool "Allow configurations that result in non-portable kernels"
282 RISC-V kernel binaries are compatible between all known systems
283 whenever possible, but there are some use cases that can only be
284 satisfied by configurations that result in kernel binaries that are
285 not portable between systems.
287 Selecting N does not guarantee kernels will be portable to all known
288 systems. Selecting any of the options guarded by NONPORTABLE will
289 result in kernel binaries that are unlikely to be portable between
298 This selects the base ISA that this kernel will target and must match
303 depends on NONPORTABLE
305 select GENERIC_LIB_ASHLDI3
306 select GENERIC_LIB_ASHRDI3
307 select GENERIC_LIB_LSHRDI3
308 select GENERIC_LIB_UCMPDI2
313 select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
314 select SWIOTLB if MMU
318 # We must be able to map all physical memory into the kernel, but the compiler
319 # is still a bit more efficient when generating code if it's setup in a manner
320 # such that it can only map 2GiB of memory.
322 prompt "Kernel Code Model"
323 default CMODEL_MEDLOW if 32BIT
324 default CMODEL_MEDANY if 64BIT
327 bool "medium low code model"
329 bool "medium any code model"
332 config MODULE_SECTIONS
334 select HAVE_MOD_ARCH_SPECIFIC
337 bool "Symmetric Multi-Processing"
339 This enables support for systems with more than one CPU. If
340 you say N here, the kernel will run on single and
341 multiprocessor machines, but will use only one CPU of a
342 multiprocessor machine. If you say Y here, the kernel will run
343 on many, but not all, single processor machines. On a single
344 processor machine, the kernel will run faster if you say N
347 If you don't know what to do here, say N.
350 bool "Multi-core scheduler support"
353 Multi-core scheduler support improves the CPU scheduler's decision
354 making when dealing with multi-core CPU chips at a cost of slightly
355 increased overhead in some places. If unsure say N here.
358 int "Maximum number of CPUs (2-512)"
360 range 2 512 if !RISCV_SBI_V01
361 range 2 32 if RISCV_SBI_V01 && 32BIT
362 range 2 64 if RISCV_SBI_V01 && 64BIT
363 default "32" if 32BIT
364 default "64" if 64BIT
367 bool "Support for hot-pluggable CPUs"
369 select GENERIC_IRQ_MIGRATION
372 Say Y here to experiment with turning CPUs off and on. CPUs
373 can be controlled through /sys/devices/system/cpu.
375 Say N if you want to disable CPU hotplug.
386 # Common NUMA Features
388 bool "NUMA Memory Allocation and Scheduler Support"
389 depends on SMP && MMU
390 select ARCH_SUPPORTS_NUMA_BALANCING
391 select GENERIC_ARCH_NUMA
392 select NEED_PER_CPU_EMBED_FIRST_CHUNK
394 select USE_PERCPU_NUMA_NODE_ID
396 Enable NUMA (Non-Uniform Memory Access) support.
398 The kernel will try to allocate memory used by a CPU on the
399 local memory of the CPU and add some more NUMA awareness to the kernel.
402 int "Maximum NUMA Nodes (as a power of 2)"
407 Specify the maximum number of NUMA Nodes available on the target
408 system. Increases memory reserved to accommodate various tables.
410 config RISCV_ALTERNATIVE
412 depends on !XIP_KERNEL
414 This Kconfig allows the kernel to automatically patch the
415 erratum or cpufeature required by the execution platform at run
416 time. The code patching overhead is minimal, as it's only done
417 once at boot and once on each module load.
419 config RISCV_ALTERNATIVE_EARLY
421 depends on RISCV_ALTERNATIVE
423 Allows early patching of the kernel for special errata
426 bool "Emit compressed instructions when building Linux"
429 Adds "C" to the ISA subsets that the toolchain is allowed to emit
430 when building Linux, which results in compressed instructions in the
433 If you don't know what to do here, say Y.
435 config RISCV_ISA_SVNAPOT
436 bool "Svnapot extension support for supervisor mode NAPOT pages"
437 depends on 64BIT && MMU
438 depends on RISCV_ALTERNATIVE
441 Allow kernel to detect the Svnapot ISA-extension dynamically at boot
442 time and enable its usage.
444 The Svnapot extension is used to mark contiguous PTEs as a range
445 of contiguous virtual-to-physical translations for a naturally
446 aligned power-of-2 (NAPOT) granularity larger than the base 4KB page
447 size. When HUGETLBFS is also selected this option unconditionally
448 allocates some memory for each NAPOT page size supported by the kernel.
449 When optimizing for low memory consumption and for platforms without
450 the Svnapot extension, it may be better to say N here.
452 If you don't know what to do here, say Y.
454 config RISCV_ISA_SVPBMT
455 bool "Svpbmt extension support for supervisor mode page-based memory types"
456 depends on 64BIT && MMU
457 depends on RISCV_ALTERNATIVE
460 Adds support to dynamically detect the presence of the Svpbmt
461 ISA-extension (Supervisor-mode: page-based memory types) and
464 The memory type for a page contains a combination of attributes
465 that indicate the cacheability, idempotency, and ordering
466 properties for access to that page.
468 The Svpbmt extension is only available on 64-bit cpus.
470 If you don't know what to do here, say Y.
472 config TOOLCHAIN_HAS_V
475 depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64iv)
476 depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32iv)
477 depends on LLD_VERSION >= 140000 || LD_VERSION >= 23800
478 depends on AS_HAS_OPTION_ARCH
481 bool "VECTOR extension support"
482 depends on TOOLCHAIN_HAS_V
484 select DYNAMIC_SIGFRAME
487 Say N here if you want to disable all vector related procedure
490 If you don't know what to do here, say Y.
492 config RISCV_ISA_V_DEFAULT_ENABLE
493 bool "Enable userspace Vector by default"
494 depends on RISCV_ISA_V
497 Say Y here if you want to enable Vector in userspace by default.
498 Otherwise, userspace has to make explicit prctl() call to enable
499 Vector, or enable it via the sysctl interface.
501 If you don't know what to do here, say Y.
503 config TOOLCHAIN_HAS_ZBB
506 depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbb)
507 depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbb)
508 depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900
509 depends on AS_HAS_OPTION_ARCH
512 bool "Zbb extension support for bit manipulation instructions"
513 depends on TOOLCHAIN_HAS_ZBB
515 depends on RISCV_ALTERNATIVE
518 Adds support to dynamically detect the presence of the ZBB
519 extension (basic bit manipulation) and enable its usage.
521 The Zbb extension provides instructions to accelerate a number
522 of bit-specific operations (count bit population, sign extending,
525 If you don't know what to do here, say Y.
527 config RISCV_ISA_ZICBOM
528 bool "Zicbom extension support for non-coherent DMA operation"
530 depends on RISCV_ALTERNATIVE
532 select RISCV_DMA_NONCOHERENT
534 Adds support to dynamically detect the presence of the ZICBOM
535 extension (Cache Block Management Operations) and enable its
538 The Zicbom extension can be used to handle for example
539 non-coherent DMA support on devices that need it.
541 If you don't know what to do here, say Y.
543 config RISCV_ISA_ZICBOZ
544 bool "Zicboz extension support for faster zeroing of memory"
546 depends on RISCV_ALTERNATIVE
549 Enable the use of the Zicboz extension (cbo.zero instruction)
552 The Zicboz extension is used for faster zeroing of memory.
554 If you don't know what to do here, say Y.
556 config TOOLCHAIN_HAS_ZIHINTPAUSE
559 depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zihintpause)
560 depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zihintpause)
561 depends on LLD_VERSION >= 150000 || LD_VERSION >= 23600
563 config TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
565 # https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=aed44286efa8ae8717a77d94b51ac3614e2ca6dc
566 depends on AS_IS_GNU && AS_VERSION >= 23800
568 Newer binutils versions default to ISA spec version 20191213 which
569 moves some instructions from the I extension to the Zicsr and Zifencei
572 config TOOLCHAIN_NEEDS_OLD_ISA_SPEC
574 depends on TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
575 # https://github.com/llvm/llvm-project/commit/22e199e6afb1263c943c0c0d4498694e15bf8a16
576 depends on CC_IS_CLANG && CLANG_VERSION < 170000
578 Certain versions of clang do not support zicsr and zifencei via -march
579 but newer versions of binutils require it for the reasons noted in the
580 help text of CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI. This
581 option causes an older ISA spec compatible with these older versions
582 of clang to be passed to GAS, which has the same result as passing zicsr
583 and zifencei to -march.
589 Say N here if you want to disable all floating-point related procedure
592 If you don't know what to do here, say Y.
594 endmenu # "Platform type"
596 menu "Kernel features"
598 source "kernel/Kconfig.hz"
601 bool "SBI v0.1 support"
604 This config allows kernel to use SBI v0.1 APIs. This will be
605 deprecated in future once legacy M-mode software are no longer in use.
607 config RISCV_BOOT_SPINWAIT
608 bool "Spinwait booting method"
610 default y if RISCV_SBI_V01 || RISCV_M_MODE
612 This enables support for booting Linux via spinwait method. In the
613 spinwait method, all cores randomly jump to Linux. One of the cores
614 gets chosen via lottery and all other keep spinning on a percpu
615 variable. This method cannot support CPU hotplug and sparse hartid
616 scheme. It should be only enabled for M-mode Linux or platforms relying
617 on older firmware without SBI HSM extension. All other platforms should
618 rely on ordered booting via SBI HSM extension which gets chosen
619 dynamically at runtime if the firmware supports it.
621 Since spinwait is incompatible with sparse hart IDs, it requires
622 NR_CPUS be large enough to contain the physical hart ID of the first
625 If unsure what to do here, say N.
628 bool "Kexec system call"
630 select HOTPLUG_CPU if SMP
633 kexec is a system call that implements the ability to shutdown your
634 current kernel, and to start another kernel. It is like a reboot
635 but it is independent of the system firmware. And like a reboot
636 you can start any kernel with it, not just Linux.
638 The name comes from the similarity to the exec system call.
641 bool "kexec file based systmem call"
642 depends on 64BIT && MMU
643 select HAVE_IMA_KEXEC if IMA
647 This is new version of kexec system call. This system call is
648 file based and takes file descriptors as system call argument
649 for kernel and initramfs as opposed to list of segments as
650 accepted by previous system call.
652 If you don't know what to do here, say Y.
654 config ARCH_HAS_KEXEC_PURGATORY
657 depends on CRYPTO_SHA256=y
660 bool "Build kdump crash kernel"
662 Generate crash dump after being started by kexec. This should
663 be normally only set in special crash dump kernels which are
664 loaded in the main kernel with kexec-tools into a specially
665 reserved region and then later executed after a crash by
668 For more details see Documentation/admin-guide/kdump/kdump.rst
671 bool "Kernel support for 32-bit U-mode"
673 depends on 64BIT && MMU
675 This option enables support for a 32-bit U-mode running under a 64-bit
676 kernel at S-mode. riscv32-specific components such as system calls,
677 the user helper functions (vdso), signal rt_frame functions and the
678 ptrace interface are handled appropriately by the kernel.
680 If you want to execute 32-bit userspace applications, say Y.
683 bool "Build a relocatable kernel"
684 depends on MMU && 64BIT && !XIP_KERNEL
686 This builds a kernel as a Position Independent Executable (PIE),
687 which retains all relocation metadata required to relocate the
688 kernel binary at runtime to a different virtual address than the
689 address it was linked at.
690 Since RISCV uses the RELA relocation format, this requires a
691 relocation pass at runtime even if the kernel is loaded at the
692 same address it was linked at.
696 endmenu # "Kernel features"
701 string "Built-in kernel command line"
703 For most platforms, the arguments for the kernel's command line
704 are provided at run-time, during boot. However, there are cases
705 where either no arguments are being provided or the provided
706 arguments are insufficient or even invalid.
708 When that occurs, it is possible to define a built-in command
709 line here and choose how the kernel should use it later on.
712 prompt "Built-in command line usage" if CMDLINE != ""
713 default CMDLINE_FALLBACK
715 Choose how the kernel will handle the provided built-in command
718 config CMDLINE_FALLBACK
719 bool "Use bootloader kernel arguments if available"
721 Use the built-in command line as fallback in case we get nothing
722 during boot. This is the default behaviour.
724 config CMDLINE_EXTEND
725 bool "Extend bootloader kernel arguments"
727 The command-line arguments provided during boot will be
728 appended to the built-in command line. This is useful in
729 cases where the provided arguments are insufficient and
730 you don't want to or cannot modify them.
733 bool "Always use the default kernel command string"
735 Always use the built-in command line, even if we get one during
736 boot. This is useful in case you need to override the provided
737 command line on systems where you don't have or want control
746 bool "UEFI runtime support"
747 depends on OF && !XIP_KERNEL
750 select ARCH_SUPPORTS_ACPI if 64BIT
751 select EFI_GENERIC_STUB
752 select EFI_PARAMS_FROM_FDT
753 select EFI_RUNTIME_WRAPPERS
759 This option provides support for runtime services provided
760 by UEFI firmware (such as non-volatile variables, realtime
761 clock, and platform reset). A UEFI stub is also provided to
762 allow the kernel to be booted as an EFI application. This
763 is only useful on systems that have UEFI firmware.
765 config CC_HAVE_STACKPROTECTOR_TLS
766 def_bool $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=tp -mstack-protector-guard-offset=0)
768 config STACKPROTECTOR_PER_TASK
770 depends on !RANDSTRUCT
771 depends on STACKPROTECTOR && CC_HAVE_STACKPROTECTOR_TLS
773 config PHYS_RAM_BASE_FIXED
774 bool "Explicitly specified physical RAM address"
775 depends on NONPORTABLE
779 hex "Platform Physical RAM address"
780 depends on PHYS_RAM_BASE_FIXED
783 This is the physical address of RAM in the system. It has to be
784 explicitly specified to run early relocations of read-write data
788 bool "Kernel Execute-In-Place from ROM"
789 depends on MMU && SPARSEMEM && NONPORTABLE
790 # This prevents XIP from being enabled by all{yes,mod}config, which
791 # fail to build since XIP doesn't support large kernels.
792 depends on !COMPILE_TEST
793 select PHYS_RAM_BASE_FIXED
795 Execute-In-Place allows the kernel to run from non-volatile storage
796 directly addressable by the CPU, such as NOR flash. This saves RAM
797 space since the text section of the kernel is not loaded from flash
798 to RAM. Read-write sections, such as the data section and stack,
799 are still copied to RAM. The XIP kernel is not compressed since
800 it has to run directly from flash, so it will take more space to
801 store it. The flash address used to link the kernel object files,
802 and for storing it, is configuration dependent. Therefore, if you
803 say Y here, you must know the proper physical address where to
804 store the kernel image depending on your own flash memory usage.
806 Also note that the make target becomes "make xipImage" rather than
807 "make zImage" or "make Image". The final kernel binary to put in
808 ROM memory will be arch/riscv/boot/xipImage.
810 SPARSEMEM is required because the kernel text and rodata that are
811 flash resident are not backed by memmap, then any attempt to get
812 a struct page on those regions will trigger a fault.
817 hex "XIP Kernel Physical Location"
818 depends on XIP_KERNEL
821 This is the physical address in your flash memory the kernel will
822 be linked for and stored to. This address is dependent on your
825 endmenu # "Boot options"
829 depends on OF && NONPORTABLE
830 default y if XIP_KERNEL
839 menu "Power management options"
841 source "kernel/power/Kconfig"
843 config ARCH_HIBERNATION_POSSIBLE
846 config ARCH_HIBERNATION_HEADER
849 endmenu # "Power management options"
851 menu "CPU Power Management"
853 source "drivers/cpuidle/Kconfig"
855 source "drivers/cpufreq/Kconfig"
857 endmenu # "CPU Power Management"
859 source "arch/riscv/kvm/Kconfig"
861 source "drivers/acpi/Kconfig"