# SPDX-License-Identifier: GPL-2.0-only
#
# For a description of the syntax of this configuration file,
# see Documentation/kbuild/kconfig-language.rst.
#
config [31mCONFIG_64BIT[0m
bool
config [31mCONFIG_32BIT[0m
bool
config [31mCONFIG_RISCV[0m
def_bool y
# even on 32-bit, physical (and DMA) addresses are > 32-bits
select [31mCONFIG_PHYS_ADDR_T_64BIT[0m
select [31mCONFIG_OF[0m
select [31mCONFIG_OF_EARLY_FLATTREE[0m
select [31mCONFIG_OF_IRQ[0m
select [31mCONFIG_ARCH_HAS_BINFMT_FLAT[0m
select [31mCONFIG_ARCH_WANT_FRAME_POINTERS[0m
select [31mCONFIG_CLONE_BACKWARDS[0m
select [31mCONFIG_COMMON_CLK[0m
select [31mCONFIG_GENERIC_CLOCKEVENTS[0m
select [31mCONFIG_GENERIC_CPU_DEVICES[0m
select [31mCONFIG_GENERIC_IRQ_SHOW[0m
select [31mCONFIG_GENERIC_PCI_IOMAP[0m
select [31mCONFIG_GENERIC_SCHED_CLOCK[0m
select [31mCONFIG_GENERIC_STRNCPY_FROM_USER[0m
select [31mCONFIG_GENERIC_STRNLEN_USER[0m
select [31mCONFIG_GENERIC_SMP_IDLE_THREAD[0m
select [31mCONFIG_GENERIC_ATOMIC64[0m if ![31mCONFIG_64BIT[0m
select [31mCONFIG_HAVE_ARCH_AUDITSYSCALL[0m
select [31mCONFIG_HAVE_ASM_MODVERSIONS[0m
select [31mCONFIG_HAVE_MEMBLOCK_NODE_MAP[0m
select [31mCONFIG_HAVE_DMA_CONTIGUOUS[0m
select [31mCONFIG_HAVE_FUTEX_CMPXCHG[0m if [31mCONFIG_FUTEX[0m
select [31mCONFIG_HAVE_PERF_EVENTS[0m
select [31mCONFIG_HAVE_PERF_REGS[0m
select [31mCONFIG_HAVE_PERF_USER_STACK_DUMP[0m
select [31mCONFIG_HAVE_SYSCALL_TRACEPOINTS[0m
select [31mCONFIG_IRQ_DOMAIN[0m
select [31mCONFIG_SPARSE_IRQ[0m
select [31mCONFIG_SYSCTL_EXCEPTION_TRACE[0m
select [31mCONFIG_HAVE_ARCH_TRACEHOOK[0m
select [31mCONFIG_HAVE_PCI[0m
select [31mCONFIG_MODULES_USE_ELF_RELA[0m if [31mCONFIG_MODULES[0m
select [31mCONFIG_MODULE_SECTIONS[0m if [31mCONFIG_MODULES[0m
select [31mCONFIG_THREAD_INFO_IN_TASK[0m
select [31mCONFIG_PCI_DOMAINS_GENERIC[0m if [31mCONFIG_PCI[0m
select [31mCONFIG_PCI_MSI[0m if [31mCONFIG_PCI[0m
select [31mCONFIG_RISCV_TIMER[0m
select [31mCONFIG_GENERIC_IRQ_MULTI_HANDLER[0m
select [31mCONFIG_GENERIC_ARCH_TOPOLOGY[0m if [31mCONFIG_SMP[0m
select [31mCONFIG_ARCH_HAS_PTE_SPECIAL[0m
select [31mCONFIG_ARCH_HAS_MMIOWB[0m
select [31mCONFIG_HAVE_EBPF_JIT[0m if [31mCONFIG_64BIT[0m
select [31mCONFIG_EDAC_SUPPORT[0m
select [31mCONFIG_ARCH_HAS_GIGANTIC_PAGE[0m
select [31mCONFIG_ARCH_WANT_HUGE_PMD_SHARE[0m if [31mCONFIG_64BIT[0m
select [31mCONFIG_SPARSEMEM_STATIC[0m if [31mCONFIG_32BIT[0m
select [31mCONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT[0m if [31mCONFIG_MMU[0m
select [31mCONFIG_HAVE_ARCH_MMAP_RND_BITS[0m
config [31mCONFIG_ARCH_MMAP_RND_BITS_MIN[0m
default 18 if [31mCONFIG_64BIT[0m
default 8
# max bits determined by the following formula:
# [31mCONFIG_VA_BITS[0m - PAGE_SHIFT - 3
config [31mCONFIG_ARCH_MMAP_RND_BITS_MAX[0m
default 24 if [31mCONFIG_64BIT[0m # SV39 based
default 17
config [31mCONFIG_MMU[0m
def_bool y
config [31mCONFIG_ZONE_DMA32[0m
bool
default y if [31mCONFIG_64BIT[0m
config [31mCONFIG_VA_BITS[0m
int
default 32 if [31mCONFIG_32BIT[0m
default 39 if [31mCONFIG_64BIT[0m
config [31mCONFIG_PA_BITS[0m
int
default 34 if [31mCONFIG_32BIT[0m
default 56 if [31mCONFIG_64BIT[0m
config [31mCONFIG_PAGE_OFFSET[0m
hex
default 0xC0000000 if [31mCONFIG_32BIT[0m && [31mCONFIG_MAXPHYSMEM_2GB[0m
default 0xffffffff80000000 if [31mCONFIG_64BIT[0m && [31mCONFIG_MAXPHYSMEM_2GB[0m
default 0xffffffe000000000 if [31mCONFIG_64BIT[0m && [31mCONFIG_MAXPHYSMEM_128GB[0m
config [31mCONFIG_ARCH_FLATMEM_ENABLE[0m
def_bool y
config [31mCONFIG_ARCH_SPARSEMEM_ENABLE[0m
def_bool y
select [31mCONFIG_SPARSEMEM_VMEMMAP_ENABLE[0m
config [31mCONFIG_ARCH_SELECT_MEMORY_MODEL[0m
def_bool [31mCONFIG_ARCH_SPARSEMEM_ENABLE[0m
config [31mCONFIG_ARCH_WANT_GENERAL_HUGETLB[0m
def_bool y
config [31mCONFIG_SYS_SUPPORTS_HUGETLBFS[0m
def_bool y
config [31mCONFIG_STACKTRACE_SUPPORT[0m
def_bool y
config [31mCONFIG_TRACE_IRQFLAGS_SUPPORT[0m
def_bool y
config [31mCONFIG_GENERIC_BUG[0m
def_bool y
depends on [31mCONFIG_BUG[0m
select [31mCONFIG_GENERIC_BUG_RELATIVE_POINTERS[0m if [31mCONFIG_64BIT[0m
config [31mCONFIG_GENERIC_BUG_RELATIVE_POINTERS[0m
bool
config [31mCONFIG_GENERIC_CALIBRATE_DELAY[0m
def_bool y
config [31mCONFIG_GENERIC_CSUM[0m
def_bool y
config [31mCONFIG_GENERIC_HWEIGHT[0m
def_bool y
config [31mCONFIG_FIX_EARLYCON_MEM[0m
def_bool y
config [31mCONFIG_PGTABLE_LEVELS[0m
int
default 3 if [31mCONFIG_64BIT[0m
default 2
source "arch/riscv/Kconfig.socs"
menu "Platform type"
choice
prompt "Base ISA"
default [31mCONFIG_ARCH_RV64I[0m
help
This selects the base [31mCONFIG_ISA[0m that this kernel will target and must match
the target platform.
config [31mCONFIG_ARCH_RV32I[0m
bool "RV32I"
select [31mCONFIG_32BIT[0m
select [31mCONFIG_GENERIC_LIB_ASHLDI3[0m
select [31mCONFIG_GENERIC_LIB_ASHRDI3[0m
select [31mCONFIG_GENERIC_LIB_LSHRDI3[0m
select [31mCONFIG_GENERIC_LIB_UCMPDI2[0m
config [31mCONFIG_ARCH_RV64I[0m
bool "RV64I"
select [31mCONFIG_64BIT[0m
select [31mCONFIG_ARCH_SUPPORTS_INT128[0m if [31mCONFIG_GCC_VERSION[0m >= 50000
select [31mCONFIG_HAVE_FUNCTION_TRACER[0m
select [31mCONFIG_HAVE_FUNCTION_GRAPH_TRACER[0m
select [31mCONFIG_HAVE_FTRACE_MCOUNT_RECORD[0m
select [31mCONFIG_HAVE_DYNAMIC_FTRACE[0m
select [31mCONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS[0m
select [31mCONFIG_SWIOTLB[0m
endchoice
# We must be able to map all physical memory into the kernel, but the compiler
# is still a bit more efficient when generating code if it's setup in a manner
# such that it can only map 2GiB of memory.
choice
prompt "Kernel Code Model"
default [31mCONFIG_CMODEL_MEDLOW[0m if [31mCONFIG_32BIT[0m
default [31mCONFIG_CMODEL_MEDANY[0m if [31mCONFIG_64BIT[0m
config [31mCONFIG_CMODEL_MEDLOW[0m
bool "medium low code model"
config [31mCONFIG_CMODEL_MEDANY[0m
bool "medium any code model"
endchoice
config [31mCONFIG_MODULE_SECTIONS[0m
bool
select [31mCONFIG_HAVE_MOD_ARCH_SPECIFIC[0m
choice
prompt "Maximum Physical Memory"
default [31mCONFIG_MAXPHYSMEM_2GB[0m if [31mCONFIG_32BIT[0m
default [31mCONFIG_MAXPHYSMEM_2GB[0m if [31mCONFIG_64BIT[0m && [31mCONFIG_CMODEL_MEDLOW[0m
default [31mCONFIG_MAXPHYSMEM_128GB[0m if [31mCONFIG_64BIT[0m && [31mCONFIG_CMODEL_MEDANY[0m
config [31mCONFIG_MAXPHYSMEM_2GB[0m
bool "2GiB"
config [31mCONFIG_MAXPHYSMEM_128GB[0m
depends on [31mCONFIG_64BIT[0m && [31mCONFIG_CMODEL_MEDANY[0m
bool "128GiB"
endchoice
config [31mCONFIG_SMP[0m
bool "Symmetric Multi-Processing"
help
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 [31mCONFIG_NR_CPUS[0m
int "Maximum number of CPUs (2-32)"
range 2 32
depends on [31mCONFIG_SMP[0m
default "8"
choice
prompt "CPU Tuning"
default [31mCONFIG_TUNE_GENERIC[0m
config [31mCONFIG_TUNE_GENERIC[0m
bool "generic"
endchoice
config [31mCONFIG_RISCV_ISA_C[0m
bool "Emit compressed instructions when building Linux"
default y
help
Adds "C" to the [31mCONFIG_ISA[0m subsets that the toolchain is allowed to emit
when building Linux, which results in compressed instructions in the
Linux binary.
If you don't know what to do here, say Y.
menu "supported PMU type"
depends on [31mCONFIG_PERF_EVENTS[0m
config [31mCONFIG_RISCV_BASE_PMU[0m
bool "Base Performance Monitoring Unit"
def_bool y
help
[31mCONFIG_A[0m base PMU that serves as a reference implementation and has limited
feature of perf. It can run on any RISC-V machines so serves as the
fallback, but this option can also be disable to reduce kernel size.
endmenu
config [31mCONFIG_FPU[0m
bool "FPU support"
default y
help
Say N here if you want to disable all floating-point related procedure
in the kernel.
If you don't know what to do here, say Y.
endmenu
menu "Kernel features"
source "kernel/Kconfig.hz"
endmenu
menu "Boot options"
config [31mCONFIG_CMDLINE[0m
string "Built-in kernel command line"
help
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.
choice
prompt "Built-in command line usage" if [31mCONFIG_CMDLINE[0m != ""
default [31mCONFIG_CMDLINE_FALLBACK[0m
help
Choose how the kernel will handle the provided built-in command
line.
config [31mCONFIG_CMDLINE_FALLBACK[0m
bool "Use bootloader kernel arguments if available"
help
Use the built-in command line as fallback in case we get nothing
during boot. This is the default behaviour.
config [31mCONFIG_CMDLINE_EXTEND[0m
bool "Extend bootloader kernel arguments"
help
The command-line arguments provided during boot will be
appended to the built-in command line. This is useful in
cases where the provided arguments are insufficient and
you don't want to or cannot modify them.
config [31mCONFIG_CMDLINE_FORCE[0m
bool "Always use the default kernel command string"
help
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.
endchoice
endmenu
menu "Power management options"
source "kernel/power/Kconfig"
endmenu