Kconfig

CONFIG_64BIT

On

CONFIG_32BIT

Unknown

CONFIG_RISCV

Unknown
Default
  • y

CONFIG_RUSTC_SUPPORTS_RISCV

Unknown
  • Depends on
Default
  • y

CONFIG_HAVE_SHADOW_CALL_STACK

Unknown
  • Depends on$(ld-option,--no-relax-gp)
Default
  • $(cc-option,-fsanitize=shadow-call-stack)

CONFIG_ARCH_MMAP_RND_BITS_MIN

28
Defaults
  • 18 if
  • 8

CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN

8
Default
  • 8

CONFIG_ARCH_MMAP_RND_BITS_MAX

32
Defaults
  • 24 if # SV39 based
  • 17

CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX

16
Default
  • 17

CONFIG_RISCV_M_MODE Build a kernel that runs in machine mode

Unknown

Select this option if you want to run the kernel in M-mode, without the assistance of any other firmware.

  • Depends on!
Default
  • y

CONFIG_MMU MMU-based Paged Memory Management Support

On

Select if you want MMU-based virtualised addressing space support by paged memory management. If unsure, say 'Y'.

Default
  • y

CONFIG_KASAN_SHADOW_OFFSET

Defaults
  • 0xdfffffff00000000 if
  • 0xffffffff if

CONFIG_ARCH_FLATMEM_ENABLE

Unknown
Default
  • !

CONFIG_ARCH_SELECT_MEMORY_MODEL

Unknown
Default

CONFIG_ARCH_SUPPORTS_UPROBES

On
Default
  • y

CONFIG_STACKTRACE_SUPPORT

On
Default
  • y

CONFIG_GENERIC_BUG

On
  • Depends onBUG
  • Selects
Default
  • y

CONFIG_GENERIC_BUG_RELATIVE_POINTERS

On

CONFIG_GENERIC_CALIBRATE_DELAY

On
Default
  • y

CONFIG_GENERIC_CSUM

On
Default
  • y

CONFIG_GENERIC_HWEIGHT

Unknown
Default
  • y

CONFIG_FIX_EARLYCON_MEM

On
Default

CONFIG_ILLEGAL_POINTER_VALUE

Defaults
  • 0 if
  • 0xdead000000000000 if

CONFIG_PGTABLE_LEVELS

Defaults
  • 5 if
  • 2

CONFIG_LOCKDEP_SUPPORT

On
Default
  • y

CONFIG_RISCV_NONSTANDARD_CACHE_OPS

Unknown

This enables function pointer support for non-standard noncoherent systems to handle cache management.

CONFIG_AS_HAS_INSN

Unknown
Default
  • $(as-instr,.insn 0x100000f)

CONFIG_AS_HAS_OPTION_ARCH

Unknown
  • Depends on$(as-instr, .option arch$(comma) +m)
Default
  • y
Includearch/riscv/Kconfig.socs Open file
Includearch/riscv/Kconfig.errata Open file

Platform type

CONFIG_NONPORTABLE Allow configurations that result in non-portable kernels

Unknown

RISC-V kernel binaries are compatible between all known systems whenever possible, but there are some use cases that can only be satisfied by configurations that result in kernel binaries that are not portable between systems.

Selecting N does not guarantee kernels will be portable to all known systems. Selecting any of the options guarded by NONPORTABLE will result in kernel binaries that are unlikely to be portable between systems.

If unsure, say N.

Base ISA

This selects the base ISA that this kernel will target and must match the target platform.

End of Base ISA

Kernel Code Model

CONFIG_CMODEL_MEDLOW medium low code model

Unknown

CONFIG_CMODEL_MEDANY medium any code model

Unknown
End of Kernel Code Model

CONFIG_SMP Symmetric Multi-Processing

On

This enables support for systems with more than one CPU. If you say N here, the kernel will run on single and multiprocessor machines, but will use only one CPU of a multiprocessor machine. If you say Y here, the kernel will run on many, but not all, single processor machines. On a single processor machine, the kernel will run faster if you say N here.

If you don't know what to do here, say N.

CONFIG_HOTPLUG_CPU Support for hot-pluggable CPUs

On

Say Y here to experiment with turning CPUs off and on. CPUs can be controlled through /sys/devices/system/cpu.

Say N if you want to disable CPU hotplug.

CPU Tuning

CONFIG_TUNE_GENERIC generic

