blob: a160d24fb033eafeee70971a1bff12b545d23a2e [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
Andrew Goodbody5b5322c2024-12-16 18:07:35 +0000132 select SPL_64BIT if SPL
Lukas Auer7ab1df02018-11-22 11:26:13 +0100133 select PHYS_64BIT
Rick Chen64d4ead2017-12-26 13:55:52 +0800134 help
Lukas Auer54ebfe72018-11-22 11:26:12 +0100135 Choose this option to target the RV64I base integer instruction set.
Rick Chen64d4ead2017-12-26 13:55:52 +0800136
137endchoice
138
Ben Dooks8a813c12023-09-05 13:12:53 +0100139config FRAMEPOINTER
140 bool "Build with frame pointer for stack unwinding"
141 help
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
145
146 If you say Y here, then the code size will be increased due to
147 having to store the fp.
148
149config SPL_FRAMEPOINTER
150 bool "Build SPL with frame pointer for stack unwinding"
Heinrich Schuchardt512d41c2024-08-11 11:51:09 +0200151 depends on SPL
Ben Dooks8a813c12023-09-05 13:12:53 +0100152 help
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
156
157 If you say Y here, then the code size will be increased due to
158 having to store the fp.
159
Lukas Auerecc5d832018-12-12 06:12:23 -0800160choice
161 prompt "Code Model"
162 default CMODEL_MEDLOW
163
164config CMODEL_MEDLOW
165 bool "medium low code model"
166 help
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.
169
170config CMODEL_MEDANY
171 bool "medium any code model"
172 help
173 U-Boot and its statically defined symbols must be within any single 2 GiB
174 address range.
175
176endchoice
177
Anup Patel27881772018-12-12 06:12:29 -0800178choice
179 prompt "Run Mode"
180 default RISCV_MMODE
181
182config RISCV_MMODE
183 bool "Machine"
184 help
185 Choose this option to build U-Boot for RISC-V M-Mode.
186
187config RISCV_SMODE
188 bool "Supervisor"
Heinrich Schuchardt20964b62023-09-23 01:35:26 +0200189 imply DEBUG_UART
Anup Patel27881772018-12-12 06:12:29 -0800190 help
191 Choose this option to build U-Boot for RISC-V S-Mode.
192
193endchoice
194
Lukas Auer61346592019-08-21 21:14:43 +0200195choice
196 prompt "SPL Run Mode"
197 default SPL_RISCV_MMODE
198 depends on SPL
199
200config SPL_RISCV_MMODE
201 bool "Machine"
202 help
203 Choose this option to build U-Boot SPL for RISC-V M-Mode.
204
205config SPL_RISCV_SMODE
206 bool "Supervisor"
207 help
208 Choose this option to build U-Boot SPL for RISC-V S-Mode.
209
210endchoice
211
Lukas Auer002012f2018-11-22 11:26:14 +0100212config RISCV_ISA_C
213 bool "Emit compressed instructions"
214 default y
215 help
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
218 U-Boot binary.
219
Heinrich Schuchardtc66c9502022-10-12 14:59:51 +0200220config RISCV_ISA_F
221 bool "Standard extension for Single-Precision Floating Point"
222 default y
223 help
224 Adds "F" to the ISA string passed to the compiler.
225
226config RISCV_ISA_D
227 bool "Standard extension for Double-Precision Floating Point"
228 depends on RISCV_ISA_F
229 default y
230 help
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
233 lp64d.
234
Yu Chien Peter Lin60814cb2023-08-09 18:49:30 +0800235config RISCV_ISA_ZBB
236 bool "Zbb extension support for bit manipulation instructions"
237 help
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.
243
244menu "Use assembly optimized implementation of string routines"
245
246config USE_ARCH_STRLEN
247 bool "Use an assembly optimized implementation of strlen"
248 default y
249 depends on RISCV_ISA_ZBB
250 help
251 Enable the generation of an optimized version of strlen using
252 Zbb extension.
253
254config 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
258 depends on SPL
259 help
260 Enable the generation of an optimized version of strlen using
261 Zbb extension.
262
263config 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
267 depends on TPL
268 help
269 Enable the generation of an optimized version of strlen using
270 Zbb extension.
271
272config USE_ARCH_STRCMP
273 bool "Use an assembly optimized implementation of strcmp"
274 default y
275 depends on RISCV_ISA_ZBB
276 help
277 Enable the generation of an optimized version of strcmp using
278 Zbb extension.
279
280config 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
284 depends on SPL
285 help
286 Enable the generation of an optimized version of strcmp using
287 Zbb extension.
288
289config 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
293 depends on TPL
294 help
295 Enable the generation of an optimized version of strcmp using
296 Zbb extension.
297
298config USE_ARCH_STRNCMP
299 bool "Use an assembly optimized implementation of strncmp"
300 default y
301 depends on RISCV_ISA_ZBB
302 help
303 Enable the generation of an optimized version of strncmp using
304 Zbb extension.
305
306config 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
310 depends on SPL
311 help
312 Enable the generation of an optimized version of strncmp using
313 Zbb extension.
314
315config 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
319 depends on TPL
320 help
321 Enable the generation of an optimized version of strncmp using
322 Zbb extension.
323
324endmenu
325
Lukas Auer002012f2018-11-22 11:26:14 +0100326config RISCV_ISA_A
Chia-Wei Wang6eda8742024-09-10 17:39:13 +0800327 bool "Standard extension for Atomic Instructions"
328 default y
329 help
330 Adds "A" to the ISA string passed to the compiler.
Lukas Auer002012f2018-11-22 11:26:14 +0100331
Mayuresh Chitalec3abcaa2024-08-23 09:41:26 +0000332config RISCV_ISA_ZICBOM
333 bool "Zicbom support"
334 depends on !SYS_DISABLE_DCACHE_OPS
335
Padmarao Begaria235d432021-01-15 08:20:35 +0530336config DMA_ADDR_T_64BIT
337 bool
338 default y if 64BIT
339
Bin Mengb5f03722023-06-21 23:11:46 +0800340config RISCV_ACLINT
Bin Mengb6ee5e12018-12-12 06:12:30 -0800341 bool
Bin Meng614b1d82021-05-11 20:04:12 +0800342 depends on RISCV_MMODE
Bin Meng08b8d262023-06-21 23:11:45 +0800343 select REGMAP
344 select SYSCON
Bin Meng614b1d82021-05-11 20:04:12 +0800345 help
Bin Mengb5f03722023-06-21 23:11:46 +0800346 The RISC-V ACLINT block holds memory-mapped control and status registers
Bin Meng614b1d82021-05-11 20:04:12 +0800347 associated with software and timer interrupts.
348
Bin Mengb5f03722023-06-21 23:11:46 +0800349config SPL_RISCV_ACLINT
Bin Meng614b1d82021-05-11 20:04:12 +0800350 bool
351 depends on SPL_RISCV_MMODE
Bin Meng08b8d262023-06-21 23:11:45 +0800352 select SPL_REGMAP
353 select SPL_SYSCON
Bin Mengb6ee5e12018-12-12 06:12:30 -0800354 help
Bin Mengb5f03722023-06-21 23:11:46 +0800355 The RISC-V ACLINT block holds memory-mapped control and status registers
Bin Mengb6ee5e12018-12-12 06:12:30 -0800356 associated with software and timer interrupts.
357
Zong Lic39544c2021-09-01 15:01:41 +0800358config SIFIVE_CACHE
359 bool
360 help
361 This enables the operations to configure SiFive cache
362
Yu Chien Peter Lin739cd6f2022-10-25 23:03:50 +0800363config ANDES_PLICSW
Rick Chen6df4ed02019-04-02 15:56:39 +0800364 bool
Lukas Auer61346592019-08-21 21:14:43 +0200365 depends on RISCV_MMODE || SPL_RISCV_MMODE
Rick Chen6df4ed02019-04-02 15:56:39 +0800366 select REGMAP
367 select SYSCON
Lukas Auer61346592019-08-21 21:14:43 +0200368 select SPL_REGMAP if SPL
369 select SPL_SYSCON if SPL
Rick Chen6df4ed02019-04-02 15:56:39 +0800370 help
Yu Chien Peter Lin739cd6f2022-10-25 23:03:50 +0800371 The Andes PLICSW block holds memory-mapped claim and pending
372 registers associated with software interrupt.
Rick Chen6df4ed02019-04-02 15:56:39 +0800373
Lukas Auer83d573d2019-03-17 19:28:32 +0100374config SMP
375 bool "Symmetric Multi-Processing"
Bin Meng49975222020-04-16 08:09:31 -0700376 depends on SBI_V01 || !RISCV_SMODE
Lukas Auer83d573d2019-03-17 19:28:32 +0100377 help
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.
383
Bin Mengb161f902020-04-16 08:09:30 -0700384config SPL_SMP
385 bool "Symmetric Multi-Processing in SPL"
386 depends on SPL && SPL_RISCV_MMODE
387 default y
388 help
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.
394
Lukas Auer83d573d2019-03-17 19:28:32 +0100395config NR_CPUS
396 int "Maximum number of CPUs (2-32)"
397 range 2 32
Bin Mengb161f902020-04-16 08:09:30 -0700398 depends on SMP || SPL_SMP
Lukas Auer83d573d2019-03-17 19:28:32 +0100399 default 8
400 help
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.
404
Bin Mengee3bcd02020-03-09 19:35:28 -0700405config SBI
406 bool
407 default y if RISCV_SMODE || SPL_RISCV_SMODE
408
Bin Menga75325e2020-04-16 08:09:32 -0700409choice
410 prompt "SBI support"
Bin Meng3aecc4b2020-04-16 08:09:33 -0700411 default SBI_V02
Bin Menga75325e2020-04-16 08:09:32 -0700412
Bin Meng887d8092020-03-09 19:35:30 -0700413config SBI_V01
414 bool "SBI v0.1 support"
Bin Meng887d8092020-03-09 19:35:30 -0700415 depends on SBI
416 help
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.
419
Bin Menga75325e2020-04-16 08:09:32 -0700420config SBI_V02
Heinrich Schuchardt693baee2022-11-08 15:53:12 +0100421 bool "SBI v0.2 or later support"
Bin Menga75325e2020-04-16 08:09:32 -0700422 depends on SBI
423 help
Heinrich Schuchardt693baee2022-11-08 15:53:12 +0100424 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.
Bin Menga75325e2020-04-16 08:09:32 -0700429
Heinrich Schuchardt693baee2022-11-08 15:53:12 +0100430 Choose this option if OpenSBI release v0.7 or above is used together
Bin Menga75325e2020-04-16 08:09:32 -0700431 with U-Boot.
432
433endchoice
434
Lukas Auere79178b2019-03-17 19:28:34 +0100435config SBI_IPI
436 bool
Bin Mengee3bcd02020-03-09 19:35:28 -0700437 depends on SBI
Lukas Auer61346592019-08-21 21:14:43 +0200438 default y if RISCV_SMODE || SPL_RISCV_SMODE
Lukas Auere79178b2019-03-17 19:28:34 +0100439 depends on SMP
440
Rick Chene5e6c362019-04-30 13:49:33 +0800441config XIP
442 bool "XIP mode"
443 help
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.
447
Nikita Shubin7e5e0292022-09-02 11:47:39 +0300448config SPL_XIP
449 bool "Enable XIP mode for SPL"
450 help
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.
454
Rick Chen9c4d5c12022-09-21 14:34:54 +0800455config AVAILABLE_HARTS
456 bool "Send IPI by available harts"
457 default y
458 help
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.
461
Sean Andersone8b46a12019-12-25 00:27:44 -0500462config SHOW_REGS
Heinrich Schuchardt943e6be2024-08-11 13:01:04 +0200463 default y
Sean Andersone8b46a12019-12-25 00:27:44 -0500464 bool "Show registers on unhandled exception"
Heinrich Schuchardt99e92102024-08-11 13:01:03 +0200465 help
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
468 main U-Boot.
469
470config SPL_SHOW_REGS
471 bool "In SPL show registers on unhandled exception"
472 depends on SPL
473 help
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
476 SPL.
Sean Andersone8b46a12019-12-25 00:27:44 -0500477
Sean Anderson7f4b6662020-06-24 06:41:19 -0400478config RISCV_PRIV_1_9
479 bool "Use version 1.9 of the RISC-V priviledged specification"
480 help
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.
487
Lukas Auera3596652019-03-17 19:28:37 +0100488config STACK_SIZE_SHIFT
Chia-Wei Wang20144dc2024-09-10 17:39:14 +0800489 int "Stack size shift"
Lukas Auer03813702019-10-20 20:53:47 +0200490 default 14
Lukas Auera3596652019-03-17 19:28:37 +0100491
Bin Meng2bdcd052020-06-25 18:16:08 -0700492config OF_BOARD_FIXUP
Sean Anderson584a5ee2020-09-05 09:22:11 -0400493 default y if OF_SEPARATE && RISCV_SMODE
Bin Meng2bdcd052020-06-25 18:16:08 -0700494
Bin Mengce64bd32021-05-13 16:46:18 +0800495menu "Use assembly optimized implementation of memory routines"
496
Heinrich Schuchardt23caf662021-03-27 12:37:04 +0100497config USE_ARCH_MEMCPY
498 bool "Use an assembly optimized implementation of memcpy"
499 default y
500 help
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.
504
505config SPL_USE_ARCH_MEMCPY
506 bool "Use an assembly optimized implementation of memcpy for SPL"
507 default y if USE_ARCH_MEMCPY
508 depends on SPL
509 help
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.
513
514config TPL_USE_ARCH_MEMCPY
515 bool "Use an assembly optimized implementation of memcpy for TPL"
516 default y if USE_ARCH_MEMCPY
517 depends on TPL
518 help
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.
522
523config USE_ARCH_MEMMOVE
524 bool "Use an assembly optimized implementation of memmove"
525 default y
526 help
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.
530
531config SPL_USE_ARCH_MEMMOVE
532 bool "Use an assembly optimized implementation of memmove for SPL"
533 default y if USE_ARCH_MEMCPY
534 depends on SPL
535 help
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.
539
540config TPL_USE_ARCH_MEMMOVE
541 bool "Use an assembly optimized implementation of memmove for TPL"
542 default y if USE_ARCH_MEMCPY
543 depends on TPL
544 help
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.
548
549config USE_ARCH_MEMSET
550 bool "Use an assembly optimized implementation of memset"
551 default y
552 help
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.
556
557config SPL_USE_ARCH_MEMSET
558 bool "Use an assembly optimized implementation of memset for SPL"
559 default y if USE_ARCH_MEMSET
560 depends on SPL
561 help
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.
565
566config TPL_USE_ARCH_MEMSET
567 bool "Use an assembly optimized implementation of memset for TPL"
568 default y if USE_ARCH_MEMSET
569 depends on TPL
570 help
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.
574
Rick Chen64d4ead2017-12-26 13:55:52 +0800575endmenu
Bin Mengce64bd32021-05-13 16:46:18 +0800576
Randolphb1bc7a72023-10-12 14:35:04 +0800577config SPL_LOAD_FIT_OPENSBI_OS_BOOT
578 bool "Enable SPL (OpenSBI OS boot mode) applying linux from FIT"
579 depends on SPL_LOAD_FIT
580 help
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.
584
Bin Mengce64bd32021-05-13 16:46:18 +0800585endmenu