riscv: add Kconfig entries for the code model
[oweals/u-boot.git] / arch / riscv / Kconfig
1 menu "RISC-V architecture"
2         depends on RISCV
3
4 config SYS_ARCH
5         default "riscv"
6
7 choice
8         prompt "Target select"
9         optional
10
11 config TARGET_AX25_AE350
12         bool "Support ax25-ae350"
13
14 config TARGET_QEMU_VIRT
15         bool "Support QEMU Virt Board"
16
17 endchoice
18
19 # board-specific options below
20 source "board/AndesTech/ax25-ae350/Kconfig"
21 source "board/emulation/qemu-riscv/Kconfig"
22
23 # platform-specific options below
24 source "arch/riscv/cpu/ax25/Kconfig"
25
26 # architecture-specific options below
27
28 choice
29         prompt "Base ISA"
30         default ARCH_RV32I
31
32 config ARCH_RV32I
33         bool "RV32I"
34         select 32BIT
35         help
36           Choose this option to target the RV32I base integer instruction set.
37
38 config ARCH_RV64I
39         bool "RV64I"
40         select 64BIT
41         select PHYS_64BIT
42         help
43           Choose this option to target the RV64I base integer instruction set.
44
45 endchoice
46
47 choice
48         prompt "Code Model"
49         default CMODEL_MEDLOW
50
51 config CMODEL_MEDLOW
52         bool "medium low code model"
53         help
54           U-Boot and its statically defined symbols must lie within a single 2 GiB
55           address range and must lie between absolute addresses -2 GiB and +2 GiB.
56
57 config CMODEL_MEDANY
58         bool "medium any code model"
59         help
60           U-Boot and its statically defined symbols must be within any single 2 GiB
61           address range.
62
63 endchoice
64
65 config RISCV_ISA_C
66         bool "Emit compressed instructions"
67         default y
68         help
69           Adds "C" to the ISA subsets that the toolchain is allowed to emit
70           when building U-Boot, which results in compressed instructions in the
71           U-Boot binary.
72
73 config RISCV_ISA_A
74         def_bool y
75
76 config RISCV_SMODE
77         bool "Run in S-Mode"
78         help
79           Enable this option to build U-Boot for RISC-V S-Mode
80
81 config 32BIT
82         bool
83
84 config 64BIT
85         bool
86
87 endmenu