Kconfig 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. #
  2. # For a description of the syntax of this configuration file,
  3. # see Documentation/kbuild/kconfig-language.txt.
  4. #
  5. config 64BIT
  6. bool
  7. config 32BIT
  8. bool
  9. config RISCV
  10. def_bool y
  11. # even on 32-bit, physical (and DMA) addresses are > 32-bits
  12. select PHYS_ADDR_T_64BIT
  13. select OF
  14. select OF_EARLY_FLATTREE
  15. select OF_IRQ
  16. select ARCH_WANT_FRAME_POINTERS
  17. select CLONE_BACKWARDS
  18. select COMMON_CLK
  19. select DMA_DIRECT_OPS
  20. select GENERIC_CLOCKEVENTS
  21. select GENERIC_CPU_DEVICES
  22. select GENERIC_IRQ_SHOW
  23. select GENERIC_PCI_IOMAP
  24. select GENERIC_STRNCPY_FROM_USER
  25. select GENERIC_STRNLEN_USER
  26. select GENERIC_SMP_IDLE_THREAD
  27. select GENERIC_ATOMIC64 if !64BIT || !RISCV_ISA_A
  28. select HAVE_MEMBLOCK_NODE_MAP
  29. select HAVE_DMA_CONTIGUOUS
  30. select HAVE_FUTEX_CMPXCHG if FUTEX
  31. select HAVE_GENERIC_DMA_COHERENT
  32. select HAVE_PERF_EVENTS
  33. select IRQ_DOMAIN
  34. select RISCV_ISA_A if SMP
  35. select SPARSE_IRQ
  36. select SYSCTL_EXCEPTION_TRACE
  37. select HAVE_ARCH_TRACEHOOK
  38. select MODULES_USE_ELF_RELA if MODULES
  39. select THREAD_INFO_IN_TASK
  40. select RISCV_TIMER
  41. select GENERIC_IRQ_MULTI_HANDLER
  42. select ARCH_HAS_PTE_SPECIAL
  43. config MMU
  44. def_bool y
  45. config ZONE_DMA32
  46. bool
  47. default y if 64BIT
  48. config PAGE_OFFSET
  49. hex
  50. default 0xC0000000 if 32BIT && MAXPHYSMEM_2GB
  51. default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB
  52. default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB
  53. config STACKTRACE_SUPPORT
  54. def_bool y
  55. config TRACE_IRQFLAGS_SUPPORT
  56. def_bool y
  57. config RWSEM_GENERIC_SPINLOCK
  58. def_bool y
  59. config GENERIC_BUG
  60. def_bool y
  61. depends on BUG
  62. select GENERIC_BUG_RELATIVE_POINTERS if 64BIT
  63. config GENERIC_BUG_RELATIVE_POINTERS
  64. bool
  65. config GENERIC_CALIBRATE_DELAY
  66. def_bool y
  67. config GENERIC_CSUM
  68. def_bool y
  69. config GENERIC_HWEIGHT
  70. def_bool y
  71. config PGTABLE_LEVELS
  72. int
  73. default 3 if 64BIT
  74. default 2
  75. config HAVE_KPROBES
  76. def_bool n
  77. menu "Platform type"
  78. choice
  79. prompt "Base ISA"
  80. default ARCH_RV64I
  81. help
  82. This selects the base ISA that this kernel will traget and must match
  83. the target platform.
  84. config ARCH_RV32I
  85. bool "RV32I"
  86. select 32BIT
  87. select GENERIC_LIB_ASHLDI3
  88. select GENERIC_LIB_ASHRDI3
  89. select GENERIC_LIB_LSHRDI3
  90. select GENERIC_LIB_UCMPDI2
  91. config ARCH_RV64I
  92. bool "RV64I"
  93. select 64BIT
  94. select ARCH_SUPPORTS_INT128 if GCC_VERSION >= 50000
  95. select HAVE_FUNCTION_TRACER
  96. select HAVE_FUNCTION_GRAPH_TRACER
  97. select HAVE_FTRACE_MCOUNT_RECORD
  98. select HAVE_DYNAMIC_FTRACE
  99. select HAVE_DYNAMIC_FTRACE_WITH_REGS
  100. select SWIOTLB
  101. endchoice
  102. # We must be able to map all physical memory into the kernel, but the compiler
  103. # is still a bit more efficient when generating code if it's setup in a manner
  104. # such that it can only map 2GiB of memory.
  105. choice
  106. prompt "Kernel Code Model"
  107. default CMODEL_MEDLOW if 32BIT
  108. default CMODEL_MEDANY if 64BIT
  109. config CMODEL_MEDLOW
  110. bool "medium low code model"
  111. config CMODEL_MEDANY
  112. bool "medium any code model"
  113. endchoice
  114. config MODULE_SECTIONS
  115. bool
  116. select HAVE_MOD_ARCH_SPECIFIC
  117. choice
  118. prompt "Maximum Physical Memory"
  119. default MAXPHYSMEM_2GB if 32BIT
  120. default MAXPHYSMEM_2GB if 64BIT && CMODEL_MEDLOW
  121. default MAXPHYSMEM_128GB if 64BIT && CMODEL_MEDANY
  122. config MAXPHYSMEM_2GB
  123. bool "2GiB"
  124. config MAXPHYSMEM_128GB
  125. depends on 64BIT && CMODEL_MEDANY
  126. select MODULE_SECTIONS if MODULES
  127. bool "128GiB"
  128. endchoice
  129. config SMP
  130. bool "Symmetric Multi-Processing"
  131. help
  132. This enables support for systems with more than one CPU. If
  133. you say N here, the kernel will run on single and
  134. multiprocessor machines, but will use only one CPU of a
  135. multiprocessor machine. If you say Y here, the kernel will run
  136. on many, but not all, single processor machines. On a single
  137. processor machine, the kernel will run faster if you say N
  138. here.
  139. If you don't know what to do here, say N.
  140. config NR_CPUS
  141. int "Maximum number of CPUs (2-32)"
  142. range 2 32
  143. depends on SMP
  144. default "8"
  145. choice
  146. prompt "CPU Tuning"
  147. default TUNE_GENERIC
  148. config TUNE_GENERIC
  149. bool "generic"
  150. endchoice
  151. config RISCV_ISA_C
  152. bool "Emit compressed instructions when building Linux"
  153. default y
  154. help
  155. Adds "C" to the ISA subsets that the toolchain is allowed to emit
  156. when building Linux, which results in compressed instructions in the
  157. Linux binary.
  158. If you don't know what to do here, say Y.
  159. config RISCV_ISA_A
  160. def_bool y
  161. menu "supported PMU type"
  162. depends on PERF_EVENTS
  163. config RISCV_BASE_PMU
  164. bool "Base Performance Monitoring Unit"
  165. def_bool y
  166. help
  167. A base PMU that serves as a reference implementation and has limited
  168. feature of perf. It can run on any RISC-V machines so serves as the
  169. fallback, but this option can also be disable to reduce kernel size.
  170. endmenu
  171. config FPU
  172. bool "FPU support"
  173. default y
  174. help
  175. Say N here if you want to disable all floating-point related procedure
  176. in the kernel.
  177. If you don't know what to do here, say Y.
  178. endmenu
  179. menu "Kernel features"
  180. source "kernel/Kconfig.hz"
  181. endmenu
  182. menu "Boot options"
  183. config CMDLINE_BOOL
  184. bool "Built-in kernel command line"
  185. help
  186. For most platforms, it is firmware or second stage bootloader
  187. that by default specifies the kernel command line options.
  188. However, it might be necessary or advantageous to either override
  189. the default kernel command line or add a few extra options to it.
  190. For such cases, this option allows hardcoding command line options
  191. directly into the kernel.
  192. For that, choose 'Y' here and fill in the extra boot parameters
  193. in CONFIG_CMDLINE.
  194. The built-in options will be concatenated to the default command
  195. line if CMDLINE_FORCE is set to 'N'. Otherwise, the default
  196. command line will be ignored and replaced by the built-in string.
  197. config CMDLINE
  198. string "Built-in kernel command string"
  199. depends on CMDLINE_BOOL
  200. default ""
  201. help
  202. Supply command-line options at build time by entering them here.
  203. config CMDLINE_FORCE
  204. bool "Built-in command line overrides bootloader arguments"
  205. depends on CMDLINE_BOOL
  206. help
  207. Set this option to 'Y' to have the kernel ignore the bootloader
  208. or firmware command line. Instead, the built-in command line
  209. will be used exclusively.
  210. If you don't know what to do here, say N.
  211. endmenu
  212. menu "Bus support"
  213. config PCI
  214. bool "PCI support"
  215. select PCI_MSI
  216. help
  217. This feature enables support for PCI bus system. If you say Y
  218. here, the kernel will include drivers and infrastructure code
  219. to support PCI bus devices.
  220. If you don't know what to do here, say Y.
  221. config PCI_DOMAINS
  222. def_bool PCI
  223. config PCI_DOMAINS_GENERIC
  224. def_bool PCI
  225. source "drivers/pci/Kconfig"
  226. endmenu
  227. menu "Power management options"
  228. source kernel/power/Kconfig
  229. endmenu