mirror of https://github.com/acidanthera/audk.git
7427dd3fc0
OpenSBI now marks PMP regions with "no-map" attribute. So, remove the workaround and add the ReservedMemory only when no-map is set so that it follows DT spec. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Andrei Warkentin <andrei.warkentin@intel.com> Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> Reviewed-by: Ranbir Singh <rsingh@ventanamicro.com> |
||
---|---|---|
.. | ||
Library | ||
PciCpuIo2Dxe | ||
Sec | ||
README.md | ||
RiscVVirt.dsc.inc | ||
RiscVVirt.fdf.inc | ||
RiscVVirtQemu.dsc | ||
RiscVVirtQemu.fdf | ||
VarStore.fdf.inc |
README.md
Support for RISC-V QEMU virt platform
Overview
RISC-V QEMU 'virt' is a generic platform which does not correspond to any real hardware.
EDK2 for RISC-V virt platform is a payload (S-mode) for the previous stage M-mode firmware like OpenSBI. It follows PEI less design.
The minimum QEMU version required is 8.1 or with commit 7efd65423a which supports separate pflash devices for EDK2 code and variable storage.
Build
export WORKSPACE=`pwd`
export GCC5_RISCV64_PREFIX=riscv64-linux-gnu-
export PACKAGES_PATH=$WORKSPACE/edk2
export EDK_TOOLS_PATH=$WORKSPACE/edk2/BaseTools
source edk2/edksetup.sh
make -C edk2/BaseTools
source edk2/edksetup.sh BaseTools
build -a RISCV64 --buildtarget RELEASE -p OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc -t GCC5
Test
Below example shows how to boot openSUSE Tumbleweed E20.
-
RISC-V QEMU pflash devices should be of of size 32MiB.
truncate -s 32M Build/RiscVVirtQemu/RELEASE_GCC5/FV/RISCV_VIRT_CODE.fd
truncate -s 32M Build/RiscVVirtQemu/RELEASE_GCC5/FV/RISCV_VIRT_VARS.fd
-
Running QEMU
qemu-system-riscv64 \ -M virt,pflash0=pflash0,pflash1=pflash1,acpi=off \ -m 4096 -smp 2 \ -serial mon:stdio \ -device virtio-gpu-pci -full-screen \ -device qemu-xhci \ -device usb-kbd \ -device virtio-rng-pci \ -blockdev node-name=pflash0,driver=file,read-only=on,filename=RISCV_VIRT_CODE.fd \ -blockdev node-name=pflash1,driver=file,filename=RISCV_VIRT_VARS.fd \ -netdev user,id=net0 \ -device virtio-net-pci,netdev=net0 \ -device virtio-blk-device,drive=hd0 \ -drive file=openSUSE-Tumbleweed-RISC-V-E20-efi.riscv64.raw,format=raw,id=hd0