Skip to content

RISC-V: Add more machine memory

Alistair Francis qemu-devel qemu-riscv 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 1 replyIn review
  2. v27 patches 12 repliesSuperseded
  3. v16 patches 23 repliesSuperseded

Changes in v3 from the cover letter

- Use the start_addr variable instead of editing reset vector
- Fix function names

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7riscv/sifive_u: Add L2-LIM cache memoryhw/riscv/sifive_u.c include/hw/riscv/sifive_u.h+17 -00 replies
2/7riscv/sifive_u: Add QSPI memory regionhw/riscv/sifive_u.c include/hw/riscv/sifive_u.h+9 -00 replies
3/7riscv/sifive_u: Manually define the machinehw/riscv/sifive_u.c include/hw/riscv/sifive_u.h+37 -140 replies
4/7riscv/sifive_u: Add the start-in-flash propertyhw/riscv/sifive_u.c include/hw/riscv/sifive_u.h+31 -11 reply
5/7riscv/virt: Manually define the machinehw/riscv/virt.c include/hw/riscv/virt.h+30 -70 replies
6/7riscv/virt: Add the PFlash CFI01 devicehw/riscv/Kconfig hw/riscv/virt.c include/hw/riscv/virt.h+90 -00 replies
7/7riscv/virt: Jump to pflash if specifiedhw/riscv/virt.c+10 -10 replies

Reviews trailers per patch

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

PatchBin MengPhilippe Mathieu-Daudé
1/7R-b
2/7R-b
3/7R-b T-b
4/7R-b T-b
5/7R-b T-b
6/7R-b T-b
7/7R-b T-b R-b

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

Read the v3 thread

Cover letter [PATCH v3 0/7] RISC-V: Add more machine memory

This series aims to improve the use of QEMU for developing boot code. It does a few things:

- sifive_u machine:
- Adds a chunk of memory in the Flash area. This allows boot loaders to use this memory. I can't find details on the QSPI flash used on the real board, so this is the best bet at the moment.
- Adds a chunk of memory in the L2-LIM area. This is actualy the L2 cache and should shrink as the L2 cache is enalbed. Unfortunatley I don't see a nice way to shrink this memory.
- Adds a property that allows users to specify if QEMU should jump to flash or DRAM after the ROM code.

- virt machine:
- Add the pflash_cfi01 flash device. This is based on the ARM virt board implementation
- Adjusts QEMU to jump to the flash if a user has speciefied any pflash.

Both machines have been tested with oreboot, but this should also help the coreboot developers.

v3:
- Use the start_addr variable instead of editing reset vector
- Fix function names
v2:
- Address comments
- Fixup addresses
- Don't use macro for machine definition of RISC-V virt machine

Alistair Francis (7):
riscv/sifive_u: Add L2-LIM cache memory
riscv/sifive_u: Add QSPI memory region
riscv/sifive_u: Manually define the machine
riscv/sifive_u: Add the start-in-flash property
riscv/virt: Manually define the machine
riscv/virt: Add the PFlash CFI01 device
riscv/virt: Jump to pflash if specified

 hw/riscv/Kconfig            |   1 +
 hw/riscv/sifive_u.c         |  98 ++++++++++++++++++++++++----
 hw/riscv/virt.c             | 127 ++++++++++++++++++++++++++++++++++--
 include/hw/riscv/sifive_u.h |  11 +++-
 include/hw/riscv/virt.h     |  10 ++-
 5 files changed, 224 insertions(+), 23 deletions(-)
Signature · 1 line
2.23.0