From nobody Mon Sep 16 19:25:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+108578+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+108578+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1694602566; cv=none; d=zohomail.com; s=zohoarc; b=Wynd0JndqfDmne3Zow32AVReq2IB9Mw6G62909MFQjVJ0H5QeNKKmz1SwWlR8h9MSH+6WzXDxDDGMFPtKdY2obpiu+WY+Hl6jDAobhyhblRd6JKxM0khbJXYgKapkIfUHfWtHl4lK4lpAtFBL1Mbp6FTUUK5+kYkW55bhB0V7+I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694602566; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=e91k6drIgLcWy8Sn/X0+Ri1r4UZdPavhQBCQCiJMdSg=; b=kRKkJm6FDZJXpdaDLad1ytdoiHOGgV8TplV7Gq+aqlB7NEZZsCL/SlmUJ7IWgtWJrtiJeGZcg16gKvM72rNn/6e3kNl5AOdJVHPG5osPB7XQ/bcn3ZuUAlQI/Z/kPVuOA6vLRUhwGs0VzbsZhyinL1xNOjasDX/YcPlOHdfov6A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+108578+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1694602566889740.0319657736401; Wed, 13 Sep 2023 03:56:06 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=e91k6drIgLcWy8Sn/X0+Ri1r4UZdPavhQBCQCiJMdSg=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1694602566; v=1; b=ssZ/VleySPyJdhgQBlyC1bcso6+xO5cDOPn/ZDci/9bchuw+TSYz4lZwfpZajniESiG0z3S5 8C/Q9Jhvt+itF+1umkXsTraqH0fa/56z8msXmm1ePiTvfZ7Yy0t+4QCWMfv+D+/EjFYnMV479U4 R8MetGAP1hSeih6AfU1s2gEk= X-Received: by 127.0.0.2 with SMTP id QytVYY1788612xfoLoCbw8P3; Wed, 13 Sep 2023 03:56:06 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.8843.1694602565980935405 for ; Wed, 13 Sep 2023 03:56:06 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-215-E9gGrovOP9GqjApOcyy6WA-1; Wed, 13 Sep 2023 06:56:02 -0400 X-MC-Unique: E9gGrovOP9GqjApOcyy6WA-1 X-Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7EE8381DA98; Wed, 13 Sep 2023 10:56:01 +0000 (UTC) X-Received: from lacos-laptop-9.usersys.redhat.com (unknown [10.39.194.255]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0193140C6EA8; Wed, 13 Sep 2023 10:55:59 +0000 (UTC) From: "Laszlo Ersek" To: edk2-devel-groups-io , lersek@redhat.com Cc: Andrei Warkentin , Andrew Jones , Ard Biesheuvel , Gerd Hoffmann , Jiewen Yao , Jordan Justen , Sunil V L Subject: [edk2-devel] [PATCH 3/3] OvmfPkg/RiscVVirt/README: document direct kernel boot Date: Wed, 13 Sep 2023 12:55:51 +0200 Message-Id: <20230913105551.12680-4-lersek@redhat.com> In-Reply-To: <20230913105551.12680-1-lersek@redhat.com> References: <20230913105551.12680-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: oHakYu2S61paE4m99LjstT7Yx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1694602568631100007 Content-Type: text/plain; charset="utf-8"; x-default="true" Direct (fw_cfg) kernel boot works on the RiscVVirt firmware platform too; I've tested it after extracting the kernel, initrd, and kernel command line from "openSUSE-Tumbleweed-RISC-V-E20-efi.riscv64.raw". Document this type of boot, because at least historically, fw_cfg kernel boot was implemented differently between OVMF and ArmVirtQemu. Thanks: Drew, Sunil. Cc: Andrei Warkentin Cc: Andrew Jones Cc: Ard Biesheuvel Cc: Gerd Hoffmann Cc: Jiewen Yao Cc: Jordan Justen Cc: Sunil V L Signed-off-by: Laszlo Ersek Reviewed-by: Andrew Jones --- OvmfPkg/RiscVVirt/README.md | 33 +++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/RiscVVirt/README.md b/OvmfPkg/RiscVVirt/README.md index 1dba1a26af2d..47b97dd64a2f 100644 --- a/OvmfPkg/RiscVVirt/README.md +++ b/OvmfPkg/RiscVVirt/README.md @@ -75,8 +75,39 @@ Below example shows how to boot openSUSE Tumbleweed E20. Currently, `acpi=3Doff` is recommended unless you are developing ACPI = support yourself. =20 +3) Running QEMU with direct kernel boot + + The following example boots the same guest, but loads the kernel image= and + the initial RAM disk (which were extracted from + `openSUSE-Tumbleweed-RISC-V-E20-efi.riscv64.raw`) from the host filesy= stem. + It also sets the guest kernel command line on the QEMU command line. + + CMDLINE=3D(root=3DUUID=3D76d9b92d-09e9-4df0-8262-c1a7a466f2bc + systemd.show_status=3D1 + ignore_loglevel + console=3DttyS0 + earlycon=3Duart8250,mmio,0x10000000) + + qemu-system-riscv64 \ + -M virt,pflash0=3Dpflash0,pflash1=3Dpflash1,acpi=3Doff \ + -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=3Dpflash0,driver=3Dfile,read-only=3Don,filenam= e=3DRISCV_VIRT_CODE.fd \ + -blockdev node-name=3Dpflash1,driver=3Dfile,filename=3DRISCV_VIRT_= VARS.fd \ + -netdev user,id=3Dnet0 \ + -device virtio-net-pci,netdev=3Dnet0 \ + -device virtio-blk-device,drive=3Dhd0 \ + -drive file=3DopenSUSE-Tumbleweed-RISC-V-E20-efi.riscv64.raw,forma= t=3Draw,id=3Dhd0 \ + -kernel Image-6.5.2-1-default \ + -initrd initrd-6.5.2-1-default \ + -append "${CMDLINE[*]}" + ## Test with your own OpenSBI binary -Using the above QEMU command line, **RISCV_VIRT_CODE.fd** is launched by t= he +Using the above QEMU command lines, **RISCV_VIRT_CODE.fd** is launched by = the OpenSBI binary that is bundled with QEMU. You can build your own OpenSBI b= inary as well: =20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108578): https://edk2.groups.io/g/devel/message/108578 Mute This Topic: https://groups.io/mt/101334266/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/3901457/1787277/102458076= /xyzzy [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-