Unknown
End of CPU Tuning

CONFIG_NODES_SHIFT Maximum NUMA Nodes (as a power of 2)

Specify the maximum number of NUMA Nodes available on the target system. Increases memory reserved to accommodate various tables.

  • Range1 10
  • Depends on
Default
  • "2"

RISC-V spinlock type

CONFIG_RISCV_TICKET_SPINLOCKS Using ticket spinlock

Unknown

CONFIG_RISCV_QUEUED_SPINLOCKS Using queued spinlock

Unknown

The queued spinlock implementation requires the forward progress guarantee of cmpxchg()/xchg() atomic operations: CAS with Zabha or LR/SC with Ziccrse provide such guarantee.

Select this if and only if Zabha or Ziccrse is available on your platform, RISCV_QUEUED_SPINLOCKS must not be selected for platforms without one of those extensions.

If unsure, select RISCV_COMBO_SPINLOCKS, which will use qspinlocks when supported and otherwise ticket spinlocks.

CONFIG_RISCV_COMBO_SPINLOCKS Using combo spinlock

Unknown

Embed both queued spinlock and ticket lock so that the spinlock implementation can be chosen at runtime.

End of RISC-V spinlock type

CONFIG_RISCV_ALTERNATIVE_EARLY

Unknown

Allows early patching of the kernel for special errata

CONFIG_RISCV_ISA_C Emit compressed instructions when building Linux

Unknown

Adds "C" to the ISA subsets that the toolchain is allowed to emit when building Linux, which results in compressed instructions in the Linux binary. This option produces a kernel that will not run on systems that do not support compressed instructions.

If you don't know what to do here, say Y.

Default
  • y

CONFIG_RISCV_ISA_SUPM Supm extension for userspace pointer masking

Unknown

Add support for pointer masking in userspace (Supm) when the underlying hardware extension (Smnpm or Ssnpm) is detected at boot.

If this option is disabled, userspace will be unable to use the prctl(PR_{SET,GET}_TAGGED_ADDR_CTRL) API.

  • Depends on
Default
  • y

CONFIG_RISCV_ISA_SVNAPOT Svnapot extension support for supervisor mode NAPOT pages

Unknown

Enable support for the Svnapot ISA-extension when it is detected at boot.

The Svnapot extension is used to mark contiguous PTEs as a range of contiguous virtual-to-physical translations for a naturally aligned power-of-2 (NAPOT) granularity larger than the base 4KB page size. When HUGETLBFS is also selected this option unconditionally allocates some memory for each NAPOT page size supported by the kernel. When optimizing for low memory consumption and for platforms without the Svnapot extension, it may be better to say N here.

If you don't know what to do here, say Y.

  • Depends on &&
Default
  • y

CONFIG_RISCV_ISA_SSQOSID Ssqosid extension support for supervisor mode Quality of Service ID

Unknown

Adds support for the Ssqosid ISA extension (Supervisor-mode Quality of Service ID).

Ssqosid defines the srmcfg CSR which allows the system to tag the running process with an RCID (Resource Control ID) and MCID (Monitoring Counter ID). The RCID is used to determine resource allocation. The MCID is used to track resource usage in event counters.

For example, a cache controller may use the RCID to apply a cache partitioning scheme and use the MCID to track how much cache a process, or a group of processes, is using.

  • Depends on
Default
  • n

CONFIG_RISCV_ISA_SV48 Page-Based 48-bit Virtual-Memory System

Unknown

Add support for the Page-Based 48-bit Virtual-Memory System.

Enable this option for systems for which a 39-bit virtual address space is insufficient. But if 39-bit is enough, disabling this option will result in smaller kernel size and slighly better performance.

  • Depends on &&
Default
  • y

CONFIG_RISCV_ISA_SV57 Page-Based 57-bit Virtual-Memory System

Unknown

Add support for the Page-Based 57-bit Virtual-Memory System.

Enable this option for systems for which a 48-bit virtual address space is insufficient. But if 48-bit is enough, disabling this option will result in smaller kernel size and slighly better performance.

  • Depends on &&
Default
  • y

CONFIG_RISCV_ISA_SVPBMT Svpbmt extension support for supervisor mode page-based memory types

Unknown

Add support for the Svpbmt ISA-extension (Supervisor-mode: page-based memory types) in the kernel when it is detected at boot.

The memory type for a page contains a combination of attributes that indicate the cacheability, idempotency, and ordering properties for access to that page.

