From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by mx.groups.io with SMTP id smtpd.web10.6812.1687255381272285454 for ; Tue, 20 Jun 2023 03:03:01 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@ventanamicro.com header.s=google header.b=Qz1I24ZO; spf=pass (domain: ventanamicro.com, ip: 209.85.215.181, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-55380677566so2008951a12.3 for ; Tue, 20 Jun 2023 03:03:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1687255380; x=1689847380; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Aapx8WGQEAK9Vi3724yALvyom00RAZoXZnz9O8elCsI=; b=Qz1I24ZOyAOgnJVdVZeHe4SxTiyIBMlz+ieboFeFfBbx8i5FnKdJfx3vsts3kpu6+R sSWWMYdb4gX5LB/tJffN2pBGXRaP9YXjDc50y49uC9/Pc6FlmBWcdPHv1rc9oosf3V6H DKG8CVtZLjNhr+PQhtgl5bkxzvxtFXN7kUeqoNIB27PuPbw2YAykhY0fUHe/WRgDFkIS 0QzKFyb+KI5pcPUfGjh2rnw+RBANlBHsbaALJ0/tAZ8SIbnav22srssQirI087sm/198 95Tr8XiNM0GrQ1ViVG9GiiAbXISL19vCaoeqXzKC8nKnSUK/gjfT2Vy/dunuZJojH1fA wGOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687255380; x=1689847380; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Aapx8WGQEAK9Vi3724yALvyom00RAZoXZnz9O8elCsI=; b=kTTW5yFAo2Hsdkbo5wbyzpGJRrdZKo6FN7pTvPx9H6XJNnXS97VpRWOcDe53h/Hc7L RePTipoysp+aZu0///ltoeMHWimLcGNrw/HtV9MR9/OF0AX5wguI/hX3TLWPQtDpask9 SMI5f7m8YFB/1w8M+oPGC0nWkcEdWhUa7usiMQKgwZk0qjrlEOhUze0aZdc/0/F0Fqoy TLjvBjKIB5gEpKL1lcQF8tbqZgT1hh6QqtgRdlnt1J3r7eHV+phO/jEI4NwfxeHH/Exi 2OoL+TKcPYw8XSc0wYEIAq2eBSoNm8sL8T/SdKHS43ch/n/Q0khKawXHBFLJhXhDCr7b N88A== X-Gm-Message-State: AC+VfDzLO15kaOJhGiVkMfDns4ifeiICZbprBdiP0TcX2yvhAvCKbwYL J4D0Uqgbd50p2oN7RtSLBF5atxgWJRcd2TeYrEY= X-Google-Smtp-Source: ACHHUZ7z5qhdl2BYkjkdaecW6MUyk03/UhjAAE6D432de1D/jgYHtsHzjvMWlW0a56OCiuCsP1ud7Q== X-Received: by 2002:a05:6a21:329e:b0:10e:d90f:35d5 with SMTP id yt30-20020a056a21329e00b0010ed90f35d5mr9226812pzb.51.1687255380511; Tue, 20 Jun 2023 03:03:00 -0700 (PDT) Return-Path: Received: from kerodi.Dlink ([106.51.184.72]) by smtp.gmail.com with ESMTPSA id v14-20020aa7808e000000b00666b3b04758sm1033433pff.37.2023.06.20.03.02.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 03:03:00 -0700 (PDT) From: "Sunil V L" To: devel@edk2.groups.io Cc: Sunil V L , Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann , Andrei Warkentin , Heinrich Schuchardt Subject: [PATCH v3 4/4] OvmfPkg/RiscVVirt: Add a readme for build and test Date: Tue, 20 Jun 2023 15:32:44 +0530 Message-Id: <20230620100244.1404606-5-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230620100244.1404606-1-sunilvl@ventanamicro.com> References: <20230620100244.1404606-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add a readme file which provides information regarding how to build and test EDK2 on RISC-V qemu virt platform. Signed-off-by: Sunil V L Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Cc: Andrei Warkentin Cc: Heinrich Schuchardt --- OvmfPkg/RiscVVirt/README.md | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 OvmfPkg/RiscVVirt/README.md diff --git a/OvmfPkg/RiscVVirt/README.md b/OvmfPkg/RiscVVirt/README.md new file mode 100644 index 000000000000..950694419e8b --- /dev/null +++ b/OvmfPkg/RiscVVirt/README.md @@ -0,0 +1,49 @@ +# 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](https://wiki.qemu.org/Planning/8.1)** or with commit +[7efd65423a](https://github.com/qemu/qemu/commit/7efd65423ab22e6f5890ca08ae40c84d6660242f) +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. + +1) 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` + +2) 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 -- 2.34.1