summaryrefslogtreecommitdiff
path: root/src/mainboard/emulation/qemu-riscv/Kconfig
blob: 9b5a6f0dce50986fd00be5d4d110f323052fbb20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
## SPDX-License-Identifier: GPL-2.0-only

# To execute, do:
# qemu-system-riscv64 -M virt -m 1024M -nographic -bios build/coreboot.rom \
#                     -drive if=pflash,file=build/coreboot.rom,format=raw

if BOARD_EMULATION_QEMU_RISCV_RV64

config BOARD_EMULATION_QEMU_RISCV
	def_bool y
	select ARCH_RISCV_RV64
endif

if BOARD_EMULATION_QEMU_RISCV_RV32

config BOARD_EMULATION_QEMU_RISCV
	def_bool y
	select ARCH_RISCV_RV32
endif

if BOARD_EMULATION_QEMU_RISCV

config BOARD_SPECIFIC_OPTIONS
	def_bool y
	select BOARD_ROMSIZE_KB_32768
	select FLATTENED_DEVICE_TREE
	select MISSING_BOARD_RESET
	select DRIVERS_UART_8250MEM
	select RISCV_HAS_OPENSBI
	select ARCH_RISCV_S
	select ARCH_RISCV_U
	select ARCH_RISCV_PMP
	select ARCH_BOOTBLOCK_RISCV
	select ARCH_VERSTAGE_RISCV
	select ARCH_ROMSTAGE_RISCV
	select ARCH_RAMSTAGE_RISCV
	select RISCV_USE_ARCH_TIMER

config MEMLAYOUT_LD_FILE
	string
	default "src/mainboard/emulation/qemu-riscv/memlayout.ld"

config MAINBOARD_DIR
	default "emulation/qemu-riscv"

config MAINBOARD_PART_NUMBER
	default "QEMU RISCV"

config MAX_CPUS
	int
	default 1

config RISCV_ARCH
	string
	default "rv64imafd" if ARCH_RISCV_RV64
	default "rv32im" if ARCH_RISCV_RV32

config RISCV_ABI
	string
	default "lp64d" if ARCH_RISCV_RV64
	default "ilp32" if ARCH_RISCV_RV32

config RISCV_CODEMODEL
	string
	default "medany" if ARCH_RISCV_RV64
	default "medany" if ARCH_RISCV_RV32

config RISCV_WORKING_HARTID
	int
	default 0

config OPENSBI_PLATFORM
	string
	default "generic"

config OPENSBI_TEXT_START
	hex
	default 0x80020000

endif #  BOARD_EMULATION_QEMU_RISCV