blob: a8f770b57b0e614f5ddcef8eb03a36c7f60bf8dd [file] [log] [blame]
Bin Meng6b697752018-09-26 06:55:06 -07001menu "RISC-V architecture"
Rick Chen64d4ead2017-12-26 13:55:52 +08002 depends on RISCV
3
4config SYS_ARCH
5 default "riscv"
6
7choice
8 prompt "Target select"
9 optional
10
Randolph6c9c5ba2023-09-25 17:24:51 +080011config TARGET_ANDES_AE350
12 bool "Support Andes ae350"
Rick Chen64d4ead2017-12-26 13:55:52 +080013
Kongyang Liuad9c1432024-12-15 13:02:41 +080014config TARGET_BANANAPI_F3
15 bool "Support BananaPi F3 Board"
16
Thomas Bonnefillefcef2ad2024-11-12 15:57:38 +010017config TARGET_LICHEERV_NANO
18 bool "Support LicheeRV Nano Board"
19
Padmarao Begari4216f342019-05-28 15:47:51 +053020config TARGET_MICROCHIP_ICICLE
21 bool "Support Microchip PolarFire-SoC Icicle Board"
22
Kongyang Liub64fc0e2024-01-28 15:05:25 +080023config TARGET_MILKV_DUO
24 bool "Support Milk-v Duo Board"
25
Samuel Hollandbd6a54c2023-10-31 00:32:12 -050026config TARGET_OPENPITON_RISCV64
27 bool "Support RISC-V cores on OpenPiton SoC"
28
Bin Meng8a8694d2018-09-26 06:55:21 -070029config TARGET_QEMU_VIRT
LekKit94ff33a2024-09-22 13:11:02 +030030 bool "Support QEMU Virt & RVVM Boards"
Ɓukasz Stelmach1b100e52024-03-28 10:58:24 +010031 select BOARD_LATE_INIT
Bin Meng8a8694d2018-09-26 06:55:21 -070032
Bin Menge9ead4a2021-03-17 11:10:58 +080033config TARGET_SIFIVE_UNLEASHED
34 bool "Support SiFive Unleashed Board"
Anup Patel7a167f22019-02-25 08:15:19 +000035
Green Wan2e5da522021-05-27 06:52:13 -070036config TARGET_SIFIVE_UNMATCHED
37 bool "Support SiFive Unmatched Board"
Tom Rini3ef67ae2021-08-26 11:47:59 -040038 select SYS_CACHE_SHIFT_6
Green Wan2e5da522021-05-27 06:52:13 -070039
Samuel Hollandbd6a54c2023-10-31 00:32:12 -050040config TARGET_SIPEED_MAIX
41 bool "Support Sipeed Maix Board"
42 select SYS_CACHE_SHIFT_6
43
Yanhong Wang38678792023-03-29 11:42:20 +080044config TARGET_STARFIVE_VISIONFIVE2
45 bool "Support StarFive VisionFive2 Board"
Heinrich Schuchardt03a885b2023-09-07 13:21:28 +020046 select BOARD_LATE_INIT
Yanhong Wang38678792023-03-29 11:42:20 +080047
Yixun Lan5dfa9012023-07-08 19:24:32 +080048config TARGET_TH1520_LPI4A
49 bool "Support Sipeed's TH1520 Lichee PI 4A Board"
50 select SYS_CACHE_SHIFT_6
51
Michal Simek962c10a2023-11-06 12:56:47 +010052config TARGET_XILINX_MBV
53 bool "Support AMD/Xilinx MicroBlaze V"
54
Chia-Wei Wang1c7ed532024-09-10 17:39:16 +080055config TARGET_ASPEED_AST2700_IBEX
56 bool "Support Ibex RISC-V cores on Aspeed AST2700 SoC"
57
Rick Chen64d4ead2017-12-26 13:55:52 +080058endchoice
59
Trevor Woernerba64b8b2019-05-03 09:40:59 -040060config SYS_ICACHE_OFF
61 bool "Do not enable icache"
Trevor Woernerba64b8b2019-05-03 09:40:59 -040062 help
63 Do not enable instruction cache in U-Boot.
64
Trevor Woerner43ec7e02019-05-03 09:41:00 -040065config SPL_SYS_ICACHE_OFF
66 bool "Do not enable icache in SPL"
67 depends on SPL
68 default SYS_ICACHE_OFF
69 help
70 Do not enable instruction cache in SPL.
71
Trevor Woernerba64b8b2019-05-03 09:40:59 -040072config SYS_DCACHE_OFF
73 bool "Do not enable dcache"
Trevor Woernerba64b8b2019-05-03 09:40:59 -040074 help
75 Do not enable data cache in U-Boot.
76
Trevor Woerner43ec7e02019-05-03 09:41:00 -040077config SPL_SYS_DCACHE_OFF
78 bool "Do not enable dcache in SPL"
79 depends on SPL
80 default SYS_DCACHE_OFF
81 help
82 Do not enable data cache in SPL.
83
Shengyu Qud1a32542023-08-09 21:11:31 +080084config SPL_ZERO_MEM_BEFORE_USE
85 bool "Zero memory before use"
86 depends on SPL
Shengyu Qud1a32542023-08-09 21:11:31 +080087 help
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.
90
Rick Chen842d5802018-11-07 09:34:06 +080091# board-specific options below
Leo Yu-Chi Liang5d0bbea2024-05-14 17:50:11 +080092source "board/andestech/ae350/Kconfig"
Chia-Wei Wang1c7ed532024-09-10 17:39:16 +080093source "board/aspeed/ibex_ast2700/Kconfig"
Bin Meng8a8694d2018-09-26 06:55:21 -070094source "board/emulation/qemu-riscv/Kconfig"
Padmarao Begari4216f342019-05-28 15:47:51 +053095source "board/microchip/mpfs_icicle/Kconfig"
Samuel Hollandbd6a54c2023-10-31 00:32:12 -050096source "board/openpiton/riscv64/Kconfig"
Bin Menge9ead4a2021-03-17 11:10:58 +080097source "board/sifive/unleashed/Kconfig"
Green Wan2e5da522021-05-27 06:52:13 -070098source "board/sifive/unmatched/Kconfig"
Sean Andersonedc32ab2020-06-24 06:41:25 -040099source "board/sipeed/maix/Kconfig"
Kongyang Liub64fc0e2024-01-28 15:05:25 +0800100source "board/sophgo/milkv_duo/Kconfig"
Thomas Bonnefillefcef2ad2024-11-12 15:57:38 +0100101source "board/sophgo/licheerv_nano/Kconfig"
Kongyang Liuad9c1432024-12-15 13:02:41 +0800102source "board/spacemit/bananapi-f3/Kconfig"
Yanhong Wang38678792023-03-29 11:42:20 +0800103source "board/starfive/visionfive2/Kconfig"
Samuel Hollandbd6a54c2023-10-31 00:32:12 -0500104source "board/thead/th1520_lpi4a/Kconfig"
Michal Simek962c10a2023-11-06 12:56:47 +0100105source "board/xilinx/mbv/Kconfig"
Rick Chen64d4ead2017-12-26 13:55:52 +0800106
Rick Chen842d5802018-11-07 09:34:06 +0800107# platform-specific options below
Leo Yu-Chi Liang5d0bbea2024-05-14 17:50:11 +0800108source "arch/riscv/cpu/andes/Kconfig"
Kongyang Liuf7526742024-03-10 00:54:56 +0800109source "arch/riscv/cpu/cv1800b/Kconfig"
Pragnesh Patel25269c02020-05-29 11:33:34 +0530110source "arch/riscv/cpu/fu540/Kconfig"
Green Wan7f337432021-05-27 06:52:07 -0700111source "arch/riscv/cpu/fu740/Kconfig"
Chia-Wei Wang1c7ed532024-09-10 17:39:16 +0800112source "arch/riscv/cpu/ast2700/Kconfig"
Anup Patel1240cd62019-02-25 08:14:10 +0000113source "arch/riscv/cpu/generic/Kconfig"
Yanhong Wang38678792023-03-29 11:42:20 +0800114source "arch/riscv/cpu/jh7110/Kconfig"
Kongyang Liuad9c1432024-12-15 13:02:41 +0800115source "arch/riscv/cpu/k1/Kconfig"
Rick Chen842d5802018-11-07 09:34:06 +0800116
117# architecture-specific options below
118
Rick Chen64d4ead2017-12-26 13:55:52 +0800119choice
Lukas Auer54ebfe72018-11-22 11:26:12 +0100120 prompt "Base ISA"
121 default ARCH_RV32I
Rick Chen64d4ead2017-12-26 13:55:52 +0800122
Lukas Auer54ebfe72018-11-22 11:26:12 +0100123config ARCH_RV32I
124 bool "RV32I"
Rick Chen64d4ead2017-12-26 13:55:52 +0800125 select 32BIT
126 help
Lukas Auer54ebfe72018-11-22 11:26:12 +0100127 Choose this option to target the RV32I base integer instruction set.
Rick Chen64d4ead2017-12-26 13:55:52 +0800128
Lukas Auer54ebfe72018-11-22 11:26:12 +0100129config ARCH_RV64I
130 bool "RV64I"
Rick Chen64d4ead2017-12-26 13:55:52 +0800131 select 64BIT
Lukas Auer7ab1df02018-11-22 11:26:13 +0100132 select PHYS_64BIT
Rick Chen64d4ead2017-12-26 13:55:52 +0800133 help
Lukas Auer54ebfe72018-11-22 11:26:12 +0100134 Choose this option to target the RV64I base integer instruction set.
Rick Chen64d4ead2017-12-26 13:55:52 +0800135
136endchoice
137
Ben Dooks8a813c12023-09-05 13:12:53 +0100138config FRAMEPOINTER
139 bool "Build with frame pointer for stack unwinding"
140 help
141 Choose this option to use the frame pointer so the stack can be
142 unwound if needed. This is useful for tracing where faults came
143 from as the source may be several functions back
144
145 If you say Y here, then the code size will be increased due to
146 having to store the fp.
147
148config SPL_FRAMEPOINTER
149 bool "Build SPL with frame pointer for stack unwinding"
Heinrich Schuchardt512d41c2024-08-11 11:51:09 +0200150 depends on SPL
Ben Dooks8a813c12023-09-05 13:12:53 +0100151 help
152 Choose this option to use the frame pointer so the stack can be
153 unwound if needed. This is useful for tracing where faults came
154 from as the source may be several functions back
155
156 If you say Y here, then the code size will be increased due to
157 having to store the fp.
158
Lukas Auerecc5d832018-12-12 06:12:23 -0800159choice
160 prompt "Code Model"
161 default CMODEL_MEDLOW
162
163config CMODEL_MEDLOW
164 bool "medium low code model"
165 help
166 U-Boot and its statically defined symbols must lie within a single 2 GiB
167 address range and must lie between absolute addresses -2 GiB and +2 GiB.
168
169config CMODEL_MEDANY
170 bool "medium any code model"
171 help
172 U-Boot and its statically defined symbols must be within any single 2 GiB
173 address range.
174
175endchoice
176
Anup Patel27881772018-12-12 06:12:29 -0800177choice
178 prompt "Run Mode"
179 default RISCV_MMODE
180
181config RISCV_MMODE
182 bool "Machine"
183 help
184 Choose this option to build U-Boot for RISC-V M-Mode.
185
186config RISCV_SMODE
187 bool "Supervisor"
Heinrich Schuchardt20964b62023-09-23 01:35:26 +0200188 imply DEBUG_UART
Anup Patel27881772018-12-12 06:12:29 -0800189 help
190 Choose this option to build U-Boot for RISC-V S-Mode.
191
192endchoice
193
Lukas Auer61346592019-08-21 21:14:43 +0200194choice
195 prompt "SPL Run Mode"
196 default SPL_RISCV_MMODE
197 depends on SPL
198
199config SPL_RISCV_MMODE
200 bool "Machine"
201 help
202 Choose this option to build U-Boot SPL for RISC-V M-Mode.
203
204config SPL_RISCV_SMODE
205 bool "Supervisor"
206 help
207 Choose this option to build U-Boot SPL for RISC-V S-Mode.
208
209endchoice
210
Lukas Auer002012f2018-11-22 11:26:14 +0100211config RISCV_ISA_C
212 bool "Emit compressed instructions"
213 default y
214 help
215 Adds "C" to the ISA subsets that the toolchain is allowed to emit
216 when building U-Boot, which results in compressed instructions in the
217 U-Boot binary.
218
Heinrich Schuchardtc66c9502022-10-12 14:59:51 +0200219config RISCV_ISA_F
220 bool "Standard extension for Single-Precision Floating Point"
221 default y
222 help
223 Adds "F" to the ISA string passed to the compiler.
224
225config RISCV_ISA_D
226 bool "Standard extension for Double-Precision Floating Point"
227 depends on RISCV_ISA_F
228 default y
229 help
230 Adds "D" to the ISA string passed to the compiler and changes the
231 riscv32 ABI from ilp32 to ilp32d and the riscv64 ABI from lp64 to
232 lp64d.
233
Yu Chien Peter Lin60814cb2023-08-09 18:49:30 +0800234config RISCV_ISA_ZBB
235 bool "Zbb extension support for bit manipulation instructions"
236 help
237 Adds ZBB extension (basic bit manipulation) to the ISA subsets
238 that the toolchain is allowed to emit when building U-Boot.
239 The Zbb extension provides instructions to accelerate a number
240 of bit-specific operations (count bit population, sign extending,
241 bitrotation, etc) and enables optimized string routines.
242
243menu "Use assembly optimized implementation of string routines"
244
245config USE_ARCH_STRLEN
246 bool "Use an assembly optimized implementation of strlen"
247 default y
248 depends on RISCV_ISA_ZBB
249 help
250 Enable the generation of an optimized version of strlen using
251 Zbb extension.
252
253config SPL_USE_ARCH_STRLEN
254 bool "Use an assembly optimized implementation of strlen for SPL"
255 default y if USE_ARCH_STRLEN
256 depends on RISCV_ISA_ZBB
257 depends on SPL
258 help
259 Enable the generation of an optimized version of strlen using
260 Zbb extension.
261
262config TPL_USE_ARCH_STRLEN
263 bool "Use an assembly optimized implementation of strlen for TPL"
264 default y if USE_ARCH_STRLEN
265 depends on RISCV_ISA_ZBB
266 depends on TPL
267 help
268 Enable the generation of an optimized version of strlen using
269 Zbb extension.
270
271config USE_ARCH_STRCMP
272 bool "Use an assembly optimized implementation of strcmp"
273 default y
274 depends on RISCV_ISA_ZBB
275 help
276 Enable the generation of an optimized version of strcmp using
277 Zbb extension.
278
279config SPL_USE_ARCH_STRCMP
280 bool "Use an assembly optimized implementation of strcmp for SPL"
281 default y if USE_ARCH_STRCMP
282 depends on RISCV_ISA_ZBB
283 depends on SPL
284 help
285 Enable the generation of an optimized version of strcmp using
286 Zbb extension.
287
288config TPL_USE_ARCH_STRCMP
289 bool "Use an assembly optimized implementation of strcmp for TPL"
290 default y if USE_ARCH_STRCMP
291 depends on RISCV_ISA_ZBB
292 depends on TPL
293 help
294 Enable the generation of an optimized version of strcmp using
295 Zbb extension.
296
297config USE_ARCH_STRNCMP
298 bool "Use an assembly optimized implementation of strncmp"
299 default y
300 depends on RISCV_ISA_ZBB
301 help
302 Enable the generation of an optimized version of strncmp using
303 Zbb extension.
304
305config SPL_USE_ARCH_STRNCMP
306 bool "Use an assembly optimized implementation of strncmp for SPL"
307 default y if USE_ARCH_STRNCMP
308 depends on RISCV_ISA_ZBB
309 depends on SPL
310 help
311 Enable the generation of an optimized version of strncmp using
312 Zbb extension.
313
314config TPL_USE_ARCH_STRNCMP
315 bool "Use an assembly optimized implementation of strncmp for TPL"
316 default y if USE_ARCH_STRNCMP
317 depends on RISCV_ISA_ZBB
318 depends on TPL
319 help
320 Enable the generation of an optimized version of strncmp using
321 Zbb extension.
322
323endmenu
324
Lukas Auer002012f2018-11-22 11:26:14 +0100325config RISCV_ISA_A
Chia-Wei Wang6eda8742024-09-10 17:39:13 +0800326 bool "Standard extension for Atomic Instructions"
327 default y
328 help
329 Adds "A" to the ISA string passed to the compiler.
Lukas Auer002012f2018-11-22 11:26:14 +0100330
Mayuresh Chitalec3abcaa2024-08-23 09:41:26 +0000331config RISCV_ISA_ZICBOM
332 bool "Zicbom support"
333 depends on !SYS_DISABLE_DCACHE_OPS
334
Padmarao Begaria235d432021-01-15 08:20:35 +0530335config DMA_ADDR_T_64BIT
336 bool
337 default y if 64BIT
338
Bin Mengb5f03722023-06-21 23:11:46 +0800339config RISCV_ACLINT
Bin Mengb6ee5e12018-12-12 06:12:30 -0800340 bool
Bin Meng614b1d82021-05-11 20:04:12 +0800341 depends on RISCV_MMODE
Bin Meng08b8d262023-06-21 23:11:45 +0800342 select REGMAP
343 select SYSCON
Bin Meng614b1d82021-05-11 20:04:12 +0800344 help
Bin Mengb5f03722023-06-21 23:11:46 +0800345 The RISC-V ACLINT block holds memory-mapped control and status registers
Bin Meng614b1d82021-05-11 20:04:12 +0800346 associated with software and timer interrupts.
347
Bin Mengb5f03722023-06-21 23:11:46 +0800348config SPL_RISCV_ACLINT
Bin Meng614b1d82021-05-11 20:04:12 +0800349 bool
350 depends on SPL_RISCV_MMODE
Bin Meng08b8d262023-06-21 23:11:45 +0800351 select SPL_REGMAP
352 select SPL_SYSCON
Bin Mengb6ee5e12018-12-12 06:12:30 -0800353 help
Bin Mengb5f03722023-06-21 23:11:46 +0800354 The RISC-V ACLINT block holds memory-mapped control and status registers
Bin Mengb6ee5e12018-12-12 06:12:30 -0800355 associated with software and timer interrupts.
356
Zong Lic39544c2021-09-01 15:01:41 +0800357config SIFIVE_CACHE
358 bool
359 help
360 This enables the operations to configure SiFive cache
361
Yu Chien Peter Lin739cd6f2022-10-25 23:03:50 +0800362config ANDES_PLICSW
Rick Chen6df4ed02019-04-02 15:56:39 +0800363 bool
Lukas Auer61346592019-08-21 21:14:43 +0200364 depends on RISCV_MMODE || SPL_RISCV_MMODE
Rick Chen6df4ed02019-04-02 15:56:39 +0800365 select REGMAP
366 select SYSCON
Lukas Auer61346592019-08-21 21:14:43 +0200367 select SPL_REGMAP if SPL
368 select SPL_SYSCON if SPL
Rick Chen6df4ed02019-04-02 15:56:39 +0800369 help
Yu Chien Peter Lin739cd6f2022-10-25 23:03:50 +0800370 The Andes PLICSW block holds memory-mapped claim and pending
371 registers associated with software interrupt.
Rick Chen6df4ed02019-04-02 15:56:39 +0800372
Lukas Auer83d573d2019-03-17 19:28:32 +0100373config SMP
374 bool "Symmetric Multi-Processing"
Bin Meng49975222020-04-16 08:09:31 -0700375 depends on SBI_V01 || !RISCV_SMODE
Lukas Auer83d573d2019-03-17 19:28:32 +0100376 help
377 This enables support for systems with more than one CPU. If
378 you say N here, U-Boot will run on single and multiprocessor
379 machines, but will use only one CPU of a multiprocessor
380 machine. If you say Y here, U-Boot will run on many, but not
381 all, single processor machines.
382
Bin Mengb161f902020-04-16 08:09:30 -0700383config SPL_SMP
384 bool "Symmetric Multi-Processing in SPL"
385 depends on SPL && SPL_RISCV_MMODE
386 default y
387 help
388 This enables support for systems with more than one CPU in SPL.
389 If you say N here, U-Boot SPL will run on single and multiprocessor
390 machines, but will use only one CPU of a multiprocessor
391 machine. If you say Y here, U-Boot SPL will run on many, but not
392 all, single processor machines.
393
Lukas Auer83d573d2019-03-17 19:28:32 +0100394config NR_CPUS
395 int "Maximum number of CPUs (2-32)"
396 range 2 32
Bin Mengb161f902020-04-16 08:09:30 -0700397 depends on SMP || SPL_SMP
Lukas Auer83d573d2019-03-17 19:28:32 +0100398 default 8
399 help
400 On multiprocessor machines, U-Boot sets up a stack for each CPU.
401 Stack memory is pre-allocated. U-Boot must therefore know the
402 maximum number of CPUs that may be present.
403
Bin Mengee3bcd02020-03-09 19:35:28 -0700404config SBI
405 bool
406 default y if RISCV_SMODE || SPL_RISCV_SMODE
407
Bin Menga75325e2020-04-16 08:09:32 -0700408choice
409 prompt "SBI support"
Bin Meng3aecc4b2020-04-16 08:09:33 -0700410 default SBI_V02
Bin Menga75325e2020-04-16 08:09:32 -0700411
Bin Meng887d8092020-03-09 19:35:30 -0700412config SBI_V01
413 bool "SBI v0.1 support"
Bin Meng887d8092020-03-09 19:35:30 -0700414 depends on SBI
415 help
416 This config allows kernel to use SBI v0.1 APIs. This will be
417 deprecated in future once legacy M-mode software are no longer in use.
418
Bin Menga75325e2020-04-16 08:09:32 -0700419config SBI_V02
Heinrich Schuchardt693baee2022-11-08 15:53:12 +0100420 bool "SBI v0.2 or later support"
Bin Menga75325e2020-04-16 08:09:32 -0700421 depends on SBI
422 help
Heinrich Schuchardt693baee2022-11-08 15:53:12 +0100423 The SBI specification introduced the concept of extensions in version
424 v0.2. With this configuration option U-Boot can detect and use SBI
425 extensions. With the HSM extension introduced in SBI 0.2, only a
426 single hart needs to boot and enter the operating system. The booting
427 hart can bring up secondary harts one by one afterwards.
Bin Menga75325e2020-04-16 08:09:32 -0700428
Heinrich Schuchardt693baee2022-11-08 15:53:12 +0100429 Choose this option if OpenSBI release v0.7 or above is used together
Bin Menga75325e2020-04-16 08:09:32 -0700430 with U-Boot.
431
432endchoice
433
Lukas Auere79178b2019-03-17 19:28:34 +0100434config SBI_IPI
435 bool
Bin Mengee3bcd02020-03-09 19:35:28 -0700436 depends on SBI
Lukas Auer61346592019-08-21 21:14:43 +0200437 default y if RISCV_SMODE || SPL_RISCV_SMODE
Lukas Auere79178b2019-03-17 19:28:34 +0100438 depends on SMP
439
Rick Chene5e6c362019-04-30 13:49:33 +0800440config XIP
441 bool "XIP mode"
442 help
443 XIP (eXecute In Place) is a method for executing code directly
444 from a NOR flash memory without copying the code to ram.
445 Say yes here if U-Boot boots from flash directly.
446
Nikita Shubin7e5e0292022-09-02 11:47:39 +0300447config SPL_XIP
448 bool "Enable XIP mode for SPL"
449 help
450 If SPL starts in read-only memory (XIP for example) then we shouldn't
451 rely on lock variables (for example hart_lottery and available_harts_lock),
452 this affects only SPL, other stages should proceed as non-XIP.
453
Rick Chen9c4d5c12022-09-21 14:34:54 +0800454config AVAILABLE_HARTS
455 bool "Send IPI by available harts"
456 default y
457 help
458 By default, IPI sending mechanism will depend on available_harts.
459 If disable this, it will send IPI by CPUs node numbers of device tree.
460
Sean Andersone8b46a12019-12-25 00:27:44 -0500461config SHOW_REGS
Heinrich Schuchardt943e6be2024-08-11 13:01:04 +0200462 default y
Sean Andersone8b46a12019-12-25 00:27:44 -0500463 bool "Show registers on unhandled exception"
Heinrich Schuchardt99e92102024-08-11 13:01:03 +0200464 help
465 By default only the program counter and the return address register
466 are shown in crash dumps. Enable this symbol to show all registers in
467 main U-Boot.
468
469config SPL_SHOW_REGS
470 bool "In SPL show registers on unhandled exception"
471 depends on SPL
472 help
473 By default only the program counter and the return address register
474 are shown in crash dumps. Enable this symbol to show all registers in
475 SPL.
Sean Andersone8b46a12019-12-25 00:27:44 -0500476
Sean Anderson7f4b6662020-06-24 06:41:19 -0400477config RISCV_PRIV_1_9
478 bool "Use version 1.9 of the RISC-V priviledged specification"
479 help
480 Older versions of the RISC-V priviledged specification had
481 separate counter enable CSRs for each privilege mode. Writing
482 to the unified mcounteren CSR on a processor implementing the
483 old specification will result in an illegal instruction
484 exception. In addition to counter CSR changes, the way virtual
485 memory is configured was also changed.
486
Lukas Auera3596652019-03-17 19:28:37 +0100487config STACK_SIZE_SHIFT
Chia-Wei Wang20144dc2024-09-10 17:39:14 +0800488 int "Stack size shift"
Lukas Auer03813702019-10-20 20:53:47 +0200489 default 14
Lukas Auera3596652019-03-17 19:28:37 +0100490
Bin Meng2bdcd052020-06-25 18:16:08 -0700491config OF_BOARD_FIXUP
Sean Anderson584a5ee2020-09-05 09:22:11 -0400492 default y if OF_SEPARATE && RISCV_SMODE
Bin Meng2bdcd052020-06-25 18:16:08 -0700493
Bin Mengce64bd32021-05-13 16:46:18 +0800494menu "Use assembly optimized implementation of memory routines"
495
Heinrich Schuchardt23caf662021-03-27 12:37:04 +0100496config USE_ARCH_MEMCPY
497 bool "Use an assembly optimized implementation of memcpy"
498 default y
499 help
500 Enable the generation of an optimized version of memcpy.
501 Such an implementation may be faster under some conditions
502 but may increase the binary size.
503
504config SPL_USE_ARCH_MEMCPY
505 bool "Use an assembly optimized implementation of memcpy for SPL"
506 default y if USE_ARCH_MEMCPY
507 depends on SPL
508 help
509 Enable the generation of an optimized version of memcpy.
510 Such an implementation may be faster under some conditions
511 but may increase the binary size.
512
513config TPL_USE_ARCH_MEMCPY
514 bool "Use an assembly optimized implementation of memcpy for TPL"
515 default y if USE_ARCH_MEMCPY
516 depends on TPL
517 help
518 Enable the generation of an optimized version of memcpy.
519 Such an implementation may be faster under some conditions
520 but may increase the binary size.
521
522config USE_ARCH_MEMMOVE
523 bool "Use an assembly optimized implementation of memmove"
524 default y
525 help
526 Enable the generation of an optimized version of memmove.
527 Such an implementation may be faster under some conditions
528 but may increase the binary size.
529
530config SPL_USE_ARCH_MEMMOVE
531 bool "Use an assembly optimized implementation of memmove for SPL"
532 default y if USE_ARCH_MEMCPY
533 depends on SPL
534 help
535 Enable the generation of an optimized version of memmove.
536 Such an implementation may be faster under some conditions
537 but may increase the binary size.
538
539config TPL_USE_ARCH_MEMMOVE
540 bool "Use an assembly optimized implementation of memmove for TPL"
541 default y if USE_ARCH_MEMCPY
542 depends on TPL
543 help
544 Enable the generation of an optimized version of memmove.
545 Such an implementation may be faster under some conditions
546 but may increase the binary size.
547
548config USE_ARCH_MEMSET
549 bool "Use an assembly optimized implementation of memset"
550 default y
551 help
552 Enable the generation of an optimized version of memset.
553 Such an implementation may be faster under some conditions
554 but may increase the binary size.
555
556config SPL_USE_ARCH_MEMSET
557 bool "Use an assembly optimized implementation of memset for SPL"
558 default y if USE_ARCH_MEMSET
559 depends on SPL
560 help
561 Enable the generation of an optimized version of memset.
562 Such an implementation may be faster under some conditions
563 but may increase the binary size.
564
565config TPL_USE_ARCH_MEMSET
566 bool "Use an assembly optimized implementation of memset for TPL"
567 default y if USE_ARCH_MEMSET
568 depends on TPL
569 help
570 Enable the generation of an optimized version of memset.
571 Such an implementation may be faster under some conditions
572 but may increase the binary size.
573
Rick Chen64d4ead2017-12-26 13:55:52 +0800574endmenu
Bin Mengce64bd32021-05-13 16:46:18 +0800575
Randolphb1bc7a72023-10-12 14:35:04 +0800576config SPL_LOAD_FIT_OPENSBI_OS_BOOT
577 bool "Enable SPL (OpenSBI OS boot mode) applying linux from FIT"
578 depends on SPL_LOAD_FIT
579 help
580 Use fw_dynamic from the FIT image, and u-boot SPL will invoke it directly.
581 This is a shortcut boot flow, from u-boot SPL -> OpenSBI -> u-boot proper
582 -> linux to u-boot SPL -> OpenSBI -> linux.
583
Bin Mengce64bd32021-05-13 16:46:18 +0800584endmenu