The Svpbmt extension is only available on 64-bit cpus.

If you don't know what to do here, say Y.

  • Depends on &&
Default
  • y

CONFIG_TOOLCHAIN_HAS_V

Unknown
  • Depends on!64BIT || $(cc-option,-mabi=lp64 -march=rv64imv)
  • Depends on!32BIT || $(cc-option,-mabi=ilp32 -march=rv32imv)
  • Depends onLD_IS_LLD || LD_VERSION >= 23800
  • Depends onAS_HAS_OPTION_ARCH
Default
  • y

CONFIG_RISCV_ISA_V Vector extension support

Unknown

Add support for the Vector extension when it is detected at boot. When this option is disabled, neither the kernel nor userspace may use vector procedures.

If you don't know what to do here, say Y.

Default
  • y

CONFIG_RISCV_ISA_V_DEFAULT_ENABLE Enable userspace Vector by default

Unknown

Say Y here if you want to enable Vector in userspace by default. Otherwise, userspace has to make explicit prctl() call to enable Vector, or enable it via the sysctl interface.

If you don't know what to do here, say Y.

Default
  • y

CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD Threshold size for vectorized user copies

Unknown

Prefer using vectorized copy_to_user()/copy_from_user() when the workload size exceeds this value.

Default
  • 768

CONFIG_RISCV_ISA_V_PREEMPTIVE Run kernel-mode Vector with kernel preemption

Unknown

Usually, in-kernel SIMD routines are run with preemption disabled. Functions which invoke long running SIMD thus must yield the core's vector unit to prevent blocking other tasks for too long.

This config allows the kernel to run SIMD without explicitly disabling preemption. Enabling this config will result in higher memory consumption due to the allocation of per-task's kernel Vector context.

Default
  • y

CONFIG_RISCV_ISA_ZAWRS Zawrs extension support for more efficient busy waiting

Unknown

The Zawrs extension defines instructions to be used in polling loops which allow a hart to enter a low-power state or to trap to the hypervisor while waiting on a store to a memory location. Enable the use of these instructions in the kernel when the Zawrs extension is detected at boot.

Default
  • y

CONFIG_TOOLCHAIN_HAS_ZABHA

Unknown
  • Depends on!64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zabha)
  • Depends on!32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zabha)
  • Depends onAS_HAS_OPTION_ARCH
Default
  • y

CONFIG_RISCV_ISA_ZABHA Zabha extension support for atomic byte/halfword operations

Unknown

Enable the use of the Zabha ISA-extension to implement kernel byte/halfword atomic memory operations when it is detected at boot.

If you don't know what to do here, say Y.

Default
  • y

CONFIG_TOOLCHAIN_HAS_ZACAS

Unknown
  • Depends on!64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zacas)
  • Depends on!32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zacas)
  • Depends onAS_HAS_OPTION_ARCH
Default
  • y

CONFIG_RISCV_ISA_ZACAS Zacas extension support for atomic CAS

Unknown

Enable the use of the Zacas ISA-extension to implement kernel atomic cmpxchg operations when it is detected at boot.

If you don't know what to do here, say Y.

Default
  • y

CONFIG_TOOLCHAIN_HAS_ZBB

Unknown
  • Depends on!64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbb)
  • Depends on!32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbb)
  • Depends onLD_IS_LLD || LD_VERSION >= 23900
  • Depends onAS_HAS_OPTION_ARCH
Default
  • y

CONFIG_TOOLCHAIN_HAS_VECTOR_CRYPTO

Unknown
Default
  • $(as-instr, .option arch$(comma) +v$(comma) +zvkb)

CONFIG_TOOLCHAIN_HAS_ZBA

Unknown
  • Depends on!64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zba)
  • Depends on!32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zba)
  • Depends onLD_IS_LLD || LD_VERSION >= 23900
  • Depends onAS_HAS_OPTION_ARCH
Default
  • y

CONFIG_RISCV_ISA_ZBA Zba extension support for bit manipulation instructions

Unknown

Add support for enabling optimisations in the kernel when the Zba extension is detected at boot.

The Zba extension provides instructions to accelerate the generation of addresses that index into arrays of basic data types.

If you don't know what to do here, say Y.

Default
  • y

CONFIG_RISCV_ISA_ZBB Zbb extension support for bit manipulation instructions

Unknown

