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