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