Kconfig 6.4 KB

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