# RISC-V-RAS-QEMU-workflow **Repository Path**: dongshan-community/RISC-V-RAS-QEMU-workflow ## Basic Information - **Project Name**: RISC-V-RAS-QEMU-workflow - **Description**: This repository publishes a source-only reproduction workflow for booting a RISC-V RAS (RERI/SSE + APEI/GHES) stack on QEMU. - **Primary Language**: C++ - **License**: BSD-2-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2026-01-06 - **Last Updated**: 2026-01-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # RISC-V-RAS-QEMU-workflow # riscv-ras-qemu-workflow (source snapshot) This repository publishes a **source-only** reproduction workflow for booting a **RISC-V RAS (RERI/SSE + APEI/GHES)** stack on QEMU. It contains upstream source snapshots (Linux/QEMU/OpenSBI/EDK2/Buildroot) plus a runnable QEMU command line and minimal validation hooks. > Notes > - **No binaries/artifacts are committed** (firmware images, kernel images, rootfs, etc. are built locally). > - Upstream components keep their original licenses; see **THIRD_PARTY_NOTICES.md**. --- ## Repository layout Typical directories (names may vary by local snapshot): - `test/qemu-dev-upstream/` — QEMU (Ventana Micro dev-upstream based) - `test/linux-dev-upstream/` — Linux kernel (Ventana Micro dev-upstream based) - `test/opensbi-dev-upstream/` — OpenSBI (Ventana Micro dev-upstream based) - `test/edk2/` — EDK2 (Ventana Micro dev-upstream based) - `test/buildroot-2023.02.1/` — Buildroot 2023.02.1 This repo may additionally include: - `run/` / `scripts/` / `configs/` — workflow scripts and local configuration templates - `docs/` — notes, troubleshooting, and validation guides --- ## Prerequisites (host) You need a working build environment for: - QEMU (meson/ninja toolchain) - Linux kernel (RISC-V toolchain) - OpenSBI - EDK2 (edk2 build dependencies) - Buildroot Because toolchains vary by distro, this repo focuses on reproducibility of **inputs, configs, and run steps** rather than packaging host dependencies. --- ## Build outputs (expected local paths) After you build each component locally, you should have: - OpenSBI payload: `fw_payload.bin` - EDK2 pflash images: - `RISCV_VIRT_CODE_32M.fd` - `RISCV_VIRT_VARS_32M.fd` - Linux kernel image: `arch/riscv/boot/Image` - Buildroot initramfs: `rootfs.cpio` These paths are referenced by the QEMU run command below. --- ## Run QEMU (known-good command line) The following command line boots the RAS-enabled stack (RERI/RPMI + AIA aplic-imsic) with pflash-based EDK2 and OpenSBI payload: ```bash qemu-system-riscv64 -s -accel tcg -m 4096 -smp 3 -cpu rv64,smepmp=false \ -serial mon:stdio -d guest_errors -D ./qemu.log \ -bios test/opensbi-dev-upstream/build/platform/generic/firmware/fw_payload.bin \ -monitor telnet:127.0.0.1:55555,server,nowait \ -device virtio-gpu-pci -full-screen \ -device qemu-xhci -device usb-kbd \ -blockdev node-name=pflash0,driver=file,read-only=on,filename= edk2/Build/RiscVVirtQemu/DEBUG_GCC5/FV/RISCV_VIRT_CODE_32M.fd \ -blockdev node-name=pflash1,driver=file,filename=edk2/Build/RiscVVirtQemu/DEBUG_GCC5/FV/RISCV_VIRT_VARS_32M.fd \ -M virt,pflash0=pflash0,pflash1=pflash1,rpmi=true,reri=true,aia=aplic-imsic \ -kernel linux-dev-upstream/build/arch/riscv/boot/Image \ -initrd buildroot-2023.02.1/output/images/rootfs.cpio \ -append "root=/dev/ram rw console=ttyS0,38400 earlycon=uart8250,mmio,0x10000000" \ -serial file:output