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