From patchwork Fri Jun 26 01:26:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1317561 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=slZGF7Oe; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=u/EKdUhC; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49tYs23vw6z9sQt for ; Fri, 26 Jun 2020 21:03:18 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=/STDZtlOCTNvMLYhPbjAWpm88ABq9z0RrvHKRyWR7Z8=; b=slZGF7OeEcb7kLzuWkEUtZK47Z eR+3tJa7Ikf7rcyBUWmFTkQ/IRM/rYTZwFUL9sxBtwYXsqmAI+2JiPBb43D8ZqbGFTz3WTKtj8/KT uS5ataGH0ZtCshDLbn9rjfIuGPvSI2qT+nx6fqg4fXZza/XX9o5tRoRZz5upigULp5JTKEFr4nHOW pXtFDHA76t8rL0EsgxZRVepF1r6kPqTGvRLFkMgTcgRneqRXbn559BG47ClAfbCPrQN43NKiD/ogV Vh4rLsua9EHhR61Wm1gAdna08dVD0BsF/vdO7X1xeolOgApIUEJuuHGUT9JJI0S0MWRoUEPTL/TH+ y8XnDVkg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jom8X-0001Or-LX; Fri, 26 Jun 2020 11:03:13 +0000 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jom8V-0001Nv-0K for opensbi@lists.infradead.org; Fri, 26 Jun 2020 11:03:11 +0000 Received: by mail-oi1-x22a.google.com with SMTP id k4so7718435oik.2 for ; Fri, 26 Jun 2020 04:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=2zcXEGlvQUOGKsrfQPA99bXw69UwvZiYDvwCZfbo5Eo=; b=u/EKdUhCiIa6IVwEtDnEXeVFmnDFcUcCi2zowDtouSKT9EA3oGJFK3dwLZ+oOlhrDg uUeWgkWY9SlPkwXoYwslKnGY152J5DRBKTjd9cCyMJsEjwG1W09Fgh7pf9JY+p+QtfBc 5bDXnF6dw6Q+IMGL5v3U2ryYpkCoROzVWlpL5rguwjJUM6tBEt0UNuvidrMxIP3RevUp v4Oq64/cc3jtXIe8PCxAtjGnifKlRdJLU9GecGRkphnYprzFpjog+gMiihbZ5y0E5LdC O8a7oV1IHSGkyCujRr7MUeFkdpCqqQ4bYRYim4R0WZCJ6lcqv/n8LFWhHwBVH5fpgIn8 P7dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=2zcXEGlvQUOGKsrfQPA99bXw69UwvZiYDvwCZfbo5Eo=; b=g8m+YnWjj9+Pbu/e45aalFfOHBxV7Z5b2CwlRpaX1FgfR4x346ho2wu7OT0DCCSN30 9OjgsP52/WMft5nnzCMKDhRYMQy6ooSyiiAVZgalZgW3iVWqEokKZf6PpbYbthGJRTFl OygDfbPNCjMnnZG3BNkrZucByXFf3KEUhmcHPWSZieOVP1K06+jkQEAzYoxSMz2fe3eu RGjAiJraBvbPqanY6zeUTHW0XtaLQ/rB1BBPmsIBTOea7CqB83WwsAsIzb8HCdg2nkIQ +OONQI9NOeflebG7IrQul1Q5sz0sQT7VbaQ/fdnCl8WLrccKeT56NjOIvghhSJanUSBR iH0A== X-Gm-Message-State: AOAM5302Z67iK5Ul65DSywiDW5Oka5hOYk36bsxTRrc5UtJZau69bh+V KrDS+jL3MYwJUXcStroT+G3nswT7 X-Google-Smtp-Source: ABdhPJwCEaNYzWhTC/GnzaVxrLFc0T4N/gbKAhHNIgFBTYx929QCd/66EDFoIRveKFHpEaCC6EZ1CA== X-Received: by 2002:a17:90a:ec13:: with SMTP id l19mr702999pjy.81.1593134777122; Thu, 25 Jun 2020 18:26:17 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id a12sm24490964pfr.44.2020.06.25.18.26.16 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 25 Jun 2020 18:26:16 -0700 (PDT) From: Bin Meng To: Atish Patra , opensbi@lists.infradead.org Subject: [PATCH v2 1/3] docs/platform: Update QEMU parameter for fw_payload Date: Thu, 25 Jun 2020 18:26:02 -0700 Message-Id: <1593134764-16743-1-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:22a listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [bmeng.cn[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bin Meng MIME-Version: 1.0 Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Bin Meng Since QEMU v5.1, if there is no "-bios" option provided, the default OpenSBI firmware will be loaded by QEMU as the BIOS automatically, hence to load fw_payload type image, we should explicitly pass the "-bios" option to QEMU. Signed-off-by: Bin Meng Reviewed-by: Atish Patra --- (no changes since v1) docs/platform/qemu_virt.md | 12 ++++++------ docs/platform/spike.md | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/platform/qemu_virt.md b/docs/platform/qemu_virt.md index 2196e5a..2777148 100644 --- a/docs/platform/qemu_virt.md +++ b/docs/platform/qemu_virt.md @@ -28,7 +28,7 @@ make PLATFORM=generic Run: ``` qemu-system-riscv64 -M virt -m 256M -nographic \ - -kernel build/platform/generic/firmware/fw_payload.bin + -bios build/platform/generic/firmware/fw_payload.bin ``` **U-Boot Payload** @@ -44,7 +44,7 @@ make PLATFORM=generic FW_PAYLOAD_PATH=/u-boot.bin Run: ``` qemu-system-riscv64 -M virt -m 256M -nographic \ - -kernel build/platform/generic/firmware/fw_payload.elf + -bios build/platform/generic/firmware/fw_payload.elf ``` or ``` @@ -66,7 +66,7 @@ make PLATFORM=generic FW_PAYLOAD_PATH=/arch/riscv/boot/Im Run: ``` qemu-system-riscv64 -M virt -m 256M -nographic \ - -kernel build/platform/generic/firmware/fw_payload.elf \ + -bios build/platform/generic/firmware/fw_payload.elf \ -drive file=,format=raw,id=hd0 \ -device virtio-blk-device,drive=hd0 \ -append "root=/dev/vda rw console=ttyS0" @@ -95,7 +95,7 @@ make PLATFORM=generic PLATFORM_RISCV_XLEN=32 Run: ``` qemu-system-riscv32 -M virt -m 256M -nographic \ - -kernel build/platform/generic/firmware/fw_payload.bin + -bios build/platform/generic/firmware/fw_payload.bin ``` **U-Boot Payload** @@ -111,7 +111,7 @@ make PLATFORM=generic PLATFORM_RISCV_XLEN=32 FW_PAYLOAD_PATH=,format=raw,id=hd0 \ -device virtio-blk-device,drive=hd0 \ -append "root=/dev/vda rw console=ttyS0" diff --git a/docs/platform/spike.md b/docs/platform/spike.md index 8d6b422..79e2eb2 100644 --- a/docs/platform/spike.md +++ b/docs/platform/spike.md @@ -59,7 +59,7 @@ make PLATFORM=generic Run: ``` qemu-system-riscv64 -M spike -m 256M -nographic \ - -kernel build/platform/generic/firmware/fw_payload.elf + -bios build/platform/generic/firmware/fw_payload.elf ``` **Linux Kernel Payload** @@ -75,7 +75,7 @@ make PLATFORM=generic FW_PAYLOAD_PATH=/arch/riscv/boot/Im Run: ``` qemu-system-riscv64 -M spike -m 256M -nographic \ - -kernel build/platform/generic/firmware/fw_payload.elf \ + -bios build/platform/generic/firmware/fw_payload.elf \ -initrd \ -append "root=/dev/ram rw console=hvc0 earlycon=sbi" ``` From patchwork Fri Jun 26 01:26:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1317497 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=z3X8DpvT; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=dLE7dA02; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49tXBl4G7qz9sRR for ; Fri, 26 Jun 2020 19:48:30 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wV6Kifigp8tJuFfu0KqgMJL059nb/s40wn1Dj4MvK14=; b=z3X8DpvTVu5uIJ6yjgiJrbSSG5 1SeCwNVQJcccOjNzGhLO8r3/yege0+ok73uJnt7B2gw+EvS9nrnRk4pjVVMmS9G9bYqkuKw+ZXl+U RJq5ySeew9QmzwGfEPHatRvYrvllpn/nL1xeEO73zRieMaeUJ5nPHPkQga0rUOCFIyq+6w5EuaPTc dPMMVkVWG7F5jKEocz3aCOHRERap+R+9YHCrSWojklD0+j7LXZfBMh/gjfurOADLR1Q0Xz0ha0Zg6 xAPilDnHd0hVv/ayY5I/vsvs4DKMiNhzetgnQKw22z8XfHmhKMmv0y0R8WlYai3FYSJryloURtUIK 0wkendBg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1joky8-000260-4m; Fri, 26 Jun 2020 09:48:24 +0000 Received: from mail-oi1-x244.google.com ([2607:f8b0:4864:20::244]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jojdZ-00071H-In for opensbi@lists.infradead.org; Fri, 26 Jun 2020 08:23:28 +0000 Received: by mail-oi1-x244.google.com with SMTP id j11so4715762oiw.12 for ; Fri, 26 Jun 2020 01:23:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MYb9eqbxL6yeAGcxRjEsWxj2fpFOeo3QpFnhuWozUlM=; b=dLE7dA02faJnq1LOIuWtV+/ZDh0YxVFjNaRA6Nwl0QMB5M57auZ3BoS89pFp9n5WBY kQNmUaZz6AlOFCsgi+tCpFLX5TIAERFDiwrDC7+ebuHsNYQ0kUkFInRzV/0w/aOWyMs8 dKYszbaqLkgn9YRj1PFVsimpJb/GaZ2CZANqjba/mU6i3GRKjoz6jU22KHBN9Su56D+1 CTMOm7LzKF9hoxYEP88BRqKrGqpf8zPYGP5ITWeQ94m4TqLZLn7EWQai5J7vRVf+UI7f kII2DL1ueFHwrE7oJK7TERPCzafa1Jrk74Ce8PO72RChtj4eusmxYGIUQG8bm1of+hFU X4Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MYb9eqbxL6yeAGcxRjEsWxj2fpFOeo3QpFnhuWozUlM=; b=a1QRaLhBNPXl6RKjnuZ+xqjoQIYrGeKg9FIl5LAPI+qT/FRWWdRAYPU0Jk6b7BJJKh +/s09TQglcItpvmqlNzuXDqKVvUOLJ2XMOm1GOe0kxm//Tk/OiT5fLghBakwiOLTFv4V BGKTpJTs9oBucyZYUZo5egJR6zVvicR3h6pqTf7ywVJtQSUQDchdnj9IMBKCzvQJv9c5 ERCTau9pEAkmmEI1QIn+n9MiLLfyJS42shh7tmiOk59aSV529LeXwMfZi1nv5r8LSH4T ZyyZfSWQIhv4wdrpFrjtHsEAmF31bRu9Y9tNN/z/WkgwJNjLTdItTN1gKTkfR0hfl5q9 2YoA== X-Gm-Message-State: AOAM53205OHYg7Lxetdz3GJVrT5iv+DNk7SbivgsR/xH0CaqBFqy/yHR ynNT9LZDl4Iw7yL1CnlklzMh3HsP X-Google-Smtp-Source: ABdhPJye2jlFN8NL/hgpnyDTdP4vFyAbQlkrqHxQqSXjB2WPzTdp3MnFokyTXVvVM1J2Ulqdc6ePOQ== X-Received: by 2002:a17:90a:d0c1:: with SMTP id y1mr794735pjw.164.1593134777864; Thu, 25 Jun 2020 18:26:17 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id a12sm24490964pfr.44.2020.06.25.18.26.17 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 25 Jun 2020 18:26:17 -0700 (PDT) From: Bin Meng To: Atish Patra , opensbi@lists.infradead.org Subject: [PATCH v2 2/3] config.mk: Update QEMU run command for generic and sifive fu540 platforms Date: Thu, 25 Jun 2020 18:26:03 -0700 Message-Id: <1593134764-16743-2-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1593134764-16743-1-git-send-email-bmeng.cn@gmail.com> References: <1593134764-16743-1-git-send-email-bmeng.cn@gmail.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:244 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [bmeng.cn[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bin Meng MIME-Version: 1.0 Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Bin Meng Since QEMU v5.1, if there is no "-bios" option provided, the default OpenSBI firmware will be loaded by QEMU as the BIOS automatically, hence to load fw_payload type image, we should explicitly pass the "-bios" option to QEMU. Signed-off-by: Bin Meng Reviewed-by: Atish Patra --- (no changes since v1) platform/generic/config.mk | 2 +- platform/sifive/fu540/config.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/generic/config.mk b/platform/generic/config.mk index 8d63ece..8151974 100644 --- a/platform/generic/config.mk +++ b/platform/generic/config.mk @@ -15,7 +15,7 @@ platform-ldflags-y = # Command for platform specific "make run" platform-runcmd = qemu-system-riscv$(PLATFORM_RISCV_XLEN) -M virt -m 256M \ - -nographic -kernel $(build_dir)/platform/generic/firmware/fw_payload.elf + -nographic -bios $(build_dir)/platform/generic/firmware/fw_payload.elf # Blobs to build FW_TEXT_START=0x80000000 diff --git a/platform/sifive/fu540/config.mk b/platform/sifive/fu540/config.mk index e76adcd..23169b1 100644 --- a/platform/sifive/fu540/config.mk +++ b/platform/sifive/fu540/config.mk @@ -15,7 +15,7 @@ platform-ldflags-y = # Command for platform specific "make run" platform-runcmd = qemu-system-riscv$(PLATFORM_RISCV_XLEN) -M sifive_u -m 256M \ - -nographic -kernel $(build_dir)/platform/sifive/fu540/firmware/fw_payload.elf + -nographic -bios $(build_dir)/platform/sifive/fu540/firmware/fw_payload.elf # Blobs to build FW_TEXT_START=0x80000000 From patchwork Fri Jun 26 01:26:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1317622 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=uwYv5kg3; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=LhphQiNR; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=mF2dcmmK; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49tbzS2rvfz9sPF for ; Fri, 26 Jun 2020 22:39:00 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XxGPR8A4tXOJk1p34hrKgriVvMSAekH4yaNZiO/BZV4=; b=uwYv5kg3ddrHKfqHhxCLk2v+h4 3syfcaDxsPWLQfrUfMhrUSD4UNC+n6dSInrc3DyABScl7yfI02wgX5BYLCcjU7ZQ/3lSrmyMYiWwo BmHjq7BDmZZh2v3jP4UnoGia5g68l4iCYGKJsRoNSDPGDnACMbX3JbTpulZ7M4FJL5L91pDLyddxp 0r5jwDjG3cdG5DON6ytMVADFg2ibdN1ZLPFB/tzsZZ4/RXhhaIp+NHU4cUkP9b6B+94hiWYydMuhQ vvNUdpzP9yyIrlRlkr5cn1NU7/RArgPl8txJFC4M1Mvlz5Yx4MgkBxutM6+lVltCNHINHOK2FDrCL qDm4cCAg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jond7-0002bg-BX; Fri, 26 Jun 2020 12:38:53 +0000 Received: from casper.infradead.org ([90.155.50.34]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jolGs-00014E-Ve for opensbi@merlin.infradead.org; Fri, 26 Jun 2020 10:07:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description; bh=BRtZcu+jTfzMqwSnmvF+qwd44/1XvJuWGWXA4JGAAmI=; b=LhphQiNRQNrKTdDZlItSgaQrE1 NxwBhKbFQBVXDwmSfjvG4fiK5PCOAnmCs0PfkLskKb6U2owXXh6nzLZBLuXoc2Qu2k7gpyNR9MRTf s8PX+UAyEO5EH2uM8ZEg68a1tsYwufcytkWaOi5cptZLuvxktDYCEA1YsuRcoAsVDtsQtpCj8SBqY HWJPSyltOhvWmTewtf1HkIyUXKaEMyF52RwPSKbR8wl/SRxJ5pGDc/LbjMdAEceSJlQSJPY/SY8G4 loUIKmXjXOepn/6Y01ceOHjsAEClj6CXRiDE+OTFAOwlBh4B6iqVraZ1tzDaHZ6WAublbKdJriD3R U9Qn9ijQ==; Received: from mail-vk1-xa31.google.com ([2607:f8b0:4864:20::a31]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jokPw-00054n-Pq for opensbi@lists.infradead.org; Fri, 26 Jun 2020 09:13:26 +0000 Received: by mail-vk1-xa31.google.com with SMTP id h190so2057615vkh.6 for ; Fri, 26 Jun 2020 02:13:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BRtZcu+jTfzMqwSnmvF+qwd44/1XvJuWGWXA4JGAAmI=; b=mF2dcmmKxsM8C/fxkp/F0Hj3mkPbHD1fZSkEZsUyTYQECbEbF5sGfB0wC6gPabuTpA jtxs6kl39n2tA+DuGkJZqW+pxCg7L/ylD9jqAP8aMtaRT/sAubbS90EzwTld8Qya9k5N Tuq8sLOV4M9kJJ042/lsvd7VIKYyU1CAkmPuy6J+I9uFY/gIVIPdDCMoylS/B2KFYhns CZxnk1+j0E+HSQgw2PVCk/rvv1VNCJMPT+y95q7RKmO7uSkNYe7T5S+mdXdmAVPResaP xF6ZVLpYNM2fDhnTOBUIx3pSBOgcO6fkwOXYnK++QZOnpn6B0dz2U6kE5GJ2VIlg9Bdt oZJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BRtZcu+jTfzMqwSnmvF+qwd44/1XvJuWGWXA4JGAAmI=; b=Hmld1c8cPuonUJ+i8DHVu612IwSOeO2lhFGPYfzUI5JvRSYCW977uI3jVUKcqlSfjl WJ8wMwVko9MyNoEl7S1A0SitA47TEHEo5xNnbEQ1erJ/utydwLHHGjZc+k8bfTyv+sz0 2ES/2itoEb5LmW3IH0CchDRxGtlTBFur6FB3h2RUEkhvoFP5OMea32fqAmstS1UKJVYG 37gv2K5ogSJQ+dM0yt7X2W3arUawoxg37jfdDYrD6qHaF9/k93sVLO5SqKegMLA30g7U gXASNkftbBtZ6g/m1zasybKWsFCibK8OizeuV13CAiTAZkXgysMTtdgZbCz17Ib/oGy/ HkZQ== X-Gm-Message-State: AOAM533Ccmx85yomJ89ujhujpjoQgtGG1cO8B9Ev1p7CnNXpYhAzBVNv eCptEiMDJuAb7frQPnxhDU/8fFvc X-Google-Smtp-Source: ABdhPJyX3Ic3WvD+J+eZn7id1BIZm9oumHzW0EinMRk329jQQyGrL/yDB/1umm8XjESHdeU0s37n6Q== X-Received: by 2002:aa7:85c6:: with SMTP id z6mr516690pfn.8.1593134778914; Thu, 25 Jun 2020 18:26:18 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id a12sm24490964pfr.44.2020.06.25.18.26.17 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 25 Jun 2020 18:26:18 -0700 (PDT) From: Bin Meng To: Atish Patra , opensbi@lists.infradead.org Subject: [PATCH v2 3/3] docs/platform: sifive_fu540: Update U-Boot instructions Date: Thu, 25 Jun 2020 18:26:04 -0700 Message-Id: <1593134764-16743-3-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1593134764-16743-1-git-send-email-bmeng.cn@gmail.com> References: <1593134764-16743-1-git-send-email-bmeng.cn@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200626_101306_185978_2A8BAD98 X-CRM114-Status: GOOD ( 18.90 ) X-Spam-Score: -2.1 (--) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:a31 listed in] [list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [bmeng.cn[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bin Meng MIME-Version: 1.0 Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Bin Meng U-Boot v2020.07 release adds SPL support to SiFive HiFive Unleashed. Update the doc to mention that detailed build instructions are in the U-Boot doc. This also adds detailed command line description to show how to boot U-Boot v2020.07 S-mode payload in the QEMU chapter. Signed-off-by: Bin Meng Reviewed-by: Atish Patra --- Changes in v2: - fix the typo in the doc docs/platform/sifive_fu540.md | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/docs/platform/sifive_fu540.md b/docs/platform/sifive_fu540.md index 9342846..1008432 100644 --- a/docs/platform/sifive_fu540.md +++ b/docs/platform/sifive_fu540.md @@ -41,13 +41,14 @@ make PLATFORM=sifive/fu540 FW_PAYLOAD_PATH=/arch/riscv/bo **U-Boot Payload** The command-line example here assumes that U-Boot was compiled using the -sifive_fu540_defconfig configuration and with U-Boot v2020.01 (or higher). - -The detailed U-Boot booting guide is avaialble at [U-Boot]. +sifive_fu540_defconfig configuration and with U-Boot v2020.01, and up to +v2020.07-rc3. ``` make PLATFORM=sifive/fu540 FW_PAYLOAD_PATH=/u-boot-dtb.bin ``` +For U-Boot v2020.07-rc4 or later releases, SPL support was added in U-Boot. +Please refer to the detailed U-Boot booting guide available at [U-Boot]. Flashing the OpenSBI firmware binary to storage media: ------------------------------------------------------ @@ -155,13 +156,37 @@ Linux kernel. When U-Boot v2020.01 (or higher) is used as the payload, as the SiFive FU540 DTB for the real hardware is embedded in U-Boot binary itself, due to the same reason above, we need to switch the U-Boot sifive_fu540_defconfig configuration -from CONFIG_OF_SEPARATE to CONFIG_OF_PRIOR_STAGE so that U-Boot uses the DTB -generated by QEMU, and u-boot.bin should be used as the payload image, like: +from **CONFIG_OF_SEPARATE** to **CONFIG_OF_PRIOR_STAGE** so that U-Boot uses the +DTB generated by QEMU, and u-boot.bin should be used as the payload image, like: ``` make PLATFORM=sifive/fu540 FW_PAYLOAD_PATH=/u-boot.bin ``` +U-Boot v2020.07 release added SPL support to SiFive HiFive Unleashed board, +hence a build error will be seen after you switch to **CONFIG_OF_PRIOR_STAGE**. + +``` +./tools/mkimage: Can't open arch/riscv/dts/hifive-unleashed-a00.dtb: No such file or directory +./tools/mkimage: failed to build FIT +Makefile:1402: recipe for target 'u-boot.img' failed +make: *** [u-boot.img] Error 1 +``` + +The above errors can be safely ignored as we don't run U-Boot SPL under QEMU. + +Run: +``` +qemu-system-riscv64 -M sifive_u -m 256M -nographic \ + -bios build/platform/sifive/fu540/firmware/fw_payload.bin +``` +or +``` +qemu-system-riscv64 -M sifive_u -m 256M -nographic \ + -bios build/platform/sifive/fu540/firmware/fw_jump.bin \ + -kernel /u-boot.bin +``` + While the real hardware operates at the 64-bit mode, it's possible for QEMU to test the 32-bit OpenSBI firmware. This can be helpful for testing 32-bit SiFive specific drivers.