Add support for enabling optimisations in the kernel when the Zbb extension is detected at boot. Some optimisations may additionally depend on toolchain support for Zbb.

The Zbb extension provides instructions to accelerate a number of bit-specific operations (count bit population, sign extending, bitrotation, etc).

If you don't know what to do here, say Y.

Default
  • y

CONFIG_TOOLCHAIN_HAS_ZBC

Unknown
  • Depends on!64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbc)
  • Depends on!32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbc)
  • Depends onLD_IS_LLD || LD_VERSION >= 23900
  • Depends onAS_HAS_OPTION_ARCH
Default
  • y

CONFIG_RISCV_ISA_ZBC Zbc extension support for carry-less multiplication instructions

Unknown

Adds support to dynamically detect the presence of the Zbc extension (carry-less multiplication) and enable its usage.

The Zbc extension could accelerate CRC (cyclic redundancy check) calculations.

If you don't know what to do here, say Y.

Default
  • y

CONFIG_TOOLCHAIN_HAS_ZBKB

Unknown
  • Depends on!64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbkb)
  • Depends on!32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbkb)
  • Depends onLD_IS_LLD || LD_VERSION >= 23900
  • Depends onAS_HAS_OPTION_ARCH
Default
  • y

CONFIG_RISCV_ISA_ZBKB Zbkb extension support for bit manipulation instructions

Unknown

Adds support to dynamically detect the presence of the ZBKB extension (bit manipulation for cryptography) and enable its usage.

The Zbkb extension provides instructions to accelerate a number of common cryptography operations (pack, zip, etc).

If you don't know what to do here, say Y.

Default
  • y

CONFIG_RISCV_ISA_ZICBOM Zicbom extension support for non-coherent DMA operation

Unknown

Add support for the Zicbom extension (Cache Block Management Operations) and enable its use in the kernel when it is detected at boot.

The Zicbom extension can be used to handle for example non-coherent DMA support on devices that need it.

If you don't know what to do here, say Y.

Default
  • y

CONFIG_RISCV_ISA_ZICBOZ Zicboz extension support for faster zeroing of memory

Unknown

Enable the use of the Zicboz extension (cbo.zero instruction) in the kernel when it is detected at boot.

The Zicboz extension is used for faster zeroing of memory.

If you don't know what to do here, say Y.

Default
  • y

CONFIG_RISCV_ISA_ZICBOP Zicbop extension support for cache block prefetch

Unknown

Adds support to dynamically detect the presence of the ZICBOP extension (Cache Block Prefetch Operations) and enable its usage.

The Zicbop extension can be used to prefetch cache blocks for read/write fetch.

If you don't know what to do here, say Y.

  • Depends on
Default
  • y

CONFIG_RISCV_ISA_SVRSW60T59B Svrsw60t59b extension support for using PTE bits 60 and 59

Unknown

Adds support to dynamically detect the presence of the Svrsw60t59b extension and enable its usage.

The Svrsw60t59b extension allows to free the PTE reserved bits 60 and 59 for software to use.

If you don't know what to do here, say Y.

  • Depends on &&
Default
  • y

CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI

Unknown

Binutils-2.38 and GCC-12.1.0 bumped the default ISA spec to the newer 20191213 version, which moves some instructions from the I extension to the Zicsr and Zifencei extensions. This requires explicitly specifying Zicsr and Zifencei when binutils >= 2.38 or GCC >= 12.1.0. Zicsr and Zifencei are supported in binutils from version 2.36 onwards. To make life easier, and avoid forcing toolchains that default to a newer ISA spec to version 2.2, relax the check to binutils >= 2.36. For GCC < 11.3.0, for which this is not possible or need special treatment, this is dealt with in TOOLCHAIN_NEEDS_OLD_ISA_SPEC.

Default
  • y

CONFIG_TOOLCHAIN_NEEDS_OLD_ISA_SPEC

Unknown

Certain versions of GCC do not support zicsr and zifencei via -march. This option causes an older ISA spec compatible with these older versions of GCC to be passed to GAS, which has the same result as passing zicsr and zifencei to -march.

Default
  • y

CONFIG_FPU FPU support

Unknown

Add support for floating point operations when an FPU is detected at boot. When this option is disabled, neither the kernel nor userspace may use the floating point unit.

If you don't know what to do here, say Y.

Default
  • y

CONFIG_IRQ_STACKS Independent irq & softirq stacks

