Skip to content

hw/riscv: sifive_u: Add Mode Select (MSEL[3:0]) support

Bin Meng qemu-devel qemu-riscv 2 versions – Applied

Status from this message: Applied to the RISC-V tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 7 repliesApplied
  2. v115 patches 16 repliesApplied

Changes in v2 from the cover letter

- Drop the already applied patch 01 to 11 in v1
- new patch: Rename IBEX CPU init routine
- rebase on https://github.com/alistair23/qemu riscv-to-apply.next branch
- rename SiFive E/U CPU init routine names

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5target/riscv: Rename IBEX CPU init routinetarget/riscv/cpu.c+2 -21 reply
2/5hw/riscv: sifive: Change SiFive E/U CPU reset vector to 0x1004hw/riscv/sifive_e.c hw/riscv/sifive_u.c target/riscv/cpu.c+17 -155 replies
3/5hw/riscv: sifive_u: Support different boot source per MSEL pin statehw/riscv/sifive_u.c include/hw/riscv/sifive_u.h+37 -80 replies
4/5hw/riscv: sifive_u: Sort the SoC memmap table entrieshw/riscv/sifive_u.c+2 -20 replies
5/5hw/riscv: sifive_u: Add a dummy DDR memory controller devicehw/riscv/sifive_u.c include/hw/riscv/sifive_u.h+5 -00 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchAlistair Francis
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/5] hw/riscv: sifive_u: Add Mode Select (MSEL[3:0]) support

From: Bin Meng <[email protected]>

This series updates the 'sifive_u' machine support:

- Change SiFive E/U series CPU reset vector to 0x1004
- Support Mode Select (MSEL[3:0]) settings at 0x1000 via a new "msel" machine property
- Add a dummy DDR memory controller device

With this series, QEMU can boot U-Boot SPL built for SiFive FU540 all the way up to loading U-Boot proper from MMC:

$ qemu-system-riscv64 -nographic -M sifive_u,msel=6 -m 8G -bios u-boot-spl.bin

U-Boot SPL 2020.07-rc3-00208-g88bd5b1 (Jun 08 2020 - 20:16:10 +0800) Trying to boot from MMC1
Unhandled exception: Load access fault
EPC: 0000000008009be6 TVAL: 0000000010050014

The last big gap for the 'sifive_u' machine is the QSPI modeling.

Changes in v2:
- Drop the already applied patch 01 to 11 in v1
- new patch: Rename IBEX CPU init routine
- rebase on https://github.com/alistair23/qemu riscv-to-apply.next branch
- rename SiFive E/U CPU init routine names

Bin Meng (5):
target/riscv: Rename IBEX CPU init routine
hw/riscv: sifive: Change SiFive E/U CPU reset vector to 0x1004 hw/riscv: sifive_u: Support different boot source per MSEL pin state hw/riscv: sifive_u: Sort the SoC memmap table entries hw/riscv: sifive_u: Add a dummy DDR memory controller device

 hw/riscv/sifive_e.c         | 10 +++++----
 hw/riscv/sifive_u.c         | 51 ++++++++++++++++++++++++++++++++++-----------
 include/hw/riscv/sifive_u.h |  7 +++++++
 target/riscv/cpu.c          | 20 +++++++++---------
 4 files changed, 62 insertions(+), 26 deletions(-)
Signature · 1 line
2.7.4