1 menu "RISC-V architecture"
14 config TARGET_MICROCHIP_ICICLE
15 bool "Support Microchip PolarFire-SoC Icicle Board"
17 config TARGET_QEMU_VIRT
18 bool "Support QEMU Virt Board"
19 select BOARD_LATE_INIT
21 config TARGET_SIFIVE_UNLEASHED
22 bool "Support SiFive Unleashed Board"
24 config TARGET_SIFIVE_UNMATCHED
25 bool "Support SiFive Unmatched Board"
26 select SYS_CACHE_SHIFT_6
28 config TARGET_STARFIVE_VISIONFIVE2
29 bool "Support StarFive VisionFive2 Board"
30 select BOARD_LATE_INIT
32 config TARGET_TH1520_LPI4A
33 bool "Support Sipeed's TH1520 Lichee PI 4A Board"
34 select SYS_CACHE_SHIFT_6
36 config TARGET_SIPEED_MAIX
37 bool "Support Sipeed Maix Board"
38 select SYS_CACHE_SHIFT_6
40 config TARGET_OPENPITON_RISCV64
41 bool "Support RISC-V cores on OpenPiton SoC"
46 bool "Do not enable icache"
48 Do not enable instruction cache in U-Boot.
50 config SPL_SYS_ICACHE_OFF
51 bool "Do not enable icache in SPL"
53 default SYS_ICACHE_OFF
55 Do not enable instruction cache in SPL.
58 bool "Do not enable dcache"
60 Do not enable data cache in U-Boot.
62 config SPL_SYS_DCACHE_OFF
63 bool "Do not enable dcache in SPL"
65 default SYS_DCACHE_OFF
67 Do not enable data cache in SPL.
69 config SPL_ZERO_MEM_BEFORE_USE
70 bool "Zero memory before use"
74 Zero stack/GD/malloc area in SPL before using them, this is needed for
75 Sifive core devices that uses L2 cache to store SPL.
77 # board-specific options below
78 source "board/AndesTech/ae350/Kconfig"
79 source "board/emulation/qemu-riscv/Kconfig"
80 source "board/microchip/mpfs_icicle/Kconfig"
81 source "board/sifive/unleashed/Kconfig"
82 source "board/sifive/unmatched/Kconfig"
83 source "board/thead/th1520_lpi4a/Kconfig"
84 source "board/openpiton/riscv64/Kconfig"
85 source "board/sipeed/maix/Kconfig"
86 source "board/starfive/visionfive2/Kconfig"
88 # platform-specific options below
89 source "arch/riscv/cpu/andesv5/Kconfig"
90 source "arch/riscv/cpu/fu540/Kconfig"
91 source "arch/riscv/cpu/fu740/Kconfig"
92 source "arch/riscv/cpu/generic/Kconfig"
93 source "arch/riscv/cpu/jh7110/Kconfig"
95 # architecture-specific options below
105 Choose this option to target the RV32I base integer instruction set.
112 Choose this option to target the RV64I base integer instruction set.
118 default CMODEL_MEDLOW
121 bool "medium low code model"
123 U-Boot and its statically defined symbols must lie within a single 2 GiB
124 address range and must lie between absolute addresses -2 GiB and +2 GiB.
127 bool "medium any code model"
129 U-Boot and its statically defined symbols must be within any single 2 GiB
141 Choose this option to build U-Boot for RISC-V M-Mode.
146 Choose this option to build U-Boot for RISC-V S-Mode.
151 prompt "SPL Run Mode"
152 default SPL_RISCV_MMODE
155 config SPL_RISCV_MMODE
158 Choose this option to build U-Boot SPL for RISC-V M-Mode.
160 config SPL_RISCV_SMODE
163 Choose this option to build U-Boot SPL for RISC-V S-Mode.
168 bool "Emit compressed instructions"
171 Adds "C" to the ISA subsets that the toolchain is allowed to emit
172 when building U-Boot, which results in compressed instructions in the
176 bool "Standard extension for Single-Precision Floating Point"
179 Adds "F" to the ISA string passed to the compiler.
182 bool "Standard extension for Double-Precision Floating Point"
183 depends on RISCV_ISA_F
186 Adds "D" to the ISA string passed to the compiler and changes the
187 riscv32 ABI from ilp32 to ilp32d and the riscv64 ABI from lp64 to
199 config DMA_ADDR_T_64BIT
205 depends on RISCV_MMODE
209 The RISC-V ACLINT block holds memory-mapped control and status registers
210 associated with software and timer interrupts.
212 config SPL_RISCV_ACLINT
214 depends on SPL_RISCV_MMODE
218 The RISC-V ACLINT block holds memory-mapped control and status registers
219 associated with software and timer interrupts.
224 This enables the operations to configure SiFive cache
228 depends on RISCV_MMODE || SPL_RISCV_MMODE
231 select SPL_REGMAP if SPL
232 select SPL_SYSCON if SPL
234 The Andes PLICSW block holds memory-mapped claim and pending
235 registers associated with software interrupt.
238 bool "Symmetric Multi-Processing"
239 depends on SBI_V01 || !RISCV_SMODE
241 This enables support for systems with more than one CPU. If
242 you say N here, U-Boot will run on single and multiprocessor
243 machines, but will use only one CPU of a multiprocessor
244 machine. If you say Y here, U-Boot will run on many, but not
245 all, single processor machines.
248 bool "Symmetric Multi-Processing in SPL"
249 depends on SPL && SPL_RISCV_MMODE
252 This enables support for systems with more than one CPU in SPL.
253 If you say N here, U-Boot SPL will run on single and multiprocessor
254 machines, but will use only one CPU of a multiprocessor
255 machine. If you say Y here, U-Boot SPL will run on many, but not
256 all, single processor machines.
259 int "Maximum number of CPUs (2-32)"
261 depends on SMP || SPL_SMP
264 On multiprocessor machines, U-Boot sets up a stack for each CPU.
265 Stack memory is pre-allocated. U-Boot must therefore know the
266 maximum number of CPUs that may be present.
270 default y if RISCV_SMODE || SPL_RISCV_SMODE
277 bool "SBI v0.1 support"
280 This config allows kernel to use SBI v0.1 APIs. This will be
281 deprecated in future once legacy M-mode software are no longer in use.
284 bool "SBI v0.2 or later support"
287 The SBI specification introduced the concept of extensions in version
288 v0.2. With this configuration option U-Boot can detect and use SBI
289 extensions. With the HSM extension introduced in SBI 0.2, only a
290 single hart needs to boot and enter the operating system. The booting
291 hart can bring up secondary harts one by one afterwards.
293 Choose this option if OpenSBI release v0.7 or above is used together
301 default y if RISCV_SMODE || SPL_RISCV_SMODE
307 XIP (eXecute In Place) is a method for executing code directly
308 from a NOR flash memory without copying the code to ram.
309 Say yes here if U-Boot boots from flash directly.
312 bool "Enable XIP mode for SPL"
314 If SPL starts in read-only memory (XIP for example) then we shouldn't
315 rely on lock variables (for example hart_lottery and available_harts_lock),
316 this affects only SPL, other stages should proceed as non-XIP.
318 config AVAILABLE_HARTS
319 bool "Send IPI by available harts"
322 By default, IPI sending mechanism will depend on available_harts.
323 If disable this, it will send IPI by CPUs node numbers of device tree.
326 bool "Show registers on unhandled exception"
328 config RISCV_PRIV_1_9
329 bool "Use version 1.9 of the RISC-V priviledged specification"
331 Older versions of the RISC-V priviledged specification had
332 separate counter enable CSRs for each privilege mode. Writing
333 to the unified mcounteren CSR on a processor implementing the
334 old specification will result in an illegal instruction
335 exception. In addition to counter CSR changes, the way virtual
336 memory is configured was also changed.
338 config STACK_SIZE_SHIFT
342 config OF_BOARD_FIXUP
343 default y if OF_SEPARATE && RISCV_SMODE
345 menu "Use assembly optimized implementation of memory routines"
347 config USE_ARCH_MEMCPY
348 bool "Use an assembly optimized implementation of memcpy"
351 Enable the generation of an optimized version of memcpy.
352 Such an implementation may be faster under some conditions
353 but may increase the binary size.
355 config SPL_USE_ARCH_MEMCPY
356 bool "Use an assembly optimized implementation of memcpy for SPL"
357 default y if USE_ARCH_MEMCPY
360 Enable the generation of an optimized version of memcpy.
361 Such an implementation may be faster under some conditions
362 but may increase the binary size.
364 config TPL_USE_ARCH_MEMCPY
365 bool "Use an assembly optimized implementation of memcpy for TPL"
366 default y if USE_ARCH_MEMCPY
369 Enable the generation of an optimized version of memcpy.
370 Such an implementation may be faster under some conditions
371 but may increase the binary size.
373 config USE_ARCH_MEMMOVE
374 bool "Use an assembly optimized implementation of memmove"
377 Enable the generation of an optimized version of memmove.
378 Such an implementation may be faster under some conditions
379 but may increase the binary size.
381 config SPL_USE_ARCH_MEMMOVE
382 bool "Use an assembly optimized implementation of memmove for SPL"
383 default y if USE_ARCH_MEMCPY
386 Enable the generation of an optimized version of memmove.
387 Such an implementation may be faster under some conditions
388 but may increase the binary size.
390 config TPL_USE_ARCH_MEMMOVE
391 bool "Use an assembly optimized implementation of memmove for TPL"
392 default y if USE_ARCH_MEMCPY
395 Enable the generation of an optimized version of memmove.
396 Such an implementation may be faster under some conditions
397 but may increase the binary size.
399 config USE_ARCH_MEMSET
400 bool "Use an assembly optimized implementation of memset"
403 Enable the generation of an optimized version of memset.
404 Such an implementation may be faster under some conditions
405 but may increase the binary size.
407 config SPL_USE_ARCH_MEMSET
408 bool "Use an assembly optimized implementation of memset for SPL"
409 default y if USE_ARCH_MEMSET
412 Enable the generation of an optimized version of memset.
413 Such an implementation may be faster under some conditions
414 but may increase the binary size.
416 config TPL_USE_ARCH_MEMSET
417 bool "Use an assembly optimized implementation of memset for TPL"
418 default y if USE_ARCH_MEMSET
421 Enable the generation of an optimized version of memset.
422 Such an implementation may be faster under some conditions
423 but may increase the binary size.