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