Unknown

Add independent irq & softirq stacks for percpu to prevent kernel stack overflows. We may save some memory footprint by disabling IRQ_STACKS.

Default
  • y

CONFIG_THREAD_SIZE_ORDER Kernel stack size (in power-of-two numbers of page size)

Unknown

Specify the Pages of thread stack size (from 4KB to 64KB), which also affects irq stack size, which is equal to thread stack size.

Defaults
  • 1 if
  • 2

CONFIG_RISCV_MISALIGNED

Unknown

Embed support for detecting and emulating misaligned scalar or vector loads and stores.

CONFIG_RISCV_VECTOR_MISALIGNED

Unknown

Enable detecting support for vector misaligned loads and stores.

CONFIG_RISCV_SBI_FWFT_DELEGATE_MISALIGNED Request firmware delegation of unaligned access exceptions

Unknown

Use SBI FWFT to request delegation of load address misaligned and store address misaligned exceptions, if possible, and prefer Linux kernel emulation of these accesses to firmware emulation.

Unfortunately, Linux's emulation is still incomplete. Namely, it currently does not handle vector instructions and KVM guest accesses. On platforms where these accesses would have been handled by firmware, enabling this causes unexpected kernel oopses, userspaces crashes and KVM guest crashes. If you are sure that these are not a problem for your platform, you can say Y here, which may improve performance.

Saying N here will not worsen emulation support for unaligned accesses even in the case where the firmware also has incomplete support. It simply keeps the firmware's emulation enabled.

If you don't know what to do here, say N.

Unaligned Accesses Support

This determines the level of support for unaligned accesses. This information is used by the kernel to perform optimizations. It is also exposed to user space via the hwprobe syscall. The hardware will be probed at boot by default.

CONFIG_RISCV_PROBE_UNALIGNED_ACCESS Probe for hardware unaligned access support

Unknown

During boot, the kernel will run a series of tests to determine the speed of unaligned accesses. This probing will dynamically determine the speed of unaligned accesses on the underlying system. If unaligned memory accesses trap into the kernel as they are not supported by the system, the kernel will emulate the unaligned accesses to preserve the UABI.

CONFIG_RISCV_EMULATED_UNALIGNED_ACCESS Emulate unaligned access where system support is missing

Unknown

If unaligned memory accesses trap into the kernel as they are not supported by the system, the kernel will emulate the unaligned accesses to preserve the UABI. When the underlying system does support unaligned accesses, the unaligned accesses are assumed to be slow.

CONFIG_RISCV_SLOW_UNALIGNED_ACCESS Assume the system supports slow unaligned memory accesses

Unknown

Assume that the system supports slow unaligned memory accesses. The kernel and userspace programs may not be able to run at all on systems that do not support unaligned memory accesses.

CONFIG_RISCV_EFFICIENT_UNALIGNED_ACCESS Assume the system supports fast unaligned memory accesses

Unknown

Assume that the system supports fast unaligned memory accesses. When enabled, this option improves the performance of the kernel on such systems. However, the kernel and userspace programs will run much more slowly, or will not be able to run at all, on systems that do not support efficient unaligned memory accesses.

End of Unaligned Accesses Support

Vector unaligned Accesses Support

This determines the level of support for vector unaligned accesses. This information is used by the kernel to perform optimizations. It is also exposed to user space via the hwprobe syscall. The hardware will be probed at boot by default.

CONFIG_RISCV_PROBE_VECTOR_UNALIGNED_ACCESS Probe speed of vector unaligned accesses

Unknown

During boot, the kernel will run a series of tests to determine the speed of vector unaligned accesses if they are supported. This probing will dynamically determine the speed of vector unaligned accesses on the underlying system if they are supported.

CONFIG_RISCV_SLOW_VECTOR_UNALIGNED_ACCESS Assume the system supports slow vector unaligned memory accesses

Unknown

Assume that the system supports slow vector unaligned memory accesses. The kernel and userspace programs may not be able to run at all on systems that do not support unaligned memory accesses.

CONFIG_RISCV_EFFICIENT_VECTOR_UNALIGNED_ACCESS Assume the system supports fast vector unaligned memory accesses

Unknown

Assume that the system supports fast vector unaligned memory accesses. When enabled, this option improves the performance of the kernel on such systems. However, the kernel and userspace programs will run much more slowly, or will not be able to run at all, on systems that do not support efficient unaligned memory accesses.

