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