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