End of Vector unaligned Accesses Support
Includearch/riscv/Kconfig.vendor Open file
End of Platform type

Kernel features

Includekernel/Kconfig.hz Open file

CONFIG_RISCV_SBI_V01 SBI v0.1 support

Unknown

This config allows kernel to use SBI v0.1 APIs. This will be deprecated in future once legacy M-mode software are no longer in use.

CONFIG_RISCV_BOOT_SPINWAIT Spinwait booting method

Unknown

This enables support for booting Linux via spinwait method. In the spinwait method, all cores randomly jump to Linux. One of the cores gets chosen via lottery and all other keep spinning on a percpu variable. This method cannot support CPU hotplug and sparse hartid scheme. It should be only enabled for M-mode Linux or platforms relying on older firmware without SBI HSM extension. All other platforms should rely on ordered booting via SBI HSM extension which gets chosen dynamically at runtime if the firmware supports it.

Since spinwait is incompatible with sparse hart IDs, it requires NR_CPUS be large enough to contain the physical hart ID of the first hart to enter Linux.

If unsure what to do here, say N.

  • Depends on

CONFIG_ARCH_SUPPORTS_KEXEC

On
Default
  • y

CONFIG_ARCH_SELECTS_KEXEC

Unknown
  • Depends onKEXEC
  • Selects if
Default
  • y

CONFIG_ARCH_SUPPORTS_KEXEC_FILE

On
Default

CONFIG_ARCH_SUPPORTS_KEXEC_PURGATORY

On
Default

CONFIG_ARCH_SUPPORTS_CRASH_DUMP

On
Default
  • y

CONFIG_ARCH_DEFAULT_CRASH_DUMP

On
Default
  • y

CONFIG_ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION

On

CONFIG_ARCH_SUPPORTS_CRASH_HOTPLUG

On
Default
  • y

CONFIG_COMPAT Kernel support for 32-bit U-mode

On

This option enables support for a 32-bit U-mode running under a 64-bit kernel at S-mode. riscv32-specific components such as system calls, the user helper functions (vdso), signal rt_frame functions and the ptrace interface are handled appropriately by the kernel.

If you want to execute 32-bit userspace applications, say Y.

  • Depends on &&
Default

CONFIG_PARAVIRT Enable paravirtualization code

On

This changes the kernel so it can modify itself when it is run under a hypervisor, potentially improving performance significantly over full virtualization.

CONFIG_PARAVIRT_TIME_ACCOUNTING Paravirtual steal time accounting

On

Select this option to enable fine granularity task steal time accounting. Time spent executing other tasks in parallel with the current vCPU is discounted from the vCPU power. To account for that, there can be a small performance impact.

If in doubt, say N here.

  • Depends on

CONFIG_RELOCATABLE Build a relocatable kernel

On

This builds a kernel as a Position Independent Executable (PIE), which retains all relocation metadata required to relocate the kernel binary at runtime to a different virtual address than the address it was linked at. Since RISCV uses the RELA relocation format, this requires a relocation pass at runtime even if the kernel is loaded at the same address it was linked at.

If unsure, say N.

CONFIG_RANDOMIZE_BASE Randomize the address of the kernel image

On

Randomizes the virtual address at which the kernel image is loaded, as a security feature that deters exploit attempts relying on knowledge of the location of kernel internals.

It is the bootloader's job to provide entropy, by passing a random u64 value in /chosen/kaslr-seed at kernel entry.

When booting via the UEFI stub, it will invoke the firmware's EFI_RNG_PROTOCOL implementation (if available) to supply entropy to the kernel proper. In addition, it will randomise the physical location of the kernel Image as well.

If unsure, say N.

  • Depends on
  • Depends on &&

CONFIG_RISCV_USER_CFI riscv userspace control flow integrity

Unknown

Provides CPU-assisted control flow integrity to userspace tasks. Control flow integrity is provided by implementing shadow stack for backward edge and indirect branch tracking for forward edge. Shadow stack protection is a hardware feature that detects function return address corruption. This helps mitigate ROP attacks. Indirect branch tracking enforces that all indirect branches must land on a landing pad instruction else CPU will fault. This mitigates against JOP / COP attacks. Applications must be enabled to use it, and old userspace does not get protection "for free". default y.

Default
  • y
End of Kernel features

Boot options

CONFIG_CMDLINE Built-in kernel command line

Empty

