Attention is currently required from: Arthur Heymans, Patrick Rudolph, Philipp Hug, ron minnich.
Maximilian Brune has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/80746?usp=email )
Change subject: mb/emulation/qemu-riscv: Change to -bios option ......................................................................
Patch Set 7:
(5 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/80746/comment/8d9c24fc_7e0ff9e5 : PS6, Line 9: bios
Since which version is -bios supported in qemu? […]
-bios is quite old as far as I know. pflash is I think more recent (not sure since when). QEMU virt target on RISC-V has changed to much in order to be much backwards compatible. I tested this with QEMU version 8.2.1 (2023). I don't have access to old QEMU versions, but I also tested with a QEMU commit from 2021 (3cbc17ee92479ff5) and compiling QEMU myself. The bootflow works there also.
File src/mainboard/emulation/qemu-riscv/Makefile.mk:
https://review.coreboot.org/c/coreboot/+/80746/comment/8e203be2_642e6c3f : PS6, Line 7: bootblock-y += cbmem.c
no need to move them to bootblock-y, those can stay romstage-y, to allow both with and without separ […]
I personally don't care much if we want to support both, but I guess for an emulation target we want to cover all bootflows. I will make the changes to support both.
File src/mainboard/emulation/qemu-riscv/memlayout.ld:
https://review.coreboot.org/c/coreboot/+/80746/comment/74cc96be_e69a5cec : PS6, Line 20: #if ENV_SEPARATE_ROMSTAGE
romstage can be placed at same place as opensbi to keep separate romstage support
I will put it below and leave out the if conditions entirely. RISC-V and ARM memlayout.ld files are also meant as documentation and putting unnecessary ifdef everywhere ist just confusing. See also: https://review.coreboot.org/c/coreboot/+/77974
File src/mainboard/emulation/qemu-riscv/romstage.c:
https://review.coreboot.org/c/coreboot/+/80746/comment/b443e92d_a5f9ebc8 : PS6, Line 9: console_init();
add main to allow both with and without separate romstage: […]
Done
File util/qemu/Makefile.mk:
https://review.coreboot.org/c/coreboot/+/80746/comment/234e6777_bd1a9893 : PS6, Line 32: QEMU-$(CONFIG_BOARD_EMULATION_QEMU_RISCV_RV64) ?= qemu-system-riscv64 -M virt -drive \
maybe add -m 1G as well here, as the default memory size is really low on riscv
Done Although maybe something smaller. 512M? It still boots with 128M to Linux and u-root.