Kconfig 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426
  1. menu "RISC-V architecture"
  2. depends on RISCV
  3. config SYS_ARCH
  4. default "riscv"
  5. choice
  6. prompt "Target select"
  7. optional
  8. config TARGET_AE350
  9. bool "Support ae350"
  10. config TARGET_MICROCHIP_ICICLE
  11. bool "Support Microchip PolarFire-SoC Icicle Board"
  12. config TARGET_QEMU_VIRT
  13. bool "Support QEMU Virt Board"
  14. config TARGET_SIFIVE_UNLEASHED
  15. bool "Support SiFive Unleashed Board"
  16. config TARGET_SIFIVE_UNMATCHED
  17. bool "Support SiFive Unmatched Board"
  18. select SYS_CACHE_SHIFT_6
  19. config TARGET_STARFIVE_VISIONFIVE2
  20. bool "Support StarFive VisionFive2 Board"
  21. select BOARD_LATE_INIT
  22. config TARGET_TH1520_LPI4A
  23. bool "Support Sipeed's TH1520 Lichee PI 4A Board"
  24. select SYS_CACHE_SHIFT_6
  25. config TARGET_SIPEED_MAIX
  26. bool "Support Sipeed Maix Board"
  27. select SYS_CACHE_SHIFT_6
  28. config TARGET_OPENPITON_RISCV64
  29. bool "Support RISC-V cores on OpenPiton SoC"
  30. endchoice
  31. config SYS_ICACHE_OFF
  32. bool "Do not enable icache"
  33. help
  34. Do not enable instruction cache in U-Boot.
  35. config SPL_SYS_ICACHE_OFF
  36. bool "Do not enable icache in SPL"
  37. depends on SPL
  38. default SYS_ICACHE_OFF
  39. help
  40. Do not enable instruction cache in SPL.
  41. config SYS_DCACHE_OFF
  42. bool "Do not enable dcache"
  43. help
  44. Do not enable data cache in U-Boot.
  45. config SPL_SYS_DCACHE_OFF
  46. bool "Do not enable dcache in SPL"
  47. depends on SPL
  48. default SYS_DCACHE_OFF
  49. help
  50. Do not enable data cache in SPL.
  51. config SPL_ZERO_MEM_BEFORE_USE
  52. bool "Zero memory before use"
  53. depends on SPL
  54. default n
  55. help
  56. Zero stack/GD/malloc area in SPL before using them, this is needed for
  57. Sifive core devices that uses L2 cache to store SPL.
  58. # board-specific options below
  59. source "board/AndesTech/ae350/Kconfig"
  60. source "board/emulation/qemu-riscv/Kconfig"
  61. source "board/microchip/mpfs_icicle/Kconfig"
  62. source "board/sifive/unleashed/Kconfig"
  63. source "board/sifive/unmatched/Kconfig"
  64. source "board/thead/th1520_lpi4a/Kconfig"
  65. source "board/openpiton/riscv64/Kconfig"
  66. source "board/sipeed/maix/Kconfig"
  67. source "board/starfive/visionfive2/Kconfig"
  68. # platform-specific options below
  69. source "arch/riscv/cpu/andesv5/Kconfig"
  70. source "arch/riscv/cpu/fu540/Kconfig"
  71. source "arch/riscv/cpu/fu740/Kconfig"
  72. source "arch/riscv/cpu/generic/Kconfig"
  73. source "arch/riscv/cpu/jh7110/Kconfig"
  74. # architecture-specific options below
  75. choice
  76. prompt "Base ISA"
  77. default ARCH_RV32I
  78. config ARCH_RV32I
  79. bool "RV32I"
  80. select 32BIT
  81. help
  82. Choose this option to target the RV32I base integer instruction set.
  83. config ARCH_RV64I
  84. bool "RV64I"
  85. select 64BIT
  86. select PHYS_64BIT
  87. help
  88. Choose this option to target the RV64I base integer instruction set.
  89. endchoice
  90. choice
  91. prompt "Code Model"
  92. default CMODEL_MEDLOW
  93. config CMODEL_MEDLOW
  94. bool "medium low code model"
  95. help
  96. U-Boot and its statically defined symbols must lie within a single 2 GiB
  97. address range and must lie between absolute addresses -2 GiB and +2 GiB.
  98. config CMODEL_MEDANY
  99. bool "medium any code model"
  100. help
  101. U-Boot and its statically defined symbols must be within any single 2 GiB
  102. address range.
  103. endchoice
  104. choice
  105. prompt "Run Mode"
  106. default RISCV_MMODE
  107. config RISCV_MMODE
  108. bool "Machine"
  109. help
  110. Choose this option to build U-Boot for RISC-V M-Mode.
  111. config RISCV_SMODE
  112. bool "Supervisor"
  113. help
  114. Choose this option to build U-Boot for RISC-V S-Mode.
  115. endchoice
  116. choice
  117. prompt "SPL Run Mode"
  118. default SPL_RISCV_MMODE
  119. depends on SPL
  120. config SPL_RISCV_MMODE
  121. bool "Machine"
  122. help
  123. Choose this option to build U-Boot SPL for RISC-V M-Mode.
  124. config SPL_RISCV_SMODE
  125. bool "Supervisor"
  126. help
  127. Choose this option to build U-Boot SPL for RISC-V S-Mode.
  128. endchoice
  129. config RISCV_ISA_C
  130. bool "Emit compressed instructions"
  131. default y
  132. help
  133. Adds "C" to the ISA subsets that the toolchain is allowed to emit
  134. when building U-Boot, which results in compressed instructions in the
  135. U-Boot binary.
  136. config RISCV_ISA_F
  137. bool "Standard extension for Single-Precision Floating Point"
  138. default y
  139. help
  140. Adds "F" to the ISA string passed to the compiler.
  141. config RISCV_ISA_D
  142. bool "Standard extension for Double-Precision Floating Point"
  143. depends on RISCV_ISA_F
  144. default y
  145. help
  146. Adds "D" to the ISA string passed to the compiler and changes the
  147. riscv32 ABI from ilp32 to ilp32d and the riscv64 ABI from lp64 to
  148. lp64d.
  149. config RISCV_ISA_A
  150. def_bool y
  151. config 32BIT
  152. bool
  153. config 64BIT
  154. bool
  155. config DMA_ADDR_T_64BIT
  156. bool
  157. default y if 64BIT
  158. config RISCV_ACLINT
  159. bool
  160. depends on RISCV_MMODE
  161. select REGMAP
  162. select SYSCON
  163. help
  164. The RISC-V ACLINT block holds memory-mapped control and status registers
  165. associated with software and timer interrupts.
  166. config SPL_RISCV_ACLINT
  167. bool
  168. depends on SPL_RISCV_MMODE
  169. select SPL_REGMAP
  170. select SPL_SYSCON
  171. help
  172. The RISC-V ACLINT block holds memory-mapped control and status registers
  173. associated with software and timer interrupts.
  174. config SIFIVE_CACHE
  175. bool
  176. help
  177. This enables the operations to configure SiFive cache
  178. config ANDES_PLICSW
  179. bool
  180. depends on RISCV_MMODE || SPL_RISCV_MMODE
  181. select REGMAP
  182. select SYSCON
  183. select SPL_REGMAP if SPL
  184. select SPL_SYSCON if SPL
  185. help
  186. The Andes PLICSW block holds memory-mapped claim and pending
  187. registers associated with software interrupt.
  188. config SMP
  189. bool "Symmetric Multi-Processing"
  190. depends on SBI_V01 || !RISCV_SMODE
  191. help
  192. This enables support for systems with more than one CPU. If
  193. you say N here, U-Boot will run on single and multiprocessor
  194. machines, but will use only one CPU of a multiprocessor
  195. machine. If you say Y here, U-Boot will run on many, but not
  196. all, single processor machines.
  197. config SPL_SMP
  198. bool "Symmetric Multi-Processing in SPL"
  199. depends on SPL && SPL_RISCV_MMODE
  200. default y
  201. help
  202. This enables support for systems with more than one CPU in SPL.
  203. If you say N here, U-Boot SPL will run on single and multiprocessor
  204. machines, but will use only one CPU of a multiprocessor
  205. machine. If you say Y here, U-Boot SPL will run on many, but not
  206. all, single processor machines.
  207. config NR_CPUS
  208. int "Maximum number of CPUs (2-32)"
  209. range 2 32
  210. depends on SMP || SPL_SMP
  211. default 8
  212. help
  213. On multiprocessor machines, U-Boot sets up a stack for each CPU.
  214. Stack memory is pre-allocated. U-Boot must therefore know the
  215. maximum number of CPUs that may be present.
  216. config SBI
  217. bool
  218. default y if RISCV_SMODE || SPL_RISCV_SMODE
  219. choice
  220. prompt "SBI support"
  221. default SBI_V02
  222. config SBI_V01
  223. bool "SBI v0.1 support"
  224. depends on SBI
  225. help
  226. This config allows kernel to use SBI v0.1 APIs. This will be
  227. deprecated in future once legacy M-mode software are no longer in use.
  228. config SBI_V02
  229. bool "SBI v0.2 or later support"
  230. depends on SBI
  231. help
  232. The SBI specification introduced the concept of extensions in version
  233. v0.2. With this configuration option U-Boot can detect and use SBI
  234. extensions. With the HSM extension introduced in SBI 0.2, only a
  235. single hart needs to boot and enter the operating system. The booting
  236. hart can bring up secondary harts one by one afterwards.
  237. Choose this option if OpenSBI release v0.7 or above is used together
  238. with U-Boot.
  239. endchoice
  240. config SBI_IPI
  241. bool
  242. depends on SBI
  243. default y if RISCV_SMODE || SPL_RISCV_SMODE
  244. depends on SMP
  245. config XIP
  246. bool "XIP mode"
  247. help
  248. XIP (eXecute In Place) is a method for executing code directly
  249. from a NOR flash memory without copying the code to ram.
  250. Say yes here if U-Boot boots from flash directly.
  251. config SPL_XIP
  252. bool "Enable XIP mode for SPL"
  253. help
  254. If SPL starts in read-only memory (XIP for example) then we shouldn't
  255. rely on lock variables (for example hart_lottery and available_harts_lock),
  256. this affects only SPL, other stages should proceed as non-XIP.
  257. config AVAILABLE_HARTS
  258. bool "Send IPI by available harts"
  259. default y
  260. help
  261. By default, IPI sending mechanism will depend on available_harts.
  262. If disable this, it will send IPI by CPUs node numbers of device tree.
  263. config SHOW_REGS
  264. bool "Show registers on unhandled exception"
  265. config RISCV_PRIV_1_9
  266. bool "Use version 1.9 of the RISC-V priviledged specification"
  267. help
  268. Older versions of the RISC-V priviledged specification had
  269. separate counter enable CSRs for each privilege mode. Writing
  270. to the unified mcounteren CSR on a processor implementing the
  271. old specification will result in an illegal instruction
  272. exception. In addition to counter CSR changes, the way virtual
  273. memory is configured was also changed.
  274. config STACK_SIZE_SHIFT
  275. int
  276. default 14
  277. config OF_BOARD_FIXUP
  278. default y if OF_SEPARATE && RISCV_SMODE
  279. menu "Use assembly optimized implementation of memory routines"
  280. config USE_ARCH_MEMCPY
  281. bool "Use an assembly optimized implementation of memcpy"
  282. default y
  283. help
  284. Enable the generation of an optimized version of memcpy.
  285. Such an implementation may be faster under some conditions
  286. but may increase the binary size.
  287. config SPL_USE_ARCH_MEMCPY
  288. bool "Use an assembly optimized implementation of memcpy for SPL"
  289. default y if USE_ARCH_MEMCPY
  290. depends on SPL
  291. help
  292. Enable the generation of an optimized version of memcpy.
  293. Such an implementation may be faster under some conditions
  294. but may increase the binary size.
  295. config TPL_USE_ARCH_MEMCPY
  296. bool "Use an assembly optimized implementation of memcpy for TPL"
  297. default y if USE_ARCH_MEMCPY
  298. depends on TPL
  299. help
  300. Enable the generation of an optimized version of memcpy.
  301. Such an implementation may be faster under some conditions
  302. but may increase the binary size.
  303. config USE_ARCH_MEMMOVE
  304. bool "Use an assembly optimized implementation of memmove"
  305. default y
  306. help
  307. Enable the generation of an optimized version of memmove.
  308. Such an implementation may be faster under some conditions
  309. but may increase the binary size.
  310. config SPL_USE_ARCH_MEMMOVE
  311. bool "Use an assembly optimized implementation of memmove for SPL"
  312. default y if USE_ARCH_MEMCPY
  313. depends on SPL
  314. help
  315. Enable the generation of an optimized version of memmove.
  316. Such an implementation may be faster under some conditions
  317. but may increase the binary size.
  318. config TPL_USE_ARCH_MEMMOVE
  319. bool "Use an assembly optimized implementation of memmove for TPL"
  320. default y if USE_ARCH_MEMCPY
  321. depends on TPL
  322. help
  323. Enable the generation of an optimized version of memmove.
  324. Such an implementation may be faster under some conditions
  325. but may increase the binary size.
  326. config USE_ARCH_MEMSET
  327. bool "Use an assembly optimized implementation of memset"
  328. default y
  329. help
  330. Enable the generation of an optimized version of memset.
  331. Such an implementation may be faster under some conditions
  332. but may increase the binary size.
  333. config SPL_USE_ARCH_MEMSET
  334. bool "Use an assembly optimized implementation of memset for SPL"
  335. default y if USE_ARCH_MEMSET
  336. depends on SPL
  337. help
  338. Enable the generation of an optimized version of memset.
  339. Such an implementation may be faster under some conditions
  340. but may increase the binary size.
  341. config TPL_USE_ARCH_MEMSET
  342. bool "Use an assembly optimized implementation of memset for TPL"
  343. default y if USE_ARCH_MEMSET
  344. depends on TPL
  345. help
  346. Enable the generation of an optimized version of memset.
  347. Such an implementation may be faster under some conditions
  348. but may increase the binary size.
  349. endmenu
  350. endmenu