Bin Meng | 6b69775 | 2018-09-26 06:55:06 -0700 | [diff] [blame] | 1 | menu "RISC-V architecture" |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 2 | depends on RISCV |
| 3 | |
| 4 | config SYS_ARCH |
| 5 | default "riscv" |
| 6 | |
| 7 | choice |
| 8 | prompt "Target select" |
| 9 | optional |
| 10 | |
Randolph | 6c9c5ba | 2023-09-25 17:24:51 +0800 | [diff] [blame] | 11 | config TARGET_ANDES_AE350 |
| 12 | bool "Support Andes ae350" |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 13 | |
Kongyang Liu | ad9c143 | 2024-12-15 13:02:41 +0800 | [diff] [blame^] | 14 | config TARGET_BANANAPI_F3 |
| 15 | bool "Support BananaPi F3 Board" |
| 16 | |
Thomas Bonnefille | fcef2ad | 2024-11-12 15:57:38 +0100 | [diff] [blame] | 17 | config TARGET_LICHEERV_NANO |
| 18 | bool "Support LicheeRV Nano Board" |
| 19 | |
Padmarao Begari | 4216f34 | 2019-05-28 15:47:51 +0530 | [diff] [blame] | 20 | config TARGET_MICROCHIP_ICICLE |
| 21 | bool "Support Microchip PolarFire-SoC Icicle Board" |
| 22 | |
Kongyang Liu | b64fc0e | 2024-01-28 15:05:25 +0800 | [diff] [blame] | 23 | config TARGET_MILKV_DUO |
| 24 | bool "Support Milk-v Duo Board" |
| 25 | |
Samuel Holland | bd6a54c | 2023-10-31 00:32:12 -0500 | [diff] [blame] | 26 | config TARGET_OPENPITON_RISCV64 |
| 27 | bool "Support RISC-V cores on OpenPiton SoC" |
| 28 | |
Bin Meng | 8a8694d | 2018-09-26 06:55:21 -0700 | [diff] [blame] | 29 | config TARGET_QEMU_VIRT |
LekKit | 94ff33a | 2024-09-22 13:11:02 +0300 | [diff] [blame] | 30 | bool "Support QEMU Virt & RVVM Boards" |
Ćukasz Stelmach | 1b100e5 | 2024-03-28 10:58:24 +0100 | [diff] [blame] | 31 | select BOARD_LATE_INIT |
Bin Meng | 8a8694d | 2018-09-26 06:55:21 -0700 | [diff] [blame] | 32 | |
Bin Meng | e9ead4a | 2021-03-17 11:10:58 +0800 | [diff] [blame] | 33 | config TARGET_SIFIVE_UNLEASHED |
| 34 | bool "Support SiFive Unleashed Board" |
Anup Patel | 7a167f2 | 2019-02-25 08:15:19 +0000 | [diff] [blame] | 35 | |
Green Wan | 2e5da52 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 36 | config TARGET_SIFIVE_UNMATCHED |
| 37 | bool "Support SiFive Unmatched Board" |
Tom Rini | 3ef67ae | 2021-08-26 11:47:59 -0400 | [diff] [blame] | 38 | select SYS_CACHE_SHIFT_6 |
Green Wan | 2e5da52 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 39 | |
Samuel Holland | bd6a54c | 2023-10-31 00:32:12 -0500 | [diff] [blame] | 40 | config TARGET_SIPEED_MAIX |
| 41 | bool "Support Sipeed Maix Board" |
| 42 | select SYS_CACHE_SHIFT_6 |
| 43 | |
Yanhong Wang | 3867879 | 2023-03-29 11:42:20 +0800 | [diff] [blame] | 44 | config TARGET_STARFIVE_VISIONFIVE2 |
| 45 | bool "Support StarFive VisionFive2 Board" |
Heinrich Schuchardt | 03a885b | 2023-09-07 13:21:28 +0200 | [diff] [blame] | 46 | select BOARD_LATE_INIT |
Yanhong Wang | 3867879 | 2023-03-29 11:42:20 +0800 | [diff] [blame] | 47 | |
Yixun Lan | 5dfa901 | 2023-07-08 19:24:32 +0800 | [diff] [blame] | 48 | config TARGET_TH1520_LPI4A |
| 49 | bool "Support Sipeed's TH1520 Lichee PI 4A Board" |
| 50 | select SYS_CACHE_SHIFT_6 |
| 51 | |
Michal Simek | 962c10a | 2023-11-06 12:56:47 +0100 | [diff] [blame] | 52 | config TARGET_XILINX_MBV |
| 53 | bool "Support AMD/Xilinx MicroBlaze V" |
| 54 | |
Chia-Wei Wang | 1c7ed53 | 2024-09-10 17:39:16 +0800 | [diff] [blame] | 55 | config TARGET_ASPEED_AST2700_IBEX |
| 56 | bool "Support Ibex RISC-V cores on Aspeed AST2700 SoC" |
| 57 | |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 58 | endchoice |
| 59 | |
Trevor Woerner | ba64b8b | 2019-05-03 09:40:59 -0400 | [diff] [blame] | 60 | config SYS_ICACHE_OFF |
| 61 | bool "Do not enable icache" |
Trevor Woerner | ba64b8b | 2019-05-03 09:40:59 -0400 | [diff] [blame] | 62 | help |
| 63 | Do not enable instruction cache in U-Boot. |
| 64 | |
Trevor Woerner | 43ec7e0 | 2019-05-03 09:41:00 -0400 | [diff] [blame] | 65 | config 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 Woerner | ba64b8b | 2019-05-03 09:40:59 -0400 | [diff] [blame] | 72 | config SYS_DCACHE_OFF |
| 73 | bool "Do not enable dcache" |
Trevor Woerner | ba64b8b | 2019-05-03 09:40:59 -0400 | [diff] [blame] | 74 | help |
| 75 | Do not enable data cache in U-Boot. |
| 76 | |
Trevor Woerner | 43ec7e0 | 2019-05-03 09:41:00 -0400 | [diff] [blame] | 77 | config 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 Qu | d1a3254 | 2023-08-09 21:11:31 +0800 | [diff] [blame] | 84 | config SPL_ZERO_MEM_BEFORE_USE |
| 85 | bool "Zero memory before use" |
| 86 | depends on SPL |
Shengyu Qu | d1a3254 | 2023-08-09 21:11:31 +0800 | [diff] [blame] | 87 | 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 Chen | 842d580 | 2018-11-07 09:34:06 +0800 | [diff] [blame] | 91 | # board-specific options below |
Leo Yu-Chi Liang | 5d0bbea | 2024-05-14 17:50:11 +0800 | [diff] [blame] | 92 | source "board/andestech/ae350/Kconfig" |
Chia-Wei Wang | 1c7ed53 | 2024-09-10 17:39:16 +0800 | [diff] [blame] | 93 | source "board/aspeed/ibex_ast2700/Kconfig" |
Bin Meng | 8a8694d | 2018-09-26 06:55:21 -0700 | [diff] [blame] | 94 | source "board/emulation/qemu-riscv/Kconfig" |
Padmarao Begari | 4216f34 | 2019-05-28 15:47:51 +0530 | [diff] [blame] | 95 | source "board/microchip/mpfs_icicle/Kconfig" |
Samuel Holland | bd6a54c | 2023-10-31 00:32:12 -0500 | [diff] [blame] | 96 | source "board/openpiton/riscv64/Kconfig" |
Bin Meng | e9ead4a | 2021-03-17 11:10:58 +0800 | [diff] [blame] | 97 | source "board/sifive/unleashed/Kconfig" |
Green Wan | 2e5da52 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 98 | source "board/sifive/unmatched/Kconfig" |
Sean Anderson | edc32ab | 2020-06-24 06:41:25 -0400 | [diff] [blame] | 99 | source "board/sipeed/maix/Kconfig" |
Kongyang Liu | b64fc0e | 2024-01-28 15:05:25 +0800 | [diff] [blame] | 100 | source "board/sophgo/milkv_duo/Kconfig" |
Thomas Bonnefille | fcef2ad | 2024-11-12 15:57:38 +0100 | [diff] [blame] | 101 | source "board/sophgo/licheerv_nano/Kconfig" |
Kongyang Liu | ad9c143 | 2024-12-15 13:02:41 +0800 | [diff] [blame^] | 102 | source "board/spacemit/bananapi-f3/Kconfig" |
Yanhong Wang | 3867879 | 2023-03-29 11:42:20 +0800 | [diff] [blame] | 103 | source "board/starfive/visionfive2/Kconfig" |
Samuel Holland | bd6a54c | 2023-10-31 00:32:12 -0500 | [diff] [blame] | 104 | source "board/thead/th1520_lpi4a/Kconfig" |
Michal Simek | 962c10a | 2023-11-06 12:56:47 +0100 | [diff] [blame] | 105 | source "board/xilinx/mbv/Kconfig" |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 106 | |
Rick Chen | 842d580 | 2018-11-07 09:34:06 +0800 | [diff] [blame] | 107 | # platform-specific options below |
Leo Yu-Chi Liang | 5d0bbea | 2024-05-14 17:50:11 +0800 | [diff] [blame] | 108 | source "arch/riscv/cpu/andes/Kconfig" |
Kongyang Liu | f752674 | 2024-03-10 00:54:56 +0800 | [diff] [blame] | 109 | source "arch/riscv/cpu/cv1800b/Kconfig" |
Pragnesh Patel | 25269c0 | 2020-05-29 11:33:34 +0530 | [diff] [blame] | 110 | source "arch/riscv/cpu/fu540/Kconfig" |
Green Wan | 7f33743 | 2021-05-27 06:52:07 -0700 | [diff] [blame] | 111 | source "arch/riscv/cpu/fu740/Kconfig" |
Chia-Wei Wang | 1c7ed53 | 2024-09-10 17:39:16 +0800 | [diff] [blame] | 112 | source "arch/riscv/cpu/ast2700/Kconfig" |
Anup Patel | 1240cd6 | 2019-02-25 08:14:10 +0000 | [diff] [blame] | 113 | source "arch/riscv/cpu/generic/Kconfig" |
Yanhong Wang | 3867879 | 2023-03-29 11:42:20 +0800 | [diff] [blame] | 114 | source "arch/riscv/cpu/jh7110/Kconfig" |
Kongyang Liu | ad9c143 | 2024-12-15 13:02:41 +0800 | [diff] [blame^] | 115 | source "arch/riscv/cpu/k1/Kconfig" |
Rick Chen | 842d580 | 2018-11-07 09:34:06 +0800 | [diff] [blame] | 116 | |
| 117 | # architecture-specific options below |
| 118 | |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 119 | choice |
Lukas Auer | 54ebfe7 | 2018-11-22 11:26:12 +0100 | [diff] [blame] | 120 | prompt "Base ISA" |
| 121 | default ARCH_RV32I |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 122 | |
Lukas Auer | 54ebfe7 | 2018-11-22 11:26:12 +0100 | [diff] [blame] | 123 | config ARCH_RV32I |
| 124 | bool "RV32I" |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 125 | select 32BIT |
| 126 | help |
Lukas Auer | 54ebfe7 | 2018-11-22 11:26:12 +0100 | [diff] [blame] | 127 | Choose this option to target the RV32I base integer instruction set. |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 128 | |
Lukas Auer | 54ebfe7 | 2018-11-22 11:26:12 +0100 | [diff] [blame] | 129 | config ARCH_RV64I |
| 130 | bool "RV64I" |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 131 | select 64BIT |
Lukas Auer | 7ab1df0 | 2018-11-22 11:26:13 +0100 | [diff] [blame] | 132 | select PHYS_64BIT |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 133 | help |
Lukas Auer | 54ebfe7 | 2018-11-22 11:26:12 +0100 | [diff] [blame] | 134 | Choose this option to target the RV64I base integer instruction set. |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 135 | |
| 136 | endchoice |
| 137 | |
Ben Dooks | 8a813c1 | 2023-09-05 13:12:53 +0100 | [diff] [blame] | 138 | config 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 | |
| 148 | config SPL_FRAMEPOINTER |
| 149 | bool "Build SPL with frame pointer for stack unwinding" |
Heinrich Schuchardt | 512d41c | 2024-08-11 11:51:09 +0200 | [diff] [blame] | 150 | depends on SPL |
Ben Dooks | 8a813c1 | 2023-09-05 13:12:53 +0100 | [diff] [blame] | 151 | 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 Auer | ecc5d83 | 2018-12-12 06:12:23 -0800 | [diff] [blame] | 159 | choice |
| 160 | prompt "Code Model" |
| 161 | default CMODEL_MEDLOW |
| 162 | |
| 163 | config 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 | |
| 169 | config 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 | |
| 175 | endchoice |
| 176 | |
Anup Patel | 2788177 | 2018-12-12 06:12:29 -0800 | [diff] [blame] | 177 | choice |
| 178 | prompt "Run Mode" |
| 179 | default RISCV_MMODE |
| 180 | |
| 181 | config RISCV_MMODE |
| 182 | bool "Machine" |
| 183 | help |
| 184 | Choose this option to build U-Boot for RISC-V M-Mode. |
| 185 | |
| 186 | config RISCV_SMODE |
| 187 | bool "Supervisor" |
Heinrich Schuchardt | 20964b6 | 2023-09-23 01:35:26 +0200 | [diff] [blame] | 188 | imply DEBUG_UART |
Anup Patel | 2788177 | 2018-12-12 06:12:29 -0800 | [diff] [blame] | 189 | help |
| 190 | Choose this option to build U-Boot for RISC-V S-Mode. |
| 191 | |
| 192 | endchoice |
| 193 | |
Lukas Auer | 6134659 | 2019-08-21 21:14:43 +0200 | [diff] [blame] | 194 | choice |
| 195 | prompt "SPL Run Mode" |
| 196 | default SPL_RISCV_MMODE |
| 197 | depends on SPL |
| 198 | |
| 199 | config SPL_RISCV_MMODE |
| 200 | bool "Machine" |
| 201 | help |
| 202 | Choose this option to build U-Boot SPL for RISC-V M-Mode. |
| 203 | |
| 204 | config SPL_RISCV_SMODE |
| 205 | bool "Supervisor" |
| 206 | help |
| 207 | Choose this option to build U-Boot SPL for RISC-V S-Mode. |
| 208 | |
| 209 | endchoice |
| 210 | |
Lukas Auer | 002012f | 2018-11-22 11:26:14 +0100 | [diff] [blame] | 211 | config 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 Schuchardt | c66c950 | 2022-10-12 14:59:51 +0200 | [diff] [blame] | 219 | config 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 | |
| 225 | config 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 Lin | 60814cb | 2023-08-09 18:49:30 +0800 | [diff] [blame] | 234 | config 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 | |
| 243 | menu "Use assembly optimized implementation of string routines" |
| 244 | |
| 245 | config 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 | |
| 253 | config 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 | |
| 262 | config 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 | |
| 271 | config 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 | |
| 279 | config 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 | |
| 288 | config 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 | |
| 297 | config 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 | |
| 305 | config 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 | |
| 314 | config 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 | |
| 323 | endmenu |
| 324 | |
Lukas Auer | 002012f | 2018-11-22 11:26:14 +0100 | [diff] [blame] | 325 | config RISCV_ISA_A |
Chia-Wei Wang | 6eda874 | 2024-09-10 17:39:13 +0800 | [diff] [blame] | 326 | bool "Standard extension for Atomic Instructions" |
| 327 | default y |
| 328 | help |
| 329 | Adds "A" to the ISA string passed to the compiler. |
Lukas Auer | 002012f | 2018-11-22 11:26:14 +0100 | [diff] [blame] | 330 | |
Mayuresh Chitale | c3abcaa | 2024-08-23 09:41:26 +0000 | [diff] [blame] | 331 | config RISCV_ISA_ZICBOM |
| 332 | bool "Zicbom support" |
| 333 | depends on !SYS_DISABLE_DCACHE_OPS |
| 334 | |
Padmarao Begari | a235d43 | 2021-01-15 08:20:35 +0530 | [diff] [blame] | 335 | config DMA_ADDR_T_64BIT |
| 336 | bool |
| 337 | default y if 64BIT |
| 338 | |
Bin Meng | b5f0372 | 2023-06-21 23:11:46 +0800 | [diff] [blame] | 339 | config RISCV_ACLINT |
Bin Meng | b6ee5e1 | 2018-12-12 06:12:30 -0800 | [diff] [blame] | 340 | bool |
Bin Meng | 614b1d8 | 2021-05-11 20:04:12 +0800 | [diff] [blame] | 341 | depends on RISCV_MMODE |
Bin Meng | 08b8d26 | 2023-06-21 23:11:45 +0800 | [diff] [blame] | 342 | select REGMAP |
| 343 | select SYSCON |
Bin Meng | 614b1d8 | 2021-05-11 20:04:12 +0800 | [diff] [blame] | 344 | help |
Bin Meng | b5f0372 | 2023-06-21 23:11:46 +0800 | [diff] [blame] | 345 | The RISC-V ACLINT block holds memory-mapped control and status registers |
Bin Meng | 614b1d8 | 2021-05-11 20:04:12 +0800 | [diff] [blame] | 346 | associated with software and timer interrupts. |
| 347 | |
Bin Meng | b5f0372 | 2023-06-21 23:11:46 +0800 | [diff] [blame] | 348 | config SPL_RISCV_ACLINT |
Bin Meng | 614b1d8 | 2021-05-11 20:04:12 +0800 | [diff] [blame] | 349 | bool |
| 350 | depends on SPL_RISCV_MMODE |
Bin Meng | 08b8d26 | 2023-06-21 23:11:45 +0800 | [diff] [blame] | 351 | select SPL_REGMAP |
| 352 | select SPL_SYSCON |
Bin Meng | b6ee5e1 | 2018-12-12 06:12:30 -0800 | [diff] [blame] | 353 | help |
Bin Meng | b5f0372 | 2023-06-21 23:11:46 +0800 | [diff] [blame] | 354 | The RISC-V ACLINT block holds memory-mapped control and status registers |
Bin Meng | b6ee5e1 | 2018-12-12 06:12:30 -0800 | [diff] [blame] | 355 | associated with software and timer interrupts. |
| 356 | |
Zong Li | c39544c | 2021-09-01 15:01:41 +0800 | [diff] [blame] | 357 | config SIFIVE_CACHE |
| 358 | bool |
| 359 | help |
| 360 | This enables the operations to configure SiFive cache |
| 361 | |
Yu Chien Peter Lin | 739cd6f | 2022-10-25 23:03:50 +0800 | [diff] [blame] | 362 | config ANDES_PLICSW |
Rick Chen | 6df4ed0 | 2019-04-02 15:56:39 +0800 | [diff] [blame] | 363 | bool |
Lukas Auer | 6134659 | 2019-08-21 21:14:43 +0200 | [diff] [blame] | 364 | depends on RISCV_MMODE || SPL_RISCV_MMODE |
Rick Chen | 6df4ed0 | 2019-04-02 15:56:39 +0800 | [diff] [blame] | 365 | select REGMAP |
| 366 | select SYSCON |
Lukas Auer | 6134659 | 2019-08-21 21:14:43 +0200 | [diff] [blame] | 367 | select SPL_REGMAP if SPL |
| 368 | select SPL_SYSCON if SPL |
Rick Chen | 6df4ed0 | 2019-04-02 15:56:39 +0800 | [diff] [blame] | 369 | help |
Yu Chien Peter Lin | 739cd6f | 2022-10-25 23:03:50 +0800 | [diff] [blame] | 370 | The Andes PLICSW block holds memory-mapped claim and pending |
| 371 | registers associated with software interrupt. |
Rick Chen | 6df4ed0 | 2019-04-02 15:56:39 +0800 | [diff] [blame] | 372 | |
Lukas Auer | 83d573d | 2019-03-17 19:28:32 +0100 | [diff] [blame] | 373 | config SMP |
| 374 | bool "Symmetric Multi-Processing" |
Bin Meng | 4997522 | 2020-04-16 08:09:31 -0700 | [diff] [blame] | 375 | depends on SBI_V01 || !RISCV_SMODE |
Lukas Auer | 83d573d | 2019-03-17 19:28:32 +0100 | [diff] [blame] | 376 | 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 Meng | b161f90 | 2020-04-16 08:09:30 -0700 | [diff] [blame] | 383 | config 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 Auer | 83d573d | 2019-03-17 19:28:32 +0100 | [diff] [blame] | 394 | config NR_CPUS |
| 395 | int "Maximum number of CPUs (2-32)" |
| 396 | range 2 32 |
Bin Meng | b161f90 | 2020-04-16 08:09:30 -0700 | [diff] [blame] | 397 | depends on SMP || SPL_SMP |
Lukas Auer | 83d573d | 2019-03-17 19:28:32 +0100 | [diff] [blame] | 398 | 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 Meng | ee3bcd0 | 2020-03-09 19:35:28 -0700 | [diff] [blame] | 404 | config SBI |
| 405 | bool |
| 406 | default y if RISCV_SMODE || SPL_RISCV_SMODE |
| 407 | |
Bin Meng | a75325e | 2020-04-16 08:09:32 -0700 | [diff] [blame] | 408 | choice |
| 409 | prompt "SBI support" |
Bin Meng | 3aecc4b | 2020-04-16 08:09:33 -0700 | [diff] [blame] | 410 | default SBI_V02 |
Bin Meng | a75325e | 2020-04-16 08:09:32 -0700 | [diff] [blame] | 411 | |
Bin Meng | 887d809 | 2020-03-09 19:35:30 -0700 | [diff] [blame] | 412 | config SBI_V01 |
| 413 | bool "SBI v0.1 support" |
Bin Meng | 887d809 | 2020-03-09 19:35:30 -0700 | [diff] [blame] | 414 | 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 Meng | a75325e | 2020-04-16 08:09:32 -0700 | [diff] [blame] | 419 | config SBI_V02 |
Heinrich Schuchardt | 693baee | 2022-11-08 15:53:12 +0100 | [diff] [blame] | 420 | bool "SBI v0.2 or later support" |
Bin Meng | a75325e | 2020-04-16 08:09:32 -0700 | [diff] [blame] | 421 | depends on SBI |
| 422 | help |
Heinrich Schuchardt | 693baee | 2022-11-08 15:53:12 +0100 | [diff] [blame] | 423 | 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 Meng | a75325e | 2020-04-16 08:09:32 -0700 | [diff] [blame] | 428 | |
Heinrich Schuchardt | 693baee | 2022-11-08 15:53:12 +0100 | [diff] [blame] | 429 | Choose this option if OpenSBI release v0.7 or above is used together |
Bin Meng | a75325e | 2020-04-16 08:09:32 -0700 | [diff] [blame] | 430 | with U-Boot. |
| 431 | |
| 432 | endchoice |
| 433 | |
Lukas Auer | e79178b | 2019-03-17 19:28:34 +0100 | [diff] [blame] | 434 | config SBI_IPI |
| 435 | bool |
Bin Meng | ee3bcd0 | 2020-03-09 19:35:28 -0700 | [diff] [blame] | 436 | depends on SBI |
Lukas Auer | 6134659 | 2019-08-21 21:14:43 +0200 | [diff] [blame] | 437 | default y if RISCV_SMODE || SPL_RISCV_SMODE |
Lukas Auer | e79178b | 2019-03-17 19:28:34 +0100 | [diff] [blame] | 438 | depends on SMP |
| 439 | |
Rick Chen | e5e6c36 | 2019-04-30 13:49:33 +0800 | [diff] [blame] | 440 | config 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 Shubin | 7e5e029 | 2022-09-02 11:47:39 +0300 | [diff] [blame] | 447 | config 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 Chen | 9c4d5c1 | 2022-09-21 14:34:54 +0800 | [diff] [blame] | 454 | config 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 Anderson | e8b46a1 | 2019-12-25 00:27:44 -0500 | [diff] [blame] | 461 | config SHOW_REGS |
Heinrich Schuchardt | 943e6be | 2024-08-11 13:01:04 +0200 | [diff] [blame] | 462 | default y |
Sean Anderson | e8b46a1 | 2019-12-25 00:27:44 -0500 | [diff] [blame] | 463 | bool "Show registers on unhandled exception" |
Heinrich Schuchardt | 99e9210 | 2024-08-11 13:01:03 +0200 | [diff] [blame] | 464 | 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 | |
| 469 | config 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 Anderson | e8b46a1 | 2019-12-25 00:27:44 -0500 | [diff] [blame] | 476 | |
Sean Anderson | 7f4b666 | 2020-06-24 06:41:19 -0400 | [diff] [blame] | 477 | config 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 Auer | a359665 | 2019-03-17 19:28:37 +0100 | [diff] [blame] | 487 | config STACK_SIZE_SHIFT |
Chia-Wei Wang | 20144dc | 2024-09-10 17:39:14 +0800 | [diff] [blame] | 488 | int "Stack size shift" |
Lukas Auer | 0381370 | 2019-10-20 20:53:47 +0200 | [diff] [blame] | 489 | default 14 |
Lukas Auer | a359665 | 2019-03-17 19:28:37 +0100 | [diff] [blame] | 490 | |
Bin Meng | 2bdcd05 | 2020-06-25 18:16:08 -0700 | [diff] [blame] | 491 | config OF_BOARD_FIXUP |
Sean Anderson | 584a5ee | 2020-09-05 09:22:11 -0400 | [diff] [blame] | 492 | default y if OF_SEPARATE && RISCV_SMODE |
Bin Meng | 2bdcd05 | 2020-06-25 18:16:08 -0700 | [diff] [blame] | 493 | |
Bin Meng | ce64bd3 | 2021-05-13 16:46:18 +0800 | [diff] [blame] | 494 | menu "Use assembly optimized implementation of memory routines" |
| 495 | |
Heinrich Schuchardt | 23caf66 | 2021-03-27 12:37:04 +0100 | [diff] [blame] | 496 | config 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 | |
| 504 | config 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 | |
| 513 | config 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 | |
| 522 | config 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 | |
| 530 | config 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 | |
| 539 | config 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 | |
| 548 | config 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 | |
| 556 | config 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 | |
| 565 | config 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 Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 574 | endmenu |
Bin Meng | ce64bd3 | 2021-05-13 16:46:18 +0800 | [diff] [blame] | 575 | |
Randolph | b1bc7a7 | 2023-10-12 14:35:04 +0800 | [diff] [blame] | 576 | config 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 Meng | ce64bd3 | 2021-05-13 16:46:18 +0800 | [diff] [blame] | 584 | endmenu |