Kconfig 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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
  29. select HAVE_MEMBLOCK_NODE_MAP
  30. select HAVE_DMA_CONTIGUOUS
  31. select HAVE_GENERIC_DMA_COHERENT
  32. select HAVE_PERF_EVENTS
  33. select IRQ_DOMAIN
  34. select NO_BOOTMEM
  35. select RISCV_ISA_A if SMP
  36. select SPARSE_IRQ
  37. select SYSCTL_EXCEPTION_TRACE
  38. select HAVE_ARCH_TRACEHOOK
  39. select MODULES_USE_ELF_RELA if MODULES
  40. select THREAD_INFO_IN_TASK
  41. select RISCV_TIMER
  42. select GENERIC_IRQ_MULTI_HANDLER
  43. select ARCH_HAS_PTE_SPECIAL
  44. config MMU
  45. def_bool y
  46. config ZONE_DMA32
  47. bool
  48. default y if 64BIT
  49. config PAGE_OFFSET
  50. hex
  51. default 0xC0000000 if 32BIT && MAXPHYSMEM_2GB
  52. default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB
  53. default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB
  54. config STACKTRACE_SUPPORT
  55. def_bool y
  56. config TRACE_IRQFLAGS_SUPPORT
  57. def_bool y
  58. config RWSEM_GENERIC_SPINLOCK
  59. def_bool y
  60. config GENERIC_BUG
  61. def_bool y
  62. depends on BUG
  63. select GENERIC_BUG_RELATIVE_POINTERS if 64BIT
  64. config GENERIC_BUG_RELATIVE_POINTERS
  65. bool
  66. config GENERIC_CALIBRATE_DELAY
  67. def_bool y
  68. config GENERIC_CSUM
  69. def_bool y
  70. config GENERIC_HWEIGHT
  71. def_bool y
  72. config PGTABLE_LEVELS
  73. int
  74. default 3 if 64BIT
  75. default 2
  76. config HAVE_KPROBES
  77. def_bool n
  78. menu "Platform type"
  79. choice
  80. prompt "Base ISA"
  81. default ARCH_RV64I
  82. help
  83. This selects the base ISA that this kernel will traget and must match
  84. the target platform.
  85. config ARCH_RV32I
  86. bool "RV32I"
  87. select 32BIT
  88. select GENERIC_LIB_ASHLDI3
  89. select GENERIC_LIB_ASHRDI3
  90. select GENERIC_LIB_LSHRDI3
  91. select GENERIC_LIB_UCMPDI2
  92. config ARCH_RV64I
  93. bool "RV64I"
  94. select 64BIT
  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. endmenu
  172. menu "Kernel type"
  173. source "kernel/Kconfig.hz"
  174. endmenu
  175. menu "Bus support"
  176. config PCI
  177. bool "PCI support"
  178. select PCI_MSI
  179. help
  180. This feature enables support for PCI bus system. If you say Y
  181. here, the kernel will include drivers and infrastructure code
  182. to support PCI bus devices.
  183. If you don't know what to do here, say Y.
  184. config PCI_DOMAINS
  185. def_bool PCI
  186. config PCI_DOMAINS_GENERIC
  187. def_bool PCI
  188. source "drivers/pci/Kconfig"
  189. endmenu
  190. menu "Power management options"
  191. source kernel/power/Kconfig
  192. endmenu