Patrick Georgi | 8dd1b21 | 2020-05-08 23:13:39 +0200 | [diff] [blame] | 1 | ## SPDX-License-Identifier: GPL-2.0-only |
Ronald G. Minnich | e0e784a | 2014-11-26 19:25:47 +0000 | [diff] [blame] | 2 | |
| 3 | # To execute, do: |
Philipp Hug | 1d3838b | 2024-02-01 21:57:22 +0400 | [diff] [blame^] | 4 | # qemu-system-riscv64 -M virt -m 1024M -nographic -bios build/coreboot.rom |
Ronald G. Minnich | e0e784a | 2014-11-26 19:25:47 +0000 | [diff] [blame] | 5 | |
Philipp Hug | b09e500 | 2019-02-06 06:48:51 +0100 | [diff] [blame] | 6 | |
| 7 | if BOARD_EMULATION_QEMU_RISCV_RV64 |
| 8 | |
| 9 | config BOARD_EMULATION_QEMU_RISCV |
| 10 | def_bool y |
| 11 | select ARCH_RISCV_RV64 |
| 12 | endif |
| 13 | |
| 14 | if BOARD_EMULATION_QEMU_RISCV_RV32 |
| 15 | |
| 16 | config BOARD_EMULATION_QEMU_RISCV |
| 17 | def_bool y |
| 18 | select ARCH_RISCV_RV32 |
| 19 | endif |
| 20 | |
Jonathan Neuschäfer | 5fba1ea | 2018-10-06 00:04:33 +0200 | [diff] [blame] | 21 | if BOARD_EMULATION_QEMU_RISCV |
Ronald G. Minnich | e0e784a | 2014-11-26 19:25:47 +0000 | [diff] [blame] | 22 | |
Elyes HAOUAS | f0c5be2 | 2018-11-27 20:36:44 +0100 | [diff] [blame] | 23 | config BOARD_SPECIFIC_OPTIONS |
Ronald G. Minnich | e0e784a | 2014-11-26 19:25:47 +0000 | [diff] [blame] | 24 | def_bool y |
| 25 | select SOC_UCB_RISCV |
Maximilian Brune | dd67089 | 2023-06-27 16:35:42 +0200 | [diff] [blame] | 26 | select BOARD_ROMSIZE_KB_16384 |
Aaron Durbin | 4a36c4e | 2016-08-11 11:02:26 -0500 | [diff] [blame] | 27 | select BOOT_DEVICE_NOT_SPI_FLASH |
Nico Huber | 9df62b0 | 2018-10-17 19:40:26 +0200 | [diff] [blame] | 28 | select MISSING_BOARD_RESET |
Patrick Rudolph | efc39cb | 2019-06-23 19:23:30 +0200 | [diff] [blame] | 29 | select DRIVERS_UART_8250MEM |
Patrick Rudolph | 871d2c7 | 2019-07-05 19:41:24 +0200 | [diff] [blame] | 30 | select RISCV_HAS_OPENSBI |
Ronald G. Minnich | e0e784a | 2014-11-26 19:25:47 +0000 | [diff] [blame] | 31 | |
Furquan Shaikh | 46514c2 | 2020-06-11 11:59:07 -0700 | [diff] [blame] | 32 | config MEMLAYOUT_LD_FILE |
| 33 | string |
| 34 | default "src/mainboard/emulation/qemu-riscv/memlayout.ld" |
| 35 | |
Ronald G. Minnich | e0e784a | 2014-11-26 19:25:47 +0000 | [diff] [blame] | 36 | config MAINBOARD_DIR |
Patrick Georgi | 0bb8346 | 2019-11-22 20:58:58 +0100 | [diff] [blame] | 37 | default "emulation/qemu-riscv" |
Ronald G. Minnich | e0e784a | 2014-11-26 19:25:47 +0000 | [diff] [blame] | 38 | |
| 39 | config MAINBOARD_PART_NUMBER |
Ronald G. Minnich | e0e784a | 2014-11-26 19:25:47 +0000 | [diff] [blame] | 40 | default "QEMU RISCV" |
| 41 | |
| 42 | config MAX_CPUS |
| 43 | int |
| 44 | default 1 |
| 45 | |
Ronald G. Minnich | e0e784a | 2014-11-26 19:25:47 +0000 | [diff] [blame] | 46 | config DRAM_SIZE_MB |
| 47 | int |
| 48 | default 32768 |
| 49 | |
Patrick Rudolph | 871d2c7 | 2019-07-05 19:41:24 +0200 | [diff] [blame] | 50 | config OPENSBI_PLATFORM |
| 51 | string |
Patrick Georgi | 41a8043 | 2022-09-08 20:19:39 +0200 | [diff] [blame] | 52 | default "generic" |
Patrick Rudolph | 871d2c7 | 2019-07-05 19:41:24 +0200 | [diff] [blame] | 53 | |
| 54 | # ugly, but CBFS is placed in DRAM... |
| 55 | config OPENSBI_TEXT_START |
| 56 | hex |
Patrick Rudolph | 871d2c7 | 2019-07-05 19:41:24 +0200 | [diff] [blame] | 57 | default 0x80040000 if COREBOOT_ROMSIZE_KB_256 |
| 58 | default 0x80080000 if COREBOOT_ROMSIZE_KB_512 |
| 59 | default 0x80100000 if COREBOOT_ROMSIZE_KB_1024 |
| 60 | default 0x80200000 if COREBOOT_ROMSIZE_KB_2048 |
| 61 | default 0x80400000 if COREBOOT_ROMSIZE_KB_4096 |
| 62 | default 0x80600000 if COREBOOT_ROMSIZE_KB_6144 |
| 63 | default 0x80800000 if COREBOOT_ROMSIZE_KB_8192 |
| 64 | default 0x80a00000 if COREBOOT_ROMSIZE_KB_10240 |
| 65 | default 0x80c00000 if COREBOOT_ROMSIZE_KB_12288 |
| 66 | default 0x81000000 if COREBOOT_ROMSIZE_KB_16384 |
| 67 | default 0x82000000 if COREBOOT_ROMSIZE_KB_32768 |
| 68 | default 0x84000000 if COREBOOT_ROMSIZE_KB_65536 |
| 69 | |
Jonathan Neuschäfer | 5fba1ea | 2018-10-06 00:04:33 +0200 | [diff] [blame] | 70 | endif # BOARD_EMULATION_QEMU_RISCV |