1 ## SPDX-License-Identifier: GPL-2.0-only
4 # qemu-system-riscv64 -M virt -m 1024M -nographic -bios build/coreboot.rom \
5 # -drive if=pflash,file=build/coreboot.rom,format=raw
7 if BOARD_EMULATION_QEMU_RISCV_RV64
9 config BOARD_EMULATION_QEMU_RISCV
11 select ARCH_RISCV_RV64
14 if BOARD_EMULATION_QEMU_RISCV_RV32
16 config BOARD_EMULATION_QEMU_RISCV
18 select ARCH_RISCV_RV32
21 if BOARD_EMULATION_QEMU_RISCV
23 config BOARD_SPECIFIC_OPTIONS
25 select BOARD_ROMSIZE_KB_32768
26 select FLATTENED_DEVICE_TREE
27 select MISSING_BOARD_RESET
28 select DRIVERS_UART_8250MEM
29 select RISCV_HAS_OPENSBI
33 select ARCH_BOOTBLOCK_RISCV
34 select ARCH_VERSTAGE_RISCV
35 select ARCH_ROMSTAGE_RISCV
36 select ARCH_RAMSTAGE_RISCV
37 select RISCV_USE_ARCH_TIMER
39 config MEMLAYOUT_LD_FILE
41 default "src/mainboard/emulation/qemu-riscv/memlayout.ld"
44 default "emulation/qemu-riscv"
46 config MAINBOARD_PART_NUMBER
55 default "rv64imafd" if ARCH_RISCV_RV64
56 default "rv32im" if ARCH_RISCV_RV32
60 default "lp64d" if ARCH_RISCV_RV64
61 default "ilp32" if ARCH_RISCV_RV32
63 config RISCV_CODEMODEL
65 default "medany" if ARCH_RISCV_RV64
66 default "medany" if ARCH_RISCV_RV32
68 config RISCV_WORKING_HARTID
72 config OPENSBI_PLATFORM
76 config OPENSBI_TEXT_START
80 endif # BOARD_EMULATION_QEMU_RISCV