From patchwork Tue Jun 23 09:56:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1316751 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=Vy9mRSMV; 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=mGGUKRx9; 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 49srFn5YZfz9sSJ for ; Thu, 25 Jun 2020 16:48:45 +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=DzVJDIURYCtOysuPQNsk4cN4DTbF3HwUEnS2zT2fEEU=; b=Vy9mRSMVBtXW1thlLTabM7VNxV GrqD7dx7QY11kR/0rFIJtuSTsghdYs9UXdnjlg4N0CxiQzNih88/UH71tu98QDCEqdPyOOFoWK/Qd IteKYLIeB/+m8Yunid0Tp2zKTesDZc47ykuCDOWhBogGjtd+xop/ciFm8O80HEZIz/uxE990zB3Xy nFyeheSwNh5IR68NsdrfggGe29pEagluYqUReZFG7mUe3WUTb86JoAPkSKsAirfyDERMv3SQUyFHm DScqQN5dMFhdNLQYpc4nf9qkIx4K+VVImBTNQrkRZJViV8g0z15AXayRjQu1oY1hnr6PU7oByHSBD 5AHgbxHg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1joLge-0001Yz-2o; Thu, 25 Jun 2020 06:48:40 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnffp-0008Fm-0O for opensbi@lists.infradead.org; Tue, 23 Jun 2020 09:57:02 +0000 Received: by mail-pl1-x62c.google.com with SMTP id y17so8907653plb.8 for ; Tue, 23 Jun 2020 02:56:59 -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=slDGWB6GonkCNOBQWUc+IL7dZeVRMI71nwMNR7rGT+U=; b=mGGUKRx91CtrbTusYQMjUxudFUtnGqw8NcXK8fYhkIp4YhpKc8Y9GMPsm+nIEzj7qc QWZLiG1Km3ku+NXCK5aro3vuDuzmkcXFGavqxXbTsUJROgIuXQL8ERoFR/PwJf1d6032 dbVHBNnXSoeT0XBDHYE/ypfel3Q+Lzrwh7qwBmsJuOZ0k40wxJqakW2uUcLMUcmNxWnI NCSF02Wao2G0cUgpvpDkpvkCYluJx753qI3CqdlMrYHysCDQFKghgmrGzJ9NDQBX/ns4 CVLe3/uyzzITID71EnSMhPlaaZ9gcWoyhbxB2Fxzg2GcM75FJuCA0CdPvdK13X+rH8Zu ZcNQ== 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=slDGWB6GonkCNOBQWUc+IL7dZeVRMI71nwMNR7rGT+U=; b=ivM426nV/9n1stzZaGapxHsUXFQ50gxOt64jML5Kk4dH7pExPKAwJibp7o+3bSYMgd hYI2HiQ00xbVfpcWumue2IcAaXdd93JbYE0sS/rNBxRS8S6mUCfVwELqQQrUwjKxuOzi Q/xfU823vk3Nf3AyWs7q76vnEQi30ChSQGLhQLMe+dEI9FTBH9Xw+prLgGfsyBVbbPFQ mVvL+XtZiDAXsJYosux2b9SeFnMxENFuqG6ARBCgoQHVAMVfbvY5wa0waMiOzJwVMxGv 3Pa1G6rwINrjJFoDoYDQqwVCN2jzh5EY2y9AhRwQaD1OFiFxj0LJjg1Gs7SUoaitupiq AtWg== X-Gm-Message-State: AOAM532THGvd233u6sJJsQEIiVwYfxAcN69VfvKvdI4rIxKRmniN2xNF nwQMKwPIOFV50atL38W6ynI= X-Google-Smtp-Source: ABdhPJyRulHXleExgkDhc5DeS2u+oZtsBTxDe74SLjkiUwa0leunUQG57Oi9YFYEGRJe40Eem1y0Wg== X-Received: by 2002:a17:90a:d487:: with SMTP id s7mr22203012pju.37.1592906217510; Tue, 23 Jun 2020 02:56:57 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id mw5sm2014248pjb.27.2020.06.23.02.56.56 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 23 Jun 2020 02:56:57 -0700 (PDT) From: Bin Meng To: Anup Patel , opensbi@lists.infradead.org Subject: [PATCH 1/3] docs/platform: Update QEMU parameter for fw_payload Date: Tue, 23 Jun 2020 02:56:50 -0700 Message-Id: <1592906212-13711-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:62c listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [bmeng.cn[at]gmail.com] -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-Mailman-Approved-At: Thu, 25 Jun 2020 02:48:36 -0400 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 --- 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 Tue Jun 23 09:56:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1316752 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=15bOwK54; 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=CUpJ3g9h; 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 49srFq3YSwz9sSt for ; Thu, 25 Jun 2020 16:48:47 +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=fA4JTcGMJUntVztFwzpTH2L07wBgkXawl+rIgHM1Tso=; b=15bOwK54ZUoOSbrqmJyyUpzOLp Ecxs5/aisSJWkNVsborm2WN6GTjckc3SB0xZKlqSnlznytT0N7CyGV72Ok3zeMUh2sqeKjwsNWOic v/tBzzq9Lo2w4bQ80eOCIcvEdtr3gF+zqOtbpusAr6VsHGKim6o7l7HaP29f1gX0oavDQ4A3VFxqT lQ7quvqN1e8EZP4+spbWsoRNXdnwGETkHX9ug5FELnGNaG5Th/B01ZYpL5GGyUK86zMLd5BdxYPyI o1n+qOy4C4R1xY2FDkmdMoJfQAe8eMr7uY3t5T67HiAJxaEeIy43UyZsShx2bbYAASZcDvFAsfale GW0UTCXw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1joLgf-0001Zk-0N; Thu, 25 Jun 2020 06:48:41 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnffp-0008G0-Kn for opensbi@lists.infradead.org; Tue, 23 Jun 2020 09:57:03 +0000 Received: by mail-pf1-x433.google.com with SMTP id q17so2660105pfu.8 for ; Tue, 23 Jun 2020 02:56:59 -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=vFAoac5xvP+AXCAjpqXWLtg0F42Fpzx9o7J3L8rgwQk=; b=CUpJ3g9hVBhcgmoXpUmOkAVTQKXOeGxMPFOIluBSyMVzN8bnZjCxe2+cYVNs/tM/0y aomcFVCHj0yrjCUUqLhDK3xMCHLtOvzWjHNggU5dvvu008YAGrrcUp/mdMVy3LZbmJa9 AxV8gSnaI7+0RXhs1XAAo8tz7fUSOC5V8qviTETKuwzdZoacQf5QtKL9mzsQ8k4kzTW9 VBuH95V4nS3eBU1xTZDK8eUVhvNro8Q9iIGBMGu/LsGOusc8qVTdd2+6XtpzbjeR1BG4 t2bskiGWqhrtvvSv/WHFnwET3T1VVgiiDAqGtujG0R3ae3RxrfvLMrLfcZQvDiWdUGcW Ibgg== 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=vFAoac5xvP+AXCAjpqXWLtg0F42Fpzx9o7J3L8rgwQk=; b=qpeFogPf35kZp3OTWa1uMVChafhFuGLyW/cfMePS8Cq2UaQpOa5EDQWdTllgitkctD 43YerT7B71JkprF24DjzfDgTPb4CE7GrWqwXksIHD7yF4/y4clwrDa3hHoFZ/hFQDHPf 9+0tV0Bjm/7na9V64n4dRzL8XTDz8gUqrVkS1WN/dNcVbzQgbZbKPhgatGMlQyC570Yq PKOZ37AJTgWjSpnQtRtsVkN/+5jCwZnstVrRM5r4s5PX8qEyrdzH+TkSePsVgKtSOJr3 zcOc3+0x+AQlnVKbyV8X7KpsW6sEOobtM8K29NneyZF759r67zMDfgustYYUB9Kygccj Zstg== X-Gm-Message-State: AOAM531mhqLJaSIPNHK9e9lYOIUQEdJ/2Y+9d0KKcM8JPojETFnL76p/ HJl9FWTvQRvC7Kldh2Dslmj/CTx1 X-Google-Smtp-Source: ABdhPJyqCC7Ov98G/yZ0LJAONYn0L93b41L5xCmjxdnMeh6gfyCuD/spV4W36R7ZUqIZHiIFLVtLDg== X-Received: by 2002:a62:1c8a:: with SMTP id c132mr25011751pfc.69.1592906218203; Tue, 23 Jun 2020 02:56:58 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id mw5sm2014248pjb.27.2020.06.23.02.56.57 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 23 Jun 2020 02:56:57 -0700 (PDT) From: Bin Meng To: Anup Patel , opensbi@lists.infradead.org Subject: [PATCH 2/3] config.mk: Update QEMU run command for generic and sifive fu540 platforms Date: Tue, 23 Jun 2020 02:56:51 -0700 Message-Id: <1592906212-13711-2-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1592906212-13711-1-git-send-email-bmeng.cn@gmail.com> References: <1592906212-13711-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:433 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [bmeng.cn[at]gmail.com] -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-Mailman-Approved-At: Thu, 25 Jun 2020 02:48:36 -0400 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 --- 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 Tue Jun 23 09:56:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1316750 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=Jq5iGKCu; 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=mtBxYYYD; 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 49srFm6rCXz9sRf for ; Thu, 25 Jun 2020 16:48:44 +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=4eNbcsvABt14YkljpA+fRvLP9MkE7mgoJnbftTKBfB4=; b=Jq5iGKCuWe5t1wfdJD5FS4Xg/l I9y3m+1JhQCfKGfN4FJv1q2PVmVT+uy3VNvmWwMgWXDYBBM8JYXR1Zc1i89KCHWf2UsaiJAOr0mv+ wpm7f0Dxodqpfbd6sEgmNFVcxE96gfUZtIcK4GCTj30ftJLFLXaxPwx5MYa2sJu9Bw3imm6C45HWj VvoVo2mXoKNFCMxKp6IrkYQHn2hdxjuDquiVGVdE1hu8Ygl7gEEmF6/Pe9eXyAh1ipLlR39s+mQkM lfljgLpAsVbd7q9itcG6ZvKIXvic+5NY3ig5rHzLhC1C2VqXqYb1+Z+6VmEmvkRMGA2K498Z6fbix gycMmvaw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1joLgd-0001Y5-27; Thu, 25 Jun 2020 06:48:39 +0000 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnffp-0008GG-2E for opensbi@lists.infradead.org; Tue, 23 Jun 2020 09:57:02 +0000 Received: by mail-pg1-x52d.google.com with SMTP id p3so6950038pgh.3 for ; Tue, 23 Jun 2020 02:57:00 -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=sK0gvzoBDYpAbueQ2bGRHTUfT9hkJ4pEVMAkURsHX+Q=; b=mtBxYYYDgSiOgDWNm69wJKRsDgD4PIzhKLrOnvhO6HzT/VH0CdLL/3A7jxQC/M81nC RW+y6d1C/BzgTVGcN6ocyZSNFQLjCIXJ+0uv2lTbbyPLIEFj0WrnU35m6vjr1Khnww6a MAvn6+v05ys3tR/oHXxo8rFJO3cF7Q1iG5Gc6gW9Y6zECV9/zgepv7cVMtX152ZJkJYZ 7b58tc77qI8AxkoUlakGWQ9W2mfX17eYKprZLvmS7oc33qHgM3tl4EeCs/Kht7sYxypJ f7Pnj7+SVEsVPV3zjceJzzQSFS59/Hxryr7oqV3DcMXRfvsMsjNQjFMf40wIBwKPzPRJ gduw== 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=sK0gvzoBDYpAbueQ2bGRHTUfT9hkJ4pEVMAkURsHX+Q=; b=YcmN/MINiz4f3V/GbplLDqHvxSAJCfUFIZrmFkKKSG3m5K8/gXRuXlbLG51WIOkXuw Z8nDbFr9Hebv0ZPw5MyRNvFQC9bKRleeAIdyH0dJhPXjRK5mmDQOHYPO76qG44RYhDcc o41Ds2Oj2uGpa02Gzkena1uwdsC8OVMNJEHgx6oD678Qr1xjIHLg4C95F/XUN3IWNuQE Xrl9EN11W0eFnXdK1vwfaD1Q6IuWDIojzomFtosWWcQX1DgXbuora6fShmMNc0/kgsP1 +G2xZUZDbZhxsLnnhTpDvUzYSBZs6Rs3SOmkvz6etUXQT8OOfGA+Bq2UML7EymVAWwPX AKLw== X-Gm-Message-State: AOAM533lMlCqyvcrgDbLrA+WaPE4nluYwSueItJbXED3URsuPtrvO9S7 dI24FKIsItfuIXs0lakccVA= X-Google-Smtp-Source: ABdhPJzqqYnDhjAMjtVR/m32DFhw51xEY/CzTao0fxkqnamhmLUL/XwJzTqFm2CsvQwRew6MC9BoMQ== X-Received: by 2002:aa7:9738:: with SMTP id k24mr22877101pfg.44.1592906219008; Tue, 23 Jun 2020 02:56:59 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id mw5sm2014248pjb.27.2020.06.23.02.56.58 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 23 Jun 2020 02:56:58 -0700 (PDT) From: Bin Meng To: Anup Patel , opensbi@lists.infradead.org Subject: [PATCH 3/3] docs/platform: sifive_fu540: Update U-Boot instructions Date: Tue, 23 Jun 2020 02:56:52 -0700 Message-Id: <1592906212-13711-3-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1592906212-13711-1-git-send-email-bmeng.cn@gmail.com> References: <1592906212-13711-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:52d listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [bmeng.cn[at]gmail.com] -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-Mailman-Approved-At: Thu, 25 Jun 2020 02:48:36 -0400 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 --- 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..31bdf09 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 avaialble 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.