For most platforms, the arguments for the kernel's command line are provided at run-time, during boot. However, there are cases where either no arguments are being provided or the provided arguments are insufficient or even invalid.

When that occurs, it is possible to define a built-in command line here and choose how the kernel should use it later on.

Built-in command line usage

Choose how the kernel will handle the provided built-in command line.

  • Depends on != ""

CONFIG_CMDLINE_FALLBACK Use bootloader kernel arguments if available

Unknown

Use the built-in command line as fallback in case we get nothing during boot. This is the default behaviour.

CONFIG_CMDLINE_EXTEND Extend bootloader kernel arguments

Unknown

The built-in command line will be appended to the command- line arguments provided during boot. This is useful in cases where the provided arguments are insufficient and you don't want to or cannot modify them.

CONFIG_CMDLINE_FORCE Always use the default kernel command string

Unknown

Always use the built-in command line, even if we get one during boot. This is useful in case you need to override the provided command line on systems where you don't have or want control over it.

End of Built-in command line usage

CONFIG_EFI_STUB

On

CONFIG_EFI UEFI runtime support

On

This option provides support for runtime services provided by UEFI firmware (such as non-volatile variables, realtime clock, and platform reset). A UEFI stub is also provided to allow the kernel to be booted as an EFI application. This is only useful on systems that have UEFI firmware.

Default
  • y

CONFIG_DMI Enable support for SMBIOS (DMI) tables

On

This enables SMBIOS/DMI feature for systems.

This option is only useful on systems that have UEFI firmware. However, even with this option, the resultant kernel should continue to boot on existing non-UEFI platforms.

  • Depends on
Default
  • y

CONFIG_CC_HAVE_STACKPROTECTOR_TLS

Unknown
Default
  • $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=tp -mstack-protector-guard-offset=0)

CONFIG_STACKPROTECTOR_PER_TASK

Unknown
Default
  • y

CONFIG_PHYS_RAM_BASE_FIXED Explicitly specified physical RAM address

Unknown
Default
  • n

CONFIG_PHYS_RAM_BASE Platform Physical RAM address

Unknown

This is the physical address of RAM in the system. It has to be explicitly specified to run early relocations of read-write data from flash to RAM.

Default
  • "0x80000000"

CONFIG_RISCV_ISA_FALLBACK Permit falling back to parsing riscv,isa for extension support by default

Unknown

Parsing the "riscv,isa" devicetree property has been deprecated and replaced by a list of explicitly defined strings. For compatibility with existing platforms, the kernel will fall back to parsing the "riscv,isa" property if the replacements are not found.

Selecting N here will result in a kernel that does not use the fallback, unless the commandline "riscv_isa_fallback" parameter is present.

Please see the dt-binding, located at Documentation/devicetree/bindings/riscv/extensions.yaml for details on the replacement properties, "riscv,isa-base" and "riscv,isa-extensions".

Default
  • y

CONFIG_BUILTIN_DTB Built-in device tree

Unknown

Build a device tree into the Linux image. This option should be selected if no bootloader is being used. If unsure, say N.

CONFIG_BUILTIN_DTB_NAME Built-in device tree source

Unknown

DTS file path (without suffix, relative to arch/riscv/boot/dts) for the DTS file that will be used to produce the DTB linked into the kernel.

  • Depends on
End of Boot options

CONFIG_PORTABLE

Unknown
  • Selects
  • Selects
  • SelectsOF

CONFIG_ARCH_PROC_KCORE_TEXT

On
Default
  • y

CONFIG_ARCH_USERFLAGS

Unknown
Defaults
  • "-march=rv64g -mabi=lp64d" if &&
  • "-march=rv64g -mabi=lp64" if
  • "-march=rv32g -mabi=ilp32d" if
  • "-march=rv32g -mabi=ilp32"

Power management options

Includekernel/power/Kconfig Open file

CONFIG_ARCH_HIBERNATION_POSSIBLE

On
Default
  • y

CONFIG_ARCH_SUSPEND_POSSIBLE

On
Default
  • y
End of Power management options

CPU Power Management

Includedrivers/cpuidle/Kconfig Open file
Includedrivers/cpufreq/Kconfig Open file
End of CPU Power Management
Includearch/riscv/kvm/Kconfig Open file
Includedrivers/acpi/Kconfig Open file
CONFIG_CC_HAVE_STACKPROTECTOR_TLS declarations