blob: c993809a6a3fcebe1c5050077e8db796926457f7 [file] [log] [blame]
Bin Meng117a4332018-09-26 06:55:06 -07001menu "RISC-V architecture"
Rick Chenf94c44e2017-12-26 13:55:52 +08002 depends on RISCV
3
4config SYS_ARCH
5 default "riscv"
6
7choice
8 prompt "Target select"
9 optional
10
Rick Chen6f4dd622018-05-29 09:54:40 +080011config TARGET_AX25_AE350
12 bool "Support ax25-ae350"
Rick Chenf94c44e2017-12-26 13:55:52 +080013
Bin Meng510e3792018-09-26 06:55:21 -070014config TARGET_QEMU_VIRT
15 bool "Support QEMU Virt Board"
16
Anup Patel3fda0262019-02-25 08:15:19 +000017config TARGET_SIFIVE_FU540
18 bool "Support SiFive FU540 Board"
19
Rick Chenf94c44e2017-12-26 13:55:52 +080020endchoice
21
Trevor Woernera0aba8a2019-05-03 09:40:59 -040022config SYS_ICACHE_OFF
23 bool "Do not enable icache"
24 default n
25 help
26 Do not enable instruction cache in U-Boot.
27
28config SYS_DCACHE_OFF
29 bool "Do not enable dcache"
30 default n
31 help
32 Do not enable data cache in U-Boot.
33
Rick Chen52923c62018-11-07 09:34:06 +080034# board-specific options below
Rick Chen6f4dd622018-05-29 09:54:40 +080035source "board/AndesTech/ax25-ae350/Kconfig"
Bin Meng510e3792018-09-26 06:55:21 -070036source "board/emulation/qemu-riscv/Kconfig"
Anup Patel3fda0262019-02-25 08:15:19 +000037source "board/sifive/fu540/Kconfig"
Rick Chenf94c44e2017-12-26 13:55:52 +080038
Rick Chen52923c62018-11-07 09:34:06 +080039# platform-specific options below
40source "arch/riscv/cpu/ax25/Kconfig"
Anup Patelfdff1f92019-02-25 08:14:10 +000041source "arch/riscv/cpu/generic/Kconfig"
Rick Chen52923c62018-11-07 09:34:06 +080042
43# architecture-specific options below
44
Rick Chenf94c44e2017-12-26 13:55:52 +080045choice
Lukas Auer862e2e72018-11-22 11:26:12 +010046 prompt "Base ISA"
47 default ARCH_RV32I
Rick Chenf94c44e2017-12-26 13:55:52 +080048
Lukas Auer862e2e72018-11-22 11:26:12 +010049config ARCH_RV32I
50 bool "RV32I"
Rick Chenf94c44e2017-12-26 13:55:52 +080051 select 32BIT
52 help
Lukas Auer862e2e72018-11-22 11:26:12 +010053 Choose this option to target the RV32I base integer instruction set.
Rick Chenf94c44e2017-12-26 13:55:52 +080054
Lukas Auer862e2e72018-11-22 11:26:12 +010055config ARCH_RV64I
56 bool "RV64I"
Rick Chenf94c44e2017-12-26 13:55:52 +080057 select 64BIT
Lukas Auer71158562018-11-22 11:26:13 +010058 select PHYS_64BIT
Rick Chenf94c44e2017-12-26 13:55:52 +080059 help
Lukas Auer862e2e72018-11-22 11:26:12 +010060 Choose this option to target the RV64I base integer instruction set.
Rick Chenf94c44e2017-12-26 13:55:52 +080061
62endchoice
63
Lukas Auer8176ea42018-12-12 06:12:23 -080064choice
65 prompt "Code Model"
66 default CMODEL_MEDLOW
67
68config CMODEL_MEDLOW
69 bool "medium low code model"
70 help
71 U-Boot and its statically defined symbols must lie within a single 2 GiB
72 address range and must lie between absolute addresses -2 GiB and +2 GiB.
73
74config CMODEL_MEDANY
75 bool "medium any code model"
76 help
77 U-Boot and its statically defined symbols must be within any single 2 GiB
78 address range.
79
80endchoice
81
Anup Patel3cfc8252018-12-12 06:12:29 -080082choice
83 prompt "Run Mode"
84 default RISCV_MMODE
85
86config RISCV_MMODE
87 bool "Machine"
88 help
89 Choose this option to build U-Boot for RISC-V M-Mode.
90
91config RISCV_SMODE
92 bool "Supervisor"
93 help
94 Choose this option to build U-Boot for RISC-V S-Mode.
95
96endchoice
97
Lukas Auerd57ffa62018-11-22 11:26:14 +010098config RISCV_ISA_C
99 bool "Emit compressed instructions"
100 default y
101 help
102 Adds "C" to the ISA subsets that the toolchain is allowed to emit
103 when building U-Boot, which results in compressed instructions in the
104 U-Boot binary.
105
106config RISCV_ISA_A
107 def_bool y
108
Rick Chenf94c44e2017-12-26 13:55:52 +0800109config 32BIT
110 bool
111
112config 64BIT
113 bool
114
Bin Meng644a3cd2018-12-12 06:12:30 -0800115config SIFIVE_CLINT
116 bool
117 depends on RISCV_MMODE
118 select REGMAP
119 select SYSCON
120 help
121 The SiFive CLINT block holds memory-mapped control and status registers
122 associated with software and timer interrupts.
123
Rick Chen0d389462019-04-02 15:56:39 +0800124config ANDES_PLIC
125 bool
126 depends on RISCV_MMODE
127 select REGMAP
128 select SYSCON
129 help
130 The Andes PLIC block holds memory-mapped claim and pending registers
131 associated with software interrupt.
132
Rick Chena1f24872019-04-02 15:56:40 +0800133config ANDES_PLMT
134 bool
135 depends on RISCV_MMODE
136 select REGMAP
137 select SYSCON
138 help
139 The Andes PLMT block holds memory-mapped mtime register
140 associated with timer tick.
141
Anup Patel511107d2018-12-12 06:12:31 -0800142config RISCV_RDTIME
143 bool
144 default y if RISCV_SMODE
145 help
146 The provides the riscv_get_time() API that is implemented using the
147 standard rdtime instruction. This is the case for S-mode U-Boot, and
148 is useful for processors that support rdtime in M-mode too.
149
Bin Meng92b64fe2018-12-12 06:12:33 -0800150config SYS_MALLOC_F_LEN
151 default 0x1000
152
Lukas Auerfa33f082019-03-17 19:28:32 +0100153config SMP
154 bool "Symmetric Multi-Processing"
155 help
156 This enables support for systems with more than one CPU. If
157 you say N here, U-Boot will run on single and multiprocessor
158 machines, but will use only one CPU of a multiprocessor
159 machine. If you say Y here, U-Boot will run on many, but not
160 all, single processor machines.
161
162config NR_CPUS
163 int "Maximum number of CPUs (2-32)"
164 range 2 32
165 depends on SMP
166 default 8
167 help
168 On multiprocessor machines, U-Boot sets up a stack for each CPU.
169 Stack memory is pre-allocated. U-Boot must therefore know the
170 maximum number of CPUs that may be present.
171
Lukas Auerf152feb2019-03-17 19:28:34 +0100172config SBI_IPI
173 bool
174 default y if RISCV_SMODE
175 depends on SMP
176
Rick Chenbdce3892019-04-30 13:49:33 +0800177config XIP
178 bool "XIP mode"
179 help
180 XIP (eXecute In Place) is a method for executing code directly
181 from a NOR flash memory without copying the code to ram.
182 Say yes here if U-Boot boots from flash directly.
183
Lukas Auer3dea63c2019-03-17 19:28:37 +0100184config STACK_SIZE_SHIFT
185 int
186 default 13
187
Rick Chenf94c44e2017-12-26 13:55:52 +0800188endmenu