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 | |
Padmarao Begari | 4216f34 | 2019-05-28 15:47:51 +0530 | [diff] [blame] | 14 | config TARGET_MICROCHIP_ICICLE |
| 15 | bool "Support Microchip PolarFire-SoC Icicle Board" |
| 16 | |
Kongyang Liu | b64fc0e | 2024-01-28 15:05:25 +0800 | [diff] [blame] | 17 | config TARGET_MILKV_DUO |
| 18 | bool "Support Milk-v Duo Board" |
| 19 | |
Samuel Holland | bd6a54c | 2023-10-31 00:32:12 -0500 | [diff] [blame] | 20 | config TARGET_OPENPITON_RISCV64 |
| 21 | bool "Support RISC-V cores on OpenPiton SoC" |
| 22 | |
Bin Meng | 8a8694d | 2018-09-26 06:55:21 -0700 | [diff] [blame] | 23 | config TARGET_QEMU_VIRT |
LekKit | 94ff33a | 2024-09-22 13:11:02 +0300 | [diff] [blame] | 24 | bool "Support QEMU Virt & RVVM Boards" |
Ćukasz Stelmach | 1b100e5 | 2024-03-28 10:58:24 +0100 | [diff] [blame] | 25 | select BOARD_LATE_INIT |
Bin Meng | 8a8694d | 2018-09-26 06:55:21 -0700 | [diff] [blame] | 26 | |
Bin Meng | e9ead4a | 2021-03-17 11:10:58 +0800 | [diff] [blame] | 27 | config TARGET_SIFIVE_UNLEASHED |
| 28 | bool "Support SiFive Unleashed Board" |
Anup Patel | 7a167f2 | 2019-02-25 08:15:19 +0000 | [diff] [blame] | 29 | |
Green Wan | 2e5da52 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 30 | config TARGET_SIFIVE_UNMATCHED |
| 31 | bool "Support SiFive Unmatched Board" |
Tom Rini | 3ef67ae | 2021-08-26 11:47:59 -0400 | [diff] [blame] | 32 | select SYS_CACHE_SHIFT_6 |
Green Wan | 2e5da52 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 33 | |
Samuel Holland | bd6a54c | 2023-10-31 00:32:12 -0500 | [diff] [blame] | 34 | config TARGET_SIPEED_MAIX |
| 35 | bool "Support Sipeed Maix Board" |
| 36 | select SYS_CACHE_SHIFT_6 |
| 37 | |
Yanhong Wang | 3867879 | 2023-03-29 11:42:20 +0800 | [diff] [blame] | 38 | config TARGET_STARFIVE_VISIONFIVE2 |
| 39 | bool "Support StarFive VisionFive2 Board" |
Heinrich Schuchardt | 03a885b | 2023-09-07 13:21:28 +0200 | [diff] [blame] | 40 | select BOARD_LATE_INIT |
Yanhong Wang | 3867879 | 2023-03-29 11:42:20 +0800 | [diff] [blame] | 41 | |
Yixun Lan | 5dfa901 | 2023-07-08 19:24:32 +0800 | [diff] [blame] | 42 | config TARGET_TH1520_LPI4A |
| 43 | bool "Support Sipeed's TH1520 Lichee PI 4A Board" |
| 44 | select SYS_CACHE_SHIFT_6 |
| 45 | |
Michal Simek | 962c10a | 2023-11-06 12:56:47 +0100 | [diff] [blame] | 46 | config TARGET_XILINX_MBV |
| 47 | bool "Support AMD/Xilinx MicroBlaze V" |
| 48 | |
Chia-Wei Wang | 1c7ed53 | 2024-09-10 17:39:16 +0800 | [diff] [blame] | 49 | config TARGET_ASPEED_AST2700_IBEX |
| 50 | bool "Support Ibex RISC-V cores on Aspeed AST2700 SoC" |
| 51 | |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 52 | endchoice |
| 53 | |
Trevor Woerner | ba64b8b | 2019-05-03 09:40:59 -0400 | [diff] [blame] | 54 | config SYS_ICACHE_OFF |
| 55 | bool "Do not enable icache" |
Trevor Woerner | ba64b8b | 2019-05-03 09:40:59 -0400 | [diff] [blame] | 56 | help |
| 57 | Do not enable instruction cache in U-Boot. |
| 58 | |
Trevor Woerner | 43ec7e0 | 2019-05-03 09:41:00 -0400 | [diff] [blame] | 59 | config SPL_SYS_ICACHE_OFF |
| 60 | bool "Do not enable icache in SPL" |
| 61 | depends on SPL |
| 62 | default SYS_ICACHE_OFF |
| 63 | help |
| 64 | Do not enable instruction cache in SPL. |
| 65 | |
Trevor Woerner | ba64b8b | 2019-05-03 09:40:59 -0400 | [diff] [blame] | 66 | config SYS_DCACHE_OFF |
| 67 | bool "Do not enable dcache" |
Trevor Woerner | ba64b8b | 2019-05-03 09:40:59 -0400 | [diff] [blame] | 68 | help |
| 69 | Do not enable data cache in U-Boot. |
| 70 | |
Trevor Woerner | 43ec7e0 | 2019-05-03 09:41:00 -0400 | [diff] [blame] | 71 | config SPL_SYS_DCACHE_OFF |
| 72 | bool "Do not enable dcache in SPL" |
| 73 | depends on SPL |
| 74 | default SYS_DCACHE_OFF |
| 75 | help |
| 76 | Do not enable data cache in SPL. |
| 77 | |
Shengyu Qu | d1a3254 | 2023-08-09 21:11:31 +0800 | [diff] [blame] | 78 | config SPL_ZERO_MEM_BEFORE_USE |
| 79 | bool "Zero memory before use" |
| 80 | depends on SPL |
Shengyu Qu | d1a3254 | 2023-08-09 21:11:31 +0800 | [diff] [blame] | 81 | help |
| 82 | Zero stack/GD/malloc area in SPL before using them, this is needed for |
| 83 | Sifive core devices that uses L2 cache to store SPL. |
| 84 | |
Rick Chen | 842d580 | 2018-11-07 09:34:06 +0800 | [diff] [blame] | 85 | # board-specific options below |
Leo Yu-Chi Liang | 5d0bbea | 2024-05-14 17:50:11 +0800 | [diff] [blame] | 86 | source "board/andestech/ae350/Kconfig" |
Chia-Wei Wang | 1c7ed53 | 2024-09-10 17:39:16 +0800 | [diff] [blame] | 87 | source "board/aspeed/ibex_ast2700/Kconfig" |
Bin Meng | 8a8694d | 2018-09-26 06:55:21 -0700 | [diff] [blame] | 88 | source "board/emulation/qemu-riscv/Kconfig" |
Padmarao Begari | 4216f34 | 2019-05-28 15:47:51 +0530 | [diff] [blame] | 89 | source "board/microchip/mpfs_icicle/Kconfig" |
Samuel Holland | bd6a54c | 2023-10-31 00:32:12 -0500 | [diff] [blame] | 90 | source "board/openpiton/riscv64/Kconfig" |
Bin Meng | e9ead4a | 2021-03-17 11:10:58 +0800 | [diff] [blame] | 91 | source "board/sifive/unleashed/Kconfig" |
Green Wan | 2e5da52 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 92 | source "board/sifive/unmatched/Kconfig" |
Sean Anderson | edc32ab | 2020-06-24 06:41:25 -0400 | [diff] [blame] | 93 | source "board/sipeed/maix/Kconfig" |
Kongyang Liu | b64fc0e | 2024-01-28 15:05:25 +0800 | [diff] [blame] | 94 | source "board/sophgo/milkv_duo/Kconfig" |
Yanhong Wang | 3867879 | 2023-03-29 11:42:20 +0800 | [diff] [blame] | 95 | source "board/starfive/visionfive2/Kconfig" |
Samuel Holland | bd6a54c | 2023-10-31 00:32:12 -0500 | [diff] [blame] | 96 | source "board/thead/th1520_lpi4a/Kconfig" |
Michal Simek | 962c10a | 2023-11-06 12:56:47 +0100 | [diff] [blame] | 97 | source "board/xilinx/mbv/Kconfig" |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 98 | |
Rick Chen | 842d580 | 2018-11-07 09:34:06 +0800 | [diff] [blame] | 99 | # platform-specific options below |
Leo Yu-Chi Liang | 5d0bbea | 2024-05-14 17:50:11 +0800 | [diff] [blame] | 100 | source "arch/riscv/cpu/andes/Kconfig" |
Kongyang Liu | f752674 | 2024-03-10 00:54:56 +0800 | [diff] [blame] | 101 | source "arch/riscv/cpu/cv1800b/Kconfig" |
Pragnesh Patel | 25269c0 | 2020-05-29 11:33:34 +0530 | [diff] [blame] | 102 | source "arch/riscv/cpu/fu540/Kconfig" |
Green Wan | 7f33743 | 2021-05-27 06:52:07 -0700 | [diff] [blame] | 103 | source "arch/riscv/cpu/fu740/Kconfig" |
Chia-Wei Wang | 1c7ed53 | 2024-09-10 17:39:16 +0800 | [diff] [blame] | 104 | source "arch/riscv/cpu/ast2700/Kconfig" |
Anup Patel | 1240cd6 | 2019-02-25 08:14:10 +0000 | [diff] [blame] | 105 | source "arch/riscv/cpu/generic/Kconfig" |
Yanhong Wang | 3867879 | 2023-03-29 11:42:20 +0800 | [diff] [blame] | 106 | source "arch/riscv/cpu/jh7110/Kconfig" |
Rick Chen | 842d580 | 2018-11-07 09:34:06 +0800 | [diff] [blame] | 107 | |
| 108 | # architecture-specific options below |
| 109 | |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 110 | choice |
Lukas Auer | 54ebfe7 | 2018-11-22 11:26:12 +0100 | [diff] [blame] | 111 | prompt "Base ISA" |
| 112 | default ARCH_RV32I |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 113 | |
Lukas Auer | 54ebfe7 | 2018-11-22 11:26:12 +0100 | [diff] [blame] | 114 | config ARCH_RV32I |
| 115 | bool "RV32I" |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 116 | select 32BIT |
| 117 | help |
Lukas Auer | 54ebfe7 | 2018-11-22 11:26:12 +0100 | [diff] [blame] | 118 | Choose this option to target the RV32I base integer instruction set. |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 119 | |
Lukas Auer | 54ebfe7 | 2018-11-22 11:26:12 +0100 | [diff] [blame] | 120 | config ARCH_RV64I |
| 121 | bool "RV64I" |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 122 | select 64BIT |
Andrew Goodbody | 5b5322c | 2024-12-16 18:07:35 +0000 | [diff] [blame^] | 123 | select SPL_64BIT if SPL |
Lukas Auer | 7ab1df0 | 2018-11-22 11:26:13 +0100 | [diff] [blame] | 124 | select PHYS_64BIT |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 125 | help |
Lukas Auer | 54ebfe7 | 2018-11-22 11:26:12 +0100 | [diff] [blame] | 126 | Choose this option to target the RV64I base integer instruction set. |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 127 | |
| 128 | endchoice |
| 129 | |
Ben Dooks | 8a813c1 | 2023-09-05 13:12:53 +0100 | [diff] [blame] | 130 | config FRAMEPOINTER |
| 131 | bool "Build with frame pointer for stack unwinding" |
| 132 | help |
| 133 | Choose this option to use the frame pointer so the stack can be |
| 134 | unwound if needed. This is useful for tracing where faults came |
| 135 | from as the source may be several functions back |
| 136 | |
| 137 | If you say Y here, then the code size will be increased due to |
| 138 | having to store the fp. |
| 139 | |
| 140 | config SPL_FRAMEPOINTER |
| 141 | bool "Build SPL with frame pointer for stack unwinding" |
Heinrich Schuchardt | 512d41c | 2024-08-11 11:51:09 +0200 | [diff] [blame] | 142 | depends on SPL |
Ben Dooks | 8a813c1 | 2023-09-05 13:12:53 +0100 | [diff] [blame] | 143 | help |
| 144 | Choose this option to use the frame pointer so the stack can be |
| 145 | unwound if needed. This is useful for tracing where faults came |
| 146 | from as the source may be several functions back |
| 147 | |
| 148 | If you say Y here, then the code size will be increased due to |
| 149 | having to store the fp. |
| 150 | |
Lukas Auer | ecc5d83 | 2018-12-12 06:12:23 -0800 | [diff] [blame] | 151 | choice |
| 152 | prompt "Code Model" |
| 153 | default CMODEL_MEDLOW |
| 154 | |
| 155 | config CMODEL_MEDLOW |
| 156 | bool "medium low code model" |
| 157 | help |
| 158 | U-Boot and its statically defined symbols must lie within a single 2 GiB |
| 159 | address range and must lie between absolute addresses -2 GiB and +2 GiB. |
| 160 | |
| 161 | config CMODEL_MEDANY |
| 162 | bool "medium any code model" |
| 163 | help |
| 164 | U-Boot and its statically defined symbols must be within any single 2 GiB |
| 165 | address range. |
| 166 | |
| 167 | endchoice |
| 168 | |
Anup Patel | 2788177 | 2018-12-12 06:12:29 -0800 | [diff] [blame] | 169 | choice |
| 170 | prompt "Run Mode" |
| 171 | default RISCV_MMODE |
| 172 | |
| 173 | config RISCV_MMODE |
| 174 | bool "Machine" |
| 175 | help |
| 176 | Choose this option to build U-Boot for RISC-V M-Mode. |
| 177 | |
| 178 | config RISCV_SMODE |
| 179 | bool "Supervisor" |
Heinrich Schuchardt | 20964b6 | 2023-09-23 01:35:26 +0200 | [diff] [blame] | 180 | imply DEBUG_UART |
Anup Patel | 2788177 | 2018-12-12 06:12:29 -0800 | [diff] [blame] | 181 | help |
| 182 | Choose this option to build U-Boot for RISC-V S-Mode. |
| 183 | |
| 184 | endchoice |
| 185 | |
Lukas Auer | 6134659 | 2019-08-21 21:14:43 +0200 | [diff] [blame] | 186 | choice |
| 187 | prompt "SPL Run Mode" |
| 188 | default SPL_RISCV_MMODE |
| 189 | depends on SPL |
| 190 | |
| 191 | config SPL_RISCV_MMODE |
| 192 | bool "Machine" |
| 193 | help |
| 194 | Choose this option to build U-Boot SPL for RISC-V M-Mode. |
| 195 | |
| 196 | config SPL_RISCV_SMODE |
| 197 | bool "Supervisor" |
| 198 | help |
| 199 | Choose this option to build U-Boot SPL for RISC-V S-Mode. |
| 200 | |
| 201 | endchoice |
| 202 | |
Lukas Auer | 002012f | 2018-11-22 11:26:14 +0100 | [diff] [blame] | 203 | config RISCV_ISA_C |
| 204 | bool "Emit compressed instructions" |
| 205 | default y |
| 206 | help |
| 207 | Adds "C" to the ISA subsets that the toolchain is allowed to emit |
| 208 | when building U-Boot, which results in compressed instructions in the |
| 209 | U-Boot binary. |
| 210 | |
Heinrich Schuchardt | c66c950 | 2022-10-12 14:59:51 +0200 | [diff] [blame] | 211 | config RISCV_ISA_F |
| 212 | bool "Standard extension for Single-Precision Floating Point" |
| 213 | default y |
| 214 | help |
| 215 | Adds "F" to the ISA string passed to the compiler. |
| 216 | |
| 217 | config RISCV_ISA_D |
| 218 | bool "Standard extension for Double-Precision Floating Point" |
| 219 | depends on RISCV_ISA_F |
| 220 | default y |
| 221 | help |
| 222 | Adds "D" to the ISA string passed to the compiler and changes the |
| 223 | riscv32 ABI from ilp32 to ilp32d and the riscv64 ABI from lp64 to |
| 224 | lp64d. |
| 225 | |
Yu Chien Peter Lin | 60814cb | 2023-08-09 18:49:30 +0800 | [diff] [blame] | 226 | config RISCV_ISA_ZBB |
| 227 | bool "Zbb extension support for bit manipulation instructions" |
| 228 | help |
| 229 | Adds ZBB extension (basic bit manipulation) to the ISA subsets |
| 230 | that the toolchain is allowed to emit when building U-Boot. |
| 231 | The Zbb extension provides instructions to accelerate a number |
| 232 | of bit-specific operations (count bit population, sign extending, |
| 233 | bitrotation, etc) and enables optimized string routines. |
| 234 | |
| 235 | menu "Use assembly optimized implementation of string routines" |
| 236 | |
| 237 | config USE_ARCH_STRLEN |
| 238 | bool "Use an assembly optimized implementation of strlen" |
| 239 | default y |
| 240 | depends on RISCV_ISA_ZBB |
| 241 | help |
| 242 | Enable the generation of an optimized version of strlen using |
| 243 | Zbb extension. |
| 244 | |
| 245 | config SPL_USE_ARCH_STRLEN |
| 246 | bool "Use an assembly optimized implementation of strlen for SPL" |
| 247 | default y if USE_ARCH_STRLEN |
| 248 | depends on RISCV_ISA_ZBB |
| 249 | depends on SPL |
| 250 | help |
| 251 | Enable the generation of an optimized version of strlen using |
| 252 | Zbb extension. |
| 253 | |
| 254 | config TPL_USE_ARCH_STRLEN |
| 255 | bool "Use an assembly optimized implementation of strlen for TPL" |
| 256 | default y if USE_ARCH_STRLEN |
| 257 | depends on RISCV_ISA_ZBB |
| 258 | depends on TPL |
| 259 | help |
| 260 | Enable the generation of an optimized version of strlen using |
| 261 | Zbb extension. |
| 262 | |
| 263 | config USE_ARCH_STRCMP |
| 264 | bool "Use an assembly optimized implementation of strcmp" |
| 265 | default y |
| 266 | depends on RISCV_ISA_ZBB |
| 267 | help |
| 268 | Enable the generation of an optimized version of strcmp using |
| 269 | Zbb extension. |
| 270 | |
| 271 | config SPL_USE_ARCH_STRCMP |
| 272 | bool "Use an assembly optimized implementation of strcmp for SPL" |
| 273 | default y if USE_ARCH_STRCMP |
| 274 | depends on RISCV_ISA_ZBB |
| 275 | depends on SPL |
| 276 | help |
| 277 | Enable the generation of an optimized version of strcmp using |
| 278 | Zbb extension. |
| 279 | |
| 280 | config TPL_USE_ARCH_STRCMP |
| 281 | bool "Use an assembly optimized implementation of strcmp for TPL" |
| 282 | default y if USE_ARCH_STRCMP |
| 283 | depends on RISCV_ISA_ZBB |
| 284 | depends on TPL |
| 285 | help |
| 286 | Enable the generation of an optimized version of strcmp using |
| 287 | Zbb extension. |
| 288 | |
| 289 | config USE_ARCH_STRNCMP |
| 290 | bool "Use an assembly optimized implementation of strncmp" |
| 291 | default y |
| 292 | depends on RISCV_ISA_ZBB |
| 293 | help |
| 294 | Enable the generation of an optimized version of strncmp using |
| 295 | Zbb extension. |
| 296 | |
| 297 | config SPL_USE_ARCH_STRNCMP |
| 298 | bool "Use an assembly optimized implementation of strncmp for SPL" |
| 299 | default y if USE_ARCH_STRNCMP |
| 300 | depends on RISCV_ISA_ZBB |
| 301 | depends on SPL |
| 302 | help |
| 303 | Enable the generation of an optimized version of strncmp using |
| 304 | Zbb extension. |
| 305 | |
| 306 | config TPL_USE_ARCH_STRNCMP |
| 307 | bool "Use an assembly optimized implementation of strncmp for TPL" |
| 308 | default y if USE_ARCH_STRNCMP |
| 309 | depends on RISCV_ISA_ZBB |
| 310 | depends on TPL |
| 311 | help |
| 312 | Enable the generation of an optimized version of strncmp using |
| 313 | Zbb extension. |
| 314 | |
| 315 | endmenu |
| 316 | |
Lukas Auer | 002012f | 2018-11-22 11:26:14 +0100 | [diff] [blame] | 317 | config RISCV_ISA_A |
Chia-Wei Wang | 6eda874 | 2024-09-10 17:39:13 +0800 | [diff] [blame] | 318 | bool "Standard extension for Atomic Instructions" |
| 319 | default y |
| 320 | help |
| 321 | Adds "A" to the ISA string passed to the compiler. |
Lukas Auer | 002012f | 2018-11-22 11:26:14 +0100 | [diff] [blame] | 322 | |
Mayuresh Chitale | c3abcaa | 2024-08-23 09:41:26 +0000 | [diff] [blame] | 323 | config RISCV_ISA_ZICBOM |
| 324 | bool "Zicbom support" |
| 325 | depends on !SYS_DISABLE_DCACHE_OPS |
| 326 | |
Padmarao Begari | a235d43 | 2021-01-15 08:20:35 +0530 | [diff] [blame] | 327 | config DMA_ADDR_T_64BIT |
| 328 | bool |
| 329 | default y if 64BIT |
| 330 | |
Bin Meng | b5f0372 | 2023-06-21 23:11:46 +0800 | [diff] [blame] | 331 | config RISCV_ACLINT |
Bin Meng | b6ee5e1 | 2018-12-12 06:12:30 -0800 | [diff] [blame] | 332 | bool |
Bin Meng | 614b1d8 | 2021-05-11 20:04:12 +0800 | [diff] [blame] | 333 | depends on RISCV_MMODE |
Bin Meng | 08b8d26 | 2023-06-21 23:11:45 +0800 | [diff] [blame] | 334 | select REGMAP |
| 335 | select SYSCON |
Bin Meng | 614b1d8 | 2021-05-11 20:04:12 +0800 | [diff] [blame] | 336 | help |
Bin Meng | b5f0372 | 2023-06-21 23:11:46 +0800 | [diff] [blame] | 337 | The RISC-V ACLINT block holds memory-mapped control and status registers |
Bin Meng | 614b1d8 | 2021-05-11 20:04:12 +0800 | [diff] [blame] | 338 | associated with software and timer interrupts. |
| 339 | |
Bin Meng | b5f0372 | 2023-06-21 23:11:46 +0800 | [diff] [blame] | 340 | config SPL_RISCV_ACLINT |
Bin Meng | 614b1d8 | 2021-05-11 20:04:12 +0800 | [diff] [blame] | 341 | bool |
| 342 | depends on SPL_RISCV_MMODE |
Bin Meng | 08b8d26 | 2023-06-21 23:11:45 +0800 | [diff] [blame] | 343 | select SPL_REGMAP |
| 344 | select SPL_SYSCON |
Bin Meng | b6ee5e1 | 2018-12-12 06:12:30 -0800 | [diff] [blame] | 345 | help |
Bin Meng | b5f0372 | 2023-06-21 23:11:46 +0800 | [diff] [blame] | 346 | The RISC-V ACLINT block holds memory-mapped control and status registers |
Bin Meng | b6ee5e1 | 2018-12-12 06:12:30 -0800 | [diff] [blame] | 347 | associated with software and timer interrupts. |
| 348 | |
Zong Li | c39544c | 2021-09-01 15:01:41 +0800 | [diff] [blame] | 349 | config SIFIVE_CACHE |
| 350 | bool |
| 351 | help |
| 352 | This enables the operations to configure SiFive cache |
| 353 | |
Yu Chien Peter Lin | 739cd6f | 2022-10-25 23:03:50 +0800 | [diff] [blame] | 354 | config ANDES_PLICSW |
Rick Chen | 6df4ed0 | 2019-04-02 15:56:39 +0800 | [diff] [blame] | 355 | bool |
Lukas Auer | 6134659 | 2019-08-21 21:14:43 +0200 | [diff] [blame] | 356 | depends on RISCV_MMODE || SPL_RISCV_MMODE |
Rick Chen | 6df4ed0 | 2019-04-02 15:56:39 +0800 | [diff] [blame] | 357 | select REGMAP |
| 358 | select SYSCON |
Lukas Auer | 6134659 | 2019-08-21 21:14:43 +0200 | [diff] [blame] | 359 | select SPL_REGMAP if SPL |
| 360 | select SPL_SYSCON if SPL |
Rick Chen | 6df4ed0 | 2019-04-02 15:56:39 +0800 | [diff] [blame] | 361 | help |
Yu Chien Peter Lin | 739cd6f | 2022-10-25 23:03:50 +0800 | [diff] [blame] | 362 | The Andes PLICSW block holds memory-mapped claim and pending |
| 363 | registers associated with software interrupt. |
Rick Chen | 6df4ed0 | 2019-04-02 15:56:39 +0800 | [diff] [blame] | 364 | |
Lukas Auer | 83d573d | 2019-03-17 19:28:32 +0100 | [diff] [blame] | 365 | config SMP |
| 366 | bool "Symmetric Multi-Processing" |
Bin Meng | 4997522 | 2020-04-16 08:09:31 -0700 | [diff] [blame] | 367 | depends on SBI_V01 || !RISCV_SMODE |
Lukas Auer | 83d573d | 2019-03-17 19:28:32 +0100 | [diff] [blame] | 368 | help |
| 369 | This enables support for systems with more than one CPU. If |
| 370 | you say N here, U-Boot will run on single and multiprocessor |
| 371 | machines, but will use only one CPU of a multiprocessor |
| 372 | machine. If you say Y here, U-Boot will run on many, but not |
| 373 | all, single processor machines. |
| 374 | |
Bin Meng | b161f90 | 2020-04-16 08:09:30 -0700 | [diff] [blame] | 375 | config SPL_SMP |
| 376 | bool "Symmetric Multi-Processing in SPL" |
| 377 | depends on SPL && SPL_RISCV_MMODE |
| 378 | default y |
| 379 | help |
| 380 | This enables support for systems with more than one CPU in SPL. |
| 381 | If you say N here, U-Boot SPL will run on single and multiprocessor |
| 382 | machines, but will use only one CPU of a multiprocessor |
| 383 | machine. If you say Y here, U-Boot SPL will run on many, but not |
| 384 | all, single processor machines. |
| 385 | |
Lukas Auer | 83d573d | 2019-03-17 19:28:32 +0100 | [diff] [blame] | 386 | config NR_CPUS |
| 387 | int "Maximum number of CPUs (2-32)" |
| 388 | range 2 32 |
Bin Meng | b161f90 | 2020-04-16 08:09:30 -0700 | [diff] [blame] | 389 | depends on SMP || SPL_SMP |
Lukas Auer | 83d573d | 2019-03-17 19:28:32 +0100 | [diff] [blame] | 390 | default 8 |
| 391 | help |
| 392 | On multiprocessor machines, U-Boot sets up a stack for each CPU. |
| 393 | Stack memory is pre-allocated. U-Boot must therefore know the |
| 394 | maximum number of CPUs that may be present. |
| 395 | |
Bin Meng | ee3bcd0 | 2020-03-09 19:35:28 -0700 | [diff] [blame] | 396 | config SBI |
| 397 | bool |
| 398 | default y if RISCV_SMODE || SPL_RISCV_SMODE |
| 399 | |
Bin Meng | a75325e | 2020-04-16 08:09:32 -0700 | [diff] [blame] | 400 | choice |
| 401 | prompt "SBI support" |
Bin Meng | 3aecc4b | 2020-04-16 08:09:33 -0700 | [diff] [blame] | 402 | default SBI_V02 |
Bin Meng | a75325e | 2020-04-16 08:09:32 -0700 | [diff] [blame] | 403 | |
Bin Meng | 887d809 | 2020-03-09 19:35:30 -0700 | [diff] [blame] | 404 | config SBI_V01 |
| 405 | bool "SBI v0.1 support" |
Bin Meng | 887d809 | 2020-03-09 19:35:30 -0700 | [diff] [blame] | 406 | depends on SBI |
| 407 | help |
| 408 | This config allows kernel to use SBI v0.1 APIs. This will be |
| 409 | deprecated in future once legacy M-mode software are no longer in use. |
| 410 | |
Bin Meng | a75325e | 2020-04-16 08:09:32 -0700 | [diff] [blame] | 411 | config SBI_V02 |
Heinrich Schuchardt | 693baee | 2022-11-08 15:53:12 +0100 | [diff] [blame] | 412 | bool "SBI v0.2 or later support" |
Bin Meng | a75325e | 2020-04-16 08:09:32 -0700 | [diff] [blame] | 413 | depends on SBI |
| 414 | help |
Heinrich Schuchardt | 693baee | 2022-11-08 15:53:12 +0100 | [diff] [blame] | 415 | The SBI specification introduced the concept of extensions in version |
| 416 | v0.2. With this configuration option U-Boot can detect and use SBI |
| 417 | extensions. With the HSM extension introduced in SBI 0.2, only a |
| 418 | single hart needs to boot and enter the operating system. The booting |
| 419 | hart can bring up secondary harts one by one afterwards. |
Bin Meng | a75325e | 2020-04-16 08:09:32 -0700 | [diff] [blame] | 420 | |
Heinrich Schuchardt | 693baee | 2022-11-08 15:53:12 +0100 | [diff] [blame] | 421 | 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] | 422 | with U-Boot. |
| 423 | |
| 424 | endchoice |
| 425 | |
Lukas Auer | e79178b | 2019-03-17 19:28:34 +0100 | [diff] [blame] | 426 | config SBI_IPI |
| 427 | bool |
Bin Meng | ee3bcd0 | 2020-03-09 19:35:28 -0700 | [diff] [blame] | 428 | depends on SBI |
Lukas Auer | 6134659 | 2019-08-21 21:14:43 +0200 | [diff] [blame] | 429 | default y if RISCV_SMODE || SPL_RISCV_SMODE |
Lukas Auer | e79178b | 2019-03-17 19:28:34 +0100 | [diff] [blame] | 430 | depends on SMP |
| 431 | |
Rick Chen | e5e6c36 | 2019-04-30 13:49:33 +0800 | [diff] [blame] | 432 | config XIP |
| 433 | bool "XIP mode" |
| 434 | help |
| 435 | XIP (eXecute In Place) is a method for executing code directly |
| 436 | from a NOR flash memory without copying the code to ram. |
| 437 | Say yes here if U-Boot boots from flash directly. |
| 438 | |
Nikita Shubin | 7e5e029 | 2022-09-02 11:47:39 +0300 | [diff] [blame] | 439 | config SPL_XIP |
| 440 | bool "Enable XIP mode for SPL" |
| 441 | help |
| 442 | If SPL starts in read-only memory (XIP for example) then we shouldn't |
| 443 | rely on lock variables (for example hart_lottery and available_harts_lock), |
| 444 | this affects only SPL, other stages should proceed as non-XIP. |
| 445 | |
Rick Chen | 9c4d5c1 | 2022-09-21 14:34:54 +0800 | [diff] [blame] | 446 | config AVAILABLE_HARTS |
| 447 | bool "Send IPI by available harts" |
| 448 | default y |
| 449 | help |
| 450 | By default, IPI sending mechanism will depend on available_harts. |
| 451 | If disable this, it will send IPI by CPUs node numbers of device tree. |
| 452 | |
Sean Anderson | e8b46a1 | 2019-12-25 00:27:44 -0500 | [diff] [blame] | 453 | config SHOW_REGS |
Heinrich Schuchardt | 943e6be | 2024-08-11 13:01:04 +0200 | [diff] [blame] | 454 | default y |
Sean Anderson | e8b46a1 | 2019-12-25 00:27:44 -0500 | [diff] [blame] | 455 | bool "Show registers on unhandled exception" |
Heinrich Schuchardt | 99e9210 | 2024-08-11 13:01:03 +0200 | [diff] [blame] | 456 | help |
| 457 | By default only the program counter and the return address register |
| 458 | are shown in crash dumps. Enable this symbol to show all registers in |
| 459 | main U-Boot. |
| 460 | |
| 461 | config SPL_SHOW_REGS |
| 462 | bool "In SPL show registers on unhandled exception" |
| 463 | depends on SPL |
| 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 | SPL. |
Sean Anderson | e8b46a1 | 2019-12-25 00:27:44 -0500 | [diff] [blame] | 468 | |
Sean Anderson | 7f4b666 | 2020-06-24 06:41:19 -0400 | [diff] [blame] | 469 | config RISCV_PRIV_1_9 |
| 470 | bool "Use version 1.9 of the RISC-V priviledged specification" |
| 471 | help |
| 472 | Older versions of the RISC-V priviledged specification had |
| 473 | separate counter enable CSRs for each privilege mode. Writing |
| 474 | to the unified mcounteren CSR on a processor implementing the |
| 475 | old specification will result in an illegal instruction |
| 476 | exception. In addition to counter CSR changes, the way virtual |
| 477 | memory is configured was also changed. |
| 478 | |
Lukas Auer | a359665 | 2019-03-17 19:28:37 +0100 | [diff] [blame] | 479 | config STACK_SIZE_SHIFT |
Chia-Wei Wang | 20144dc | 2024-09-10 17:39:14 +0800 | [diff] [blame] | 480 | int "Stack size shift" |
Lukas Auer | 0381370 | 2019-10-20 20:53:47 +0200 | [diff] [blame] | 481 | default 14 |
Lukas Auer | a359665 | 2019-03-17 19:28:37 +0100 | [diff] [blame] | 482 | |
Bin Meng | 2bdcd05 | 2020-06-25 18:16:08 -0700 | [diff] [blame] | 483 | config OF_BOARD_FIXUP |
Sean Anderson | 584a5ee | 2020-09-05 09:22:11 -0400 | [diff] [blame] | 484 | default y if OF_SEPARATE && RISCV_SMODE |
Bin Meng | 2bdcd05 | 2020-06-25 18:16:08 -0700 | [diff] [blame] | 485 | |
Bin Meng | ce64bd3 | 2021-05-13 16:46:18 +0800 | [diff] [blame] | 486 | menu "Use assembly optimized implementation of memory routines" |
| 487 | |
Heinrich Schuchardt | 23caf66 | 2021-03-27 12:37:04 +0100 | [diff] [blame] | 488 | config USE_ARCH_MEMCPY |
| 489 | bool "Use an assembly optimized implementation of memcpy" |
| 490 | default y |
| 491 | help |
| 492 | Enable the generation of an optimized version of memcpy. |
| 493 | Such an implementation may be faster under some conditions |
| 494 | but may increase the binary size. |
| 495 | |
| 496 | config SPL_USE_ARCH_MEMCPY |
| 497 | bool "Use an assembly optimized implementation of memcpy for SPL" |
| 498 | default y if USE_ARCH_MEMCPY |
| 499 | depends on SPL |
| 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 | |
| 505 | config TPL_USE_ARCH_MEMCPY |
| 506 | bool "Use an assembly optimized implementation of memcpy for TPL" |
| 507 | default y if USE_ARCH_MEMCPY |
| 508 | depends on TPL |
| 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 | |
| 514 | config USE_ARCH_MEMMOVE |
| 515 | bool "Use an assembly optimized implementation of memmove" |
| 516 | default y |
| 517 | help |
| 518 | Enable the generation of an optimized version of memmove. |
| 519 | Such an implementation may be faster under some conditions |
| 520 | but may increase the binary size. |
| 521 | |
| 522 | config SPL_USE_ARCH_MEMMOVE |
| 523 | bool "Use an assembly optimized implementation of memmove for SPL" |
| 524 | default y if USE_ARCH_MEMCPY |
| 525 | depends on SPL |
| 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 | |
| 531 | config TPL_USE_ARCH_MEMMOVE |
| 532 | bool "Use an assembly optimized implementation of memmove for TPL" |
| 533 | default y if USE_ARCH_MEMCPY |
| 534 | depends on TPL |
| 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 | |
| 540 | config USE_ARCH_MEMSET |
| 541 | bool "Use an assembly optimized implementation of memset" |
| 542 | default y |
| 543 | help |
| 544 | Enable the generation of an optimized version of memset. |
| 545 | Such an implementation may be faster under some conditions |
| 546 | but may increase the binary size. |
| 547 | |
| 548 | config SPL_USE_ARCH_MEMSET |
| 549 | bool "Use an assembly optimized implementation of memset for SPL" |
| 550 | default y if USE_ARCH_MEMSET |
| 551 | depends on SPL |
| 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 | |
| 557 | config TPL_USE_ARCH_MEMSET |
| 558 | bool "Use an assembly optimized implementation of memset for TPL" |
| 559 | default y if USE_ARCH_MEMSET |
| 560 | depends on TPL |
| 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 | |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 566 | endmenu |
Bin Meng | ce64bd3 | 2021-05-13 16:46:18 +0800 | [diff] [blame] | 567 | |
Randolph | b1bc7a7 | 2023-10-12 14:35:04 +0800 | [diff] [blame] | 568 | config SPL_LOAD_FIT_OPENSBI_OS_BOOT |
| 569 | bool "Enable SPL (OpenSBI OS boot mode) applying linux from FIT" |
| 570 | depends on SPL_LOAD_FIT |
| 571 | help |
| 572 | Use fw_dynamic from the FIT image, and u-boot SPL will invoke it directly. |
| 573 | This is a shortcut boot flow, from u-boot SPL -> OpenSBI -> u-boot proper |
| 574 | -> linux to u-boot SPL -> OpenSBI -> linux. |
| 575 | |
Bin Meng | ce64bd3 | 2021-05-13 16:46:18 +0800 | [diff] [blame] | 576 | endmenu |