1 menu "RISC-V architecture"
11 config TARGET_ANDES_AE350
12 bool "Support Andes ae350"
14 config TARGET_BANANAPI_F3
15 bool "Support BananaPi F3 Board"
17 config TARGET_LICHEERV_NANO
18 bool "Support LicheeRV Nano Board"
20 config TARGET_MICROCHIP_ICICLE
21 bool "Support Microchip PolarFire-SoC Icicle Board"
23 config TARGET_MILKV_DUO
24 bool "Support Milk-v Duo Board"
26 config TARGET_OPENPITON_RISCV64
27 bool "Support RISC-V cores on OpenPiton SoC"
29 config TARGET_QEMU_VIRT
30 bool "Support QEMU Virt & RVVM Boards"
31 select BOARD_LATE_INIT
33 config TARGET_SIFIVE_UNLEASHED
34 bool "Support SiFive Unleashed Board"
36 config TARGET_SIFIVE_UNMATCHED
37 bool "Support SiFive Unmatched Board"
38 select SYS_CACHE_SHIFT_6
40 config TARGET_SIPEED_MAIX
41 bool "Support Sipeed Maix Board"
42 select SYS_CACHE_SHIFT_6
44 config TARGET_STARFIVE_VISIONFIVE2
45 bool "Support StarFive VisionFive2 Board"
46 select BOARD_LATE_INIT
48 config TARGET_TH1520_LPI4A
49 bool "Support Sipeed's TH1520 Lichee PI 4A Board"
50 select SYS_CACHE_SHIFT_6
52 config TARGET_XILINX_MBV
53 bool "Support AMD/Xilinx MicroBlaze V"
55 config TARGET_ASPEED_AST2700_IBEX
56 bool "Support Ibex RISC-V cores on Aspeed AST2700 SoC"
61 bool "Do not enable icache"
63 Do not enable instruction cache in U-Boot.
65 config SPL_SYS_ICACHE_OFF
66 bool "Do not enable icache in SPL"
68 default SYS_ICACHE_OFF
70 Do not enable instruction cache in SPL.
73 bool "Do not enable dcache"
75 Do not enable data cache in U-Boot.
77 config SPL_SYS_DCACHE_OFF
78 bool "Do not enable dcache in SPL"
80 default SYS_DCACHE_OFF
82 Do not enable data cache in SPL.
84 config SPL_ZERO_MEM_BEFORE_USE
85 bool "Zero memory before use"
88 Zero stack/GD/malloc area in SPL before using them, this is needed for
89 Sifive core devices that uses L2 cache to store SPL.
91 # board-specific options below
92 source "board/andestech/ae350/Kconfig"
93 source "board/aspeed/ibex_ast2700/Kconfig"
94 source "board/emulation/qemu-riscv/Kconfig"
95 source "board/microchip/mpfs_icicle/Kconfig"
96 source "board/openpiton/riscv64/Kconfig"
97 source "board/sifive/unleashed/Kconfig"
98 source "board/sifive/unmatched/Kconfig"
99 source "board/sipeed/maix/Kconfig"
100 source "board/sophgo/milkv_duo/Kconfig"
101 source "board/sophgo/licheerv_nano/Kconfig"
102 source "board/spacemit/bananapi-f3/Kconfig"
103 source "board/starfive/visionfive2/Kconfig"
104 source "board/thead/th1520_lpi4a/Kconfig"
105 source "board/xilinx/mbv/Kconfig"
107 # platform-specific options below
108 source "arch/riscv/cpu/andes/Kconfig"
109 source "arch/riscv/cpu/cv1800b/Kconfig"
110 source "arch/riscv/cpu/fu540/Kconfig"
111 source "arch/riscv/cpu/fu740/Kconfig"
112 source "arch/riscv/cpu/ast2700/Kconfig"
113 source "arch/riscv/cpu/generic/Kconfig"
114 source "arch/riscv/cpu/jh7110/Kconfig"
115 source "arch/riscv/cpu/k1/Kconfig"
117 # architecture-specific options below
127 Choose this option to target the RV32I base integer instruction set.
132 select SPL_64BIT if SPL
135 Choose this option to target the RV64I base integer instruction set.
140 bool "Build with frame pointer for stack unwinding"
142 Choose this option to use the frame pointer so the stack can be
143 unwound if needed. This is useful for tracing where faults came
144 from as the source may be several functions back
146 If you say Y here, then the code size will be increased due to
147 having to store the fp.
149 config SPL_FRAMEPOINTER
150 bool "Build SPL with frame pointer for stack unwinding"
153 Choose this option to use the frame pointer so the stack can be
154 unwound if needed. This is useful for tracing where faults came
155 from as the source may be several functions back
157 If you say Y here, then the code size will be increased due to
158 having to store the fp.
162 default CMODEL_MEDLOW
165 bool "medium low code model"
167 U-Boot and its statically defined symbols must lie within a single 2 GiB
168 address range and must lie between absolute addresses -2 GiB and +2 GiB.
171 bool "medium any code model"
173 U-Boot and its statically defined symbols must be within any single 2 GiB
185 Choose this option to build U-Boot for RISC-V M-Mode.
191 Choose this option to build U-Boot for RISC-V S-Mode.
196 prompt "SPL Run Mode"
197 default SPL_RISCV_MMODE
200 config SPL_RISCV_MMODE
203 Choose this option to build U-Boot SPL for RISC-V M-Mode.
205 config SPL_RISCV_SMODE
208 Choose this option to build U-Boot SPL for RISC-V S-Mode.
213 bool "Emit compressed instructions"
216 Adds "C" to the ISA subsets that the toolchain is allowed to emit
217 when building U-Boot, which results in compressed instructions in the
221 bool "Standard extension for Single-Precision Floating Point"
224 Adds "F" to the ISA string passed to the compiler.
227 bool "Standard extension for Double-Precision Floating Point"
228 depends on RISCV_ISA_F
231 Adds "D" to the ISA string passed to the compiler and changes the
232 riscv32 ABI from ilp32 to ilp32d and the riscv64 ABI from lp64 to
236 bool "Zbb extension support for bit manipulation instructions"
238 Adds ZBB extension (basic bit manipulation) to the ISA subsets
239 that the toolchain is allowed to emit when building U-Boot.
240 The Zbb extension provides instructions to accelerate a number
241 of bit-specific operations (count bit population, sign extending,
242 bitrotation, etc) and enables optimized string routines.
244 menu "Use assembly optimized implementation of string routines"
246 config USE_ARCH_STRLEN
247 bool "Use an assembly optimized implementation of strlen"
249 depends on RISCV_ISA_ZBB
251 Enable the generation of an optimized version of strlen using
254 config SPL_USE_ARCH_STRLEN
255 bool "Use an assembly optimized implementation of strlen for SPL"
256 default y if USE_ARCH_STRLEN
257 depends on RISCV_ISA_ZBB
260 Enable the generation of an optimized version of strlen using
263 config TPL_USE_ARCH_STRLEN
264 bool "Use an assembly optimized implementation of strlen for TPL"
265 default y if USE_ARCH_STRLEN
266 depends on RISCV_ISA_ZBB
269 Enable the generation of an optimized version of strlen using
272 config USE_ARCH_STRCMP
273 bool "Use an assembly optimized implementation of strcmp"
275 depends on RISCV_ISA_ZBB
277 Enable the generation of an optimized version of strcmp using
280 config SPL_USE_ARCH_STRCMP
281 bool "Use an assembly optimized implementation of strcmp for SPL"
282 default y if USE_ARCH_STRCMP
283 depends on RISCV_ISA_ZBB
286 Enable the generation of an optimized version of strcmp using
289 config TPL_USE_ARCH_STRCMP
290 bool "Use an assembly optimized implementation of strcmp for TPL"
291 default y if USE_ARCH_STRCMP
292 depends on RISCV_ISA_ZBB
295 Enable the generation of an optimized version of strcmp using
298 config USE_ARCH_STRNCMP
299 bool "Use an assembly optimized implementation of strncmp"
301 depends on RISCV_ISA_ZBB
303 Enable the generation of an optimized version of strncmp using
306 config SPL_USE_ARCH_STRNCMP
307 bool "Use an assembly optimized implementation of strncmp for SPL"
308 default y if USE_ARCH_STRNCMP
309 depends on RISCV_ISA_ZBB
312 Enable the generation of an optimized version of strncmp using
315 config TPL_USE_ARCH_STRNCMP
316 bool "Use an assembly optimized implementation of strncmp for TPL"
317 default y if USE_ARCH_STRNCMP
318 depends on RISCV_ISA_ZBB
321 Enable the generation of an optimized version of strncmp using
327 bool "Standard extension for Atomic Instructions"
330 Adds "A" to the ISA string passed to the compiler.
332 config RISCV_ISA_ZICBOM
333 bool "Zicbom support"
334 depends on !SYS_DISABLE_DCACHE_OPS
336 config DMA_ADDR_T_64BIT
342 depends on RISCV_MMODE
346 The RISC-V ACLINT block holds memory-mapped control and status registers
347 associated with software and timer interrupts.
349 config SPL_RISCV_ACLINT
351 depends on SPL_RISCV_MMODE
355 The RISC-V ACLINT block holds memory-mapped control and status registers
356 associated with software and timer interrupts.
361 This enables the operations to configure SiFive cache
365 depends on RISCV_MMODE || SPL_RISCV_MMODE
368 select SPL_REGMAP if SPL
369 select SPL_SYSCON if SPL
371 The Andes PLICSW block holds memory-mapped claim and pending
372 registers associated with software interrupt.
375 bool "Symmetric Multi-Processing"
376 depends on SBI_V01 || !RISCV_SMODE
378 This enables support for systems with more than one CPU. If
379 you say N here, U-Boot will run on single and multiprocessor
380 machines, but will use only one CPU of a multiprocessor
381 machine. If you say Y here, U-Boot will run on many, but not
382 all, single processor machines.
385 bool "Symmetric Multi-Processing in SPL"
386 depends on SPL && SPL_RISCV_MMODE
389 This enables support for systems with more than one CPU in SPL.
390 If you say N here, U-Boot SPL will run on single and multiprocessor
391 machines, but will use only one CPU of a multiprocessor
392 machine. If you say Y here, U-Boot SPL will run on many, but not
393 all, single processor machines.
396 int "Maximum number of CPUs (2-32)"
398 depends on SMP || SPL_SMP
401 On multiprocessor machines, U-Boot sets up a stack for each CPU.
402 Stack memory is pre-allocated. U-Boot must therefore know the
403 maximum number of CPUs that may be present.
407 default y if RISCV_SMODE || SPL_RISCV_SMODE
414 bool "SBI v0.1 support"
417 This config allows kernel to use SBI v0.1 APIs. This will be
418 deprecated in future once legacy M-mode software are no longer in use.
421 bool "SBI v0.2 or later support"
424 The SBI specification introduced the concept of extensions in version
425 v0.2. With this configuration option U-Boot can detect and use SBI
426 extensions. With the HSM extension introduced in SBI 0.2, only a
427 single hart needs to boot and enter the operating system. The booting
428 hart can bring up secondary harts one by one afterwards.
430 Choose this option if OpenSBI release v0.7 or above is used together
438 default y if RISCV_SMODE || SPL_RISCV_SMODE
444 XIP (eXecute In Place) is a method for executing code directly
445 from a NOR flash memory without copying the code to ram.
446 Say yes here if U-Boot boots from flash directly.
449 bool "Enable XIP mode for SPL"
451 If SPL starts in read-only memory (XIP for example) then we shouldn't
452 rely on lock variables (for example hart_lottery and available_harts_lock),
453 this affects only SPL, other stages should proceed as non-XIP.
455 config AVAILABLE_HARTS
456 bool "Send IPI by available harts"
459 By default, IPI sending mechanism will depend on available_harts.
460 If disable this, it will send IPI by CPUs node numbers of device tree.
464 bool "Show registers on unhandled exception"
466 By default only the program counter and the return address register
467 are shown in crash dumps. Enable this symbol to show all registers in
471 bool "In SPL show registers on unhandled exception"
474 By default only the program counter and the return address register
475 are shown in crash dumps. Enable this symbol to show all registers in
478 config RISCV_PRIV_1_9
479 bool "Use version 1.9 of the RISC-V priviledged specification"
481 Older versions of the RISC-V priviledged specification had
482 separate counter enable CSRs for each privilege mode. Writing
483 to the unified mcounteren CSR on a processor implementing the
484 old specification will result in an illegal instruction
485 exception. In addition to counter CSR changes, the way virtual
486 memory is configured was also changed.
488 config STACK_SIZE_SHIFT
489 int "Stack size shift"
492 config OF_BOARD_FIXUP
493 default y if OF_SEPARATE && RISCV_SMODE
495 menu "Use assembly optimized implementation of memory routines"
497 config USE_ARCH_MEMCPY
498 bool "Use an assembly optimized implementation of memcpy"
501 Enable the generation of an optimized version of memcpy.
502 Such an implementation may be faster under some conditions
503 but may increase the binary size.
505 config SPL_USE_ARCH_MEMCPY
506 bool "Use an assembly optimized implementation of memcpy for SPL"
507 default y if USE_ARCH_MEMCPY
510 Enable the generation of an optimized version of memcpy.
511 Such an implementation may be faster under some conditions
512 but may increase the binary size.
514 config TPL_USE_ARCH_MEMCPY
515 bool "Use an assembly optimized implementation of memcpy for TPL"
516 default y if USE_ARCH_MEMCPY
519 Enable the generation of an optimized version of memcpy.
520 Such an implementation may be faster under some conditions
521 but may increase the binary size.
523 config USE_ARCH_MEMMOVE
524 bool "Use an assembly optimized implementation of memmove"
527 Enable the generation of an optimized version of memmove.
528 Such an implementation may be faster under some conditions
529 but may increase the binary size.
531 config SPL_USE_ARCH_MEMMOVE
532 bool "Use an assembly optimized implementation of memmove for SPL"
533 default y if USE_ARCH_MEMCPY
536 Enable the generation of an optimized version of memmove.
537 Such an implementation may be faster under some conditions
538 but may increase the binary size.
540 config TPL_USE_ARCH_MEMMOVE
541 bool "Use an assembly optimized implementation of memmove for TPL"
542 default y if USE_ARCH_MEMCPY
545 Enable the generation of an optimized version of memmove.
546 Such an implementation may be faster under some conditions
547 but may increase the binary size.
549 config USE_ARCH_MEMSET
550 bool "Use an assembly optimized implementation of memset"
553 Enable the generation of an optimized version of memset.
554 Such an implementation may be faster under some conditions
555 but may increase the binary size.
557 config SPL_USE_ARCH_MEMSET
558 bool "Use an assembly optimized implementation of memset for SPL"
559 default y if USE_ARCH_MEMSET
562 Enable the generation of an optimized version of memset.
563 Such an implementation may be faster under some conditions
564 but may increase the binary size.
566 config TPL_USE_ARCH_MEMSET
567 bool "Use an assembly optimized implementation of memset for TPL"
568 default y if USE_ARCH_MEMSET
571 Enable the generation of an optimized version of memset.
572 Such an implementation may be faster under some conditions
573 but may increase the binary size.
577 config SPL_LOAD_FIT_OPENSBI_OS_BOOT
578 bool "Enable SPL (OpenSBI OS boot mode) applying linux from FIT"
579 depends on SPL_LOAD_FIT
581 Use fw_dynamic from the FIT image, and u-boot SPL will invoke it directly.
582 This is a shortcut boot flow, from u-boot SPL -> OpenSBI -> u-boot proper
583 -> linux to u-boot SPL -> OpenSBI -> linux.