From patchwork Fri May 1 15:50: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: 1281377 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=2001:470:142::17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; 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=lMm/G4fA; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49DGzK6Q9vz9sTH for ; Sat, 2 May 2020 01:54:53 +1000 (AEST) Received: from localhost ([::1]:48264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUY03-0002GW-KZ for incoming@patchwork.ozlabs.org; Fri, 01 May 2020 11:54:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUXwd-0005ku-OX for qemu-devel@nongnu.org; Fri, 01 May 2020 11:51:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUXwN-0006l9-U2 for qemu-devel@nongnu.org; Fri, 01 May 2020 11:51:19 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:37728) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUXwN-0006gd-Fi; Fri, 01 May 2020 11:51:03 -0400 Received: by mail-pf1-x441.google.com with SMTP id d184so1741676pfd.4; Fri, 01 May 2020 08:51:02 -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=CWtFn701sinBOxhOKzCgy46Wo8AsJsqHmA7csOwe7Hw=; b=lMm/G4fAT/Qor5DK8BtKiM9ko32mwIQkN6kqDk6eG5+zTjeWZUI+Clmf9SdUDWTY/O +UomSNo8tBWZ0qb8XqLYdJhUp824iJMKadbY1VkEDCvbki3yZfGeB5OSIGF8+ctJZrqs QxwIhBZlocca9UyW55RqqLfUYuVR6A2PPpfRhjeYj450aYTOdf3U2faHjdl9FdrMW0aT HyraH8GIOyChA3KXgmu2uBaTM4xbVzZaxuDbF3SqEG1PA17/3eHBC7C2V5fJH237doB7 V2MhFHK6oK+9qalYI6TtbNIO9C1e6n14VBacnYIIOdYhYfD0deGWpD5hlrpXZ3s4hZO0 4w+Q== 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=CWtFn701sinBOxhOKzCgy46Wo8AsJsqHmA7csOwe7Hw=; b=NhJan7CHR52qht8NQTa91szYbTYmv8nqz05ZFyqr5+DNFRnujkFrvfRygqf0hfdeQ6 k27SHfQz/sTZIxv0Y47Xz3Om7LKNWVsOZtXtDI+zHSjHWNlAAvkHIsW2UrX7+CiZuZhd afxuualohgrInB4EnzOrc5RgVz2wA7l5RyU4URomxKJkrdCBH4aV8TkZ1JddmC/duGsN rFjy4VmJiXgDRuhip0csa6KQ7r6Ifu4gY928B8V0B9dfRc23/yS2APzq1k3owch1y/lB 18mNqhRWcjMrCqz1ws3lh0mJXPVulq5pzox9BeRyPnS5gmwIqgwMqBJIAgE8whvrQ3hg vKvQ== X-Gm-Message-State: AGi0PuYCWPXv2AV7gu+zVKlHzQ1/8TphkpUNb0TojtVoMjHun0PvUF1X N7eny4zNUHxK5+UVawZmtoQ= X-Google-Smtp-Source: APiQypI2zJGN/pnqUl/l/G6wiLMnk7R/HgsMcjyHXFLD4h650u5tJnR9L2iBHL0NaB7Uv0pQUQY2ng== X-Received: by 2002:aa7:9345:: with SMTP id 5mr4788231pfn.145.1588348261642; Fri, 01 May 2020 08:51:01 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id e4sm2385968pge.45.2020.05.01.08.51.00 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 01 May 2020 08:51:01 -0700 (PDT) From: Bin Meng To: Alistair Francis , Bastian Koppelmann , Palmer Dabbelt , Sagar Karandikar , qemu-devel@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH 1/5] roms/opensbi: Update to support building bios images for generic platform Date: Fri, 1 May 2020 08:50:50 -0700 Message-Id: <1588348254-7241-2-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1588348254-7241-1-git-send-email-bmeng.cn@gmail.com> References: <1588348254-7241-1-git-send-email-bmeng.cn@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::441; envelope-from=bmeng.cn@gmail.com; helo=mail-pf1-x441.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2607:f8b0:4864:20::441 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bin Meng , Anup Patel Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng The RISC-V generic platform is a flattened device tree (FDT) based platform where all platform specific functionality is provided based on FDT passed by previous booting stage. The support was added in upstream opensbi recently. Bring the QEMU roms/opensbi submodule to the upstream opensbi commit: commit 4f18c6e55049 ("platform: generic: Add Sifive FU540 TLB flush range limit override") with the following changes since v0.7 release: 1bb00ab lib: No need to provide default PMP region using platform callbacks a9eac67 include: sbi_platform: Combine reboot and shutdown into one callback 6585fab lib: utils: Add SiFive test device 4781545 platform: Add Nuclei UX600 platform 3a326af scripts: adapt binary archive script for Nuclei UX600 5bdf022 firmware: fw_base: Remove CSR_MTVEC update check e6c1345 lib: utils/serial: Skip baudrate config if input frequency is zero 01a8c8e lib: utils: Improve fdt_parse_uart8250() API 0a0093b lib: utils: Add fdt_parse_uart8250_node() function 243b0d0 lib: utils: Remove redundant clint_ipi_sync() declaration e3ad7c1 lib: utils: Rename fdt_parse_clint() to fdt_parse_compat_addr() a39cd6f lib: utils: Add FDT match table based node lookup dd33b9e lib: utils: Make fdt_get_node_addr_size() public function 66185b3 lib: utils: Add fdt_parse_sifive_uart_node() function 19e966b lib: utils: Add fdt_parse_hart_id() function 44dd7be lib: utils: Add fdt_parse_max_hart_id() API f0eb503 lib: utils: Add fdt_parse_plic_node() function 1ac794c include: Add array_size() macro 8ff2b94 lib: utils: Add simple FDT timer framework 76f0f81 lib: utils: Add simple FDT ipi framework 75322a6 lib: utils: Add simple FDT irqchip framework 76a8940 lib: utils: Add simple FDT serial framework 7cc6fa4 lib: utils: Add simple FDT reset framework 4d06353 firmware: fw_base: Introduce optional fw_platform_init() f1aa9e5 platform: Add generic FDT based platform support 1f21b99 lib: sbi: Print platform hart count at boot time 2ba7087 scripts: Add generic platform to create-binary-archive.sh 4f18c6e platform: generic: Add Sifive FU540 TLB flush range limit override Update our Makefile to build the generic platform instead of building virt and sifive_u separately. Signed-off-by: Bin Meng Reviewed-by: Anup Patel --- roms/Makefile | 30 ++++++++---------------------- roms/opensbi | 2 +- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/roms/Makefile b/roms/Makefile index f9acf39..cb00628 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -64,10 +64,8 @@ default help: @echo " u-boot.e500 -- update u-boot.e500" @echo " u-boot.sam460 -- update u-boot.sam460" @echo " efi -- update UEFI (edk2) platform firmware" - @echo " opensbi32-virt -- update OpenSBI for 32-bit virt machine" - @echo " opensbi64-virt -- update OpenSBI for 64-bit virt machine" - @echo " opensbi32-sifive_u -- update OpenSBI for 32-bit sifive_u machine" - @echo " opensbi64-sifive_u -- update OpenSBI for 64-bit sifive_u machine" + @echo " opensbi32-generic -- update OpenSBI for 32-bit generic machine" + @echo " opensbi64-generic -- update OpenSBI for 64-bit generic machine" @echo " bios-microvm -- update bios-microvm.bin (qboot)" @echo " clean -- delete the files generated by the previous" \ "build targets" @@ -170,29 +168,17 @@ skiboot: efi: edk2-basetools $(MAKE) -f Makefile.edk2 -opensbi32-virt: +opensbi32-generic: $(MAKE) -C opensbi \ CROSS_COMPILE=$(riscv32_cross_prefix) \ - PLATFORM="qemu/virt" - cp opensbi/build/platform/qemu/virt/firmware/fw_jump.bin ../pc-bios/opensbi-riscv32-virt-fw_jump.bin + PLATFORM="generic" + cp opensbi/build/platform/generic/firmware/fw_jump.bin ../pc-bios/opensbi-riscv32-generic-fw_jump.bin -opensbi64-virt: +opensbi64-generic: $(MAKE) -C opensbi \ CROSS_COMPILE=$(riscv64_cross_prefix) \ - PLATFORM="qemu/virt" - cp opensbi/build/platform/qemu/virt/firmware/fw_jump.bin ../pc-bios/opensbi-riscv64-virt-fw_jump.bin - -opensbi32-sifive_u: - $(MAKE) -C opensbi \ - CROSS_COMPILE=$(riscv32_cross_prefix) \ - PLATFORM="sifive/fu540" - cp opensbi/build/platform/sifive/fu540/firmware/fw_jump.bin ../pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin - -opensbi64-sifive_u: - $(MAKE) -C opensbi \ - CROSS_COMPILE=$(riscv64_cross_prefix) \ - PLATFORM="sifive/fu540" - cp opensbi/build/platform/sifive/fu540/firmware/fw_jump.bin ../pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin + PLATFORM="generic" + cp opensbi/build/platform/generic/firmware/fw_jump.bin ../pc-bios/opensbi-riscv64-generic-fw_jump.bin bios-microvm: $(MAKE) -C qboot diff --git a/roms/opensbi b/roms/opensbi index 9f1b72c..4f18c6e 160000 --- a/roms/opensbi +++ b/roms/opensbi @@ -1 +1 @@ -Subproject commit 9f1b72ce66d659e91013b358939e832fb27223f5 +Subproject commit 4f18c6e55049d858c62e87d2605dd41c06956e4e From patchwork Fri May 1 15:50: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: 1281378 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=2001:470:142::17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; 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=ABeC/jY/; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49DGzL2C5Vz9sTP for ; Sat, 2 May 2020 01:54:54 +1000 (AEST) Received: from localhost ([::1]:48236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUY04-0002Fz-0m for incoming@patchwork.ozlabs.org; Fri, 01 May 2020 11:54:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUXwd-0005kt-GH for qemu-devel@nongnu.org; Fri, 01 May 2020 11:51:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUXwO-0006nZ-OQ for qemu-devel@nongnu.org; Fri, 01 May 2020 11:51:19 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:39327) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUXwO-0006jB-AL; Fri, 01 May 2020 11:51:04 -0400 Received: by mail-pg1-x541.google.com with SMTP id d3so4718776pgj.6; Fri, 01 May 2020 08:51: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=srawoezEgSmPn22VCIB6frZQfxQjs2PbeiLzmPf/rHs=; b=ABeC/jY/zQnBVtjU+9xWUvokPhNu+xhBrU8Ub8bNS4UA/+Jh0Ny4sRPzsjtrLFXItR zUk9vBGgCVfwoHYcQUmsjKzjVoo8GgCNhSeZh5SD8rSN8d9Qi1i/0nDrGN2uf99T1ZVk pSCV88q8ZKacDwN/aHXyWiWfQ2moTmxuWvv8EpnWiOF6xESozfJj+cpmnPS0aFiDloQ6 MjXaJZgZzEPQJw8zyTLvxp1e/JcjygqCb9jzM6bgsRJ+LHvM0mJeGvZjNSlIC94EcIvS +I+74i3ph6nAq3ZoEAKeGYfN6x25TmIt7uPG3OXGCiSELsqL7ZWGBrqeJRNRlyWNk1Dt qd8A== 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=srawoezEgSmPn22VCIB6frZQfxQjs2PbeiLzmPf/rHs=; b=qAYUCT2Al40hnSpxU/NGacpofl4G+mFs/89Spflzihfow1zrPjrUItH/L979AzoZZm wE755ueigiowwBEHBiqFXdKPzSdb2NGdz/na3FLtWncyegwsg8gKe98Q9AHtGdbAVluO Q1wXXkUU0caIl8DDj4+PAT/tywcPdFoZfZdq86tNgrO7VPlIZyQHv5lojFh/tj6lo1ZW KzoiJi2dehz+HdYH0VQdeTtK9+i6K8K0MABLsAFWmyLkpKfc04qseaBNaWW8MMZ0E5a9 TsX/h6WRKxMbPFQfAScD/Zfw6pGraR6h1SNg55rXA2jm/J5lrHPqD4uZJEFQqvF0WzmZ Mi5w== X-Gm-Message-State: AGi0PuZuWNQ7tmBsj32izWwjByxv0u/zBcpjd9dzsFCfo7Bz+8nV/BCj tU2IS4RvGjfHCjqfjeTsago= X-Google-Smtp-Source: APiQypKVk6qQhterxBuBXLSX2nyvmoEnXlzEJbbZQSrXuanjxT06HVFqZiyxrIjiO9hI02FXX47BhQ== X-Received: by 2002:a05:6a00:12:: with SMTP id h18mr4672831pfk.293.1588348262588; Fri, 01 May 2020 08:51:02 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id e4sm2385968pge.45.2020.05.01.08.51.01 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 01 May 2020 08:51:02 -0700 (PDT) From: Bin Meng To: Alistair Francis , Bastian Koppelmann , Palmer Dabbelt , Sagar Karandikar , qemu-devel@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH 2/5] gitlab-ci/opensbi: Update GitLab CI to build generic platform Date: Fri, 1 May 2020 08:50:51 -0700 Message-Id: <1588348254-7241-3-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1588348254-7241-1-git-send-email-bmeng.cn@gmail.com> References: <1588348254-7241-1-git-send-email-bmeng.cn@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::541; envelope-from=bmeng.cn@gmail.com; helo=mail-pg1-x541.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2607:f8b0:4864:20::541 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bin Meng , Anup Patel Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng This updates the GitLab CI opensbi job to build opensbi bios images for the generic platform. Signed-off-by: Bin Meng Reviewed-by: Anup Patel --- .gitlab-ci-opensbi.yml | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci-opensbi.yml b/.gitlab-ci-opensbi.yml index dd051c0..26092bb 100644 --- a/.gitlab-ci-opensbi.yml +++ b/.gitlab-ci-opensbi.yml @@ -34,18 +34,12 @@ build-opensbi: when: always artifacts: paths: # 'artifacts.zip' will contains the following files: - - pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin - - pc-bios/opensbi-riscv32-virt-fw_jump.bin - - pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin - - pc-bios/opensbi-riscv64-virt-fw_jump.bin - - opensbi32-virt-stdout.log - - opensbi32-virt-stderr.log - - opensbi64-virt-stdout.log - - opensbi64-virt-stderr.log - - opensbi32-sifive_u-stdout.log - - opensbi32-sifive_u-stderr.log - - opensbi64-sifive_u-stdout.log - - opensbi64-sifive_u-stderr.log + - pc-bios/opensbi-riscv32-generic-fw_jump.bin + - pc-bios/opensbi-riscv64-generic-fw_jump.bin + - opensbi32-generic-stdout.log + - opensbi32-generic-stderr.log + - opensbi64-generic-stdout.log + - opensbi64-generic-stderr.log image: $CI_REGISTRY_IMAGE:opensbi-cross-build variables: GIT_DEPTH: 3 @@ -54,10 +48,6 @@ build-opensbi: - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1)) - echo "=== Using ${JOBS} simultaneous jobs ===" - make -j${JOBS} -C roms/opensbi clean - - make -j${JOBS} -C roms opensbi32-virt 2>&1 1>opensbi32-virt-stdout.log | tee -a opensbi32-virt-stderr.log >&2 + - make -j${JOBS} -C roms opensbi32-generic 2>&1 1>opensbi32-generic-stdout.log | tee -a opensbi32-generic-stderr.log >&2 - make -j${JOBS} -C roms/opensbi clean - - make -j${JOBS} -C roms opensbi64-virt 2>&1 1>opensbi64-virt-stdout.log | tee -a opensbi64-virt-stderr.log >&2 - - make -j${JOBS} -C roms/opensbi clean - - make -j${JOBS} -C roms opensbi32-sifive_u 2>&1 1>opensbi32-sifive_u-stdout.log | tee -a opensbi32-sifive_u-stderr.log >&2 - - make -j${JOBS} -C roms/opensbi clean - - make -j${JOBS} -C roms opensbi64-sifive_u 2>&1 1>opensbi64-sifive_u-stdout.log | tee -a opensbi64-sifive_u-stderr.log >&2 + - make -j${JOBS} -C roms opensbi64-generic 2>&1 1>opensbi64-generic-stdout.log | tee -a opensbi64-generic-stderr.log >&2 From patchwork Fri May 1 15:50: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: 1281380 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=2001:470:142::17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; 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=N7RJoGZH; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49DH1g3cvjz9sTH for ; Sat, 2 May 2020 01:56:55 +1000 (AEST) Received: from localhost ([::1]:55108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUY20-0005yr-Ff for incoming@patchwork.ozlabs.org; Fri, 01 May 2020 11:56:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUXwe-0005mG-E4 for qemu-devel@nongnu.org; Fri, 01 May 2020 11:51:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUXwP-0006pl-K6 for qemu-devel@nongnu.org; Fri, 01 May 2020 11:51:20 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:38321) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUXwP-0006lK-4O; Fri, 01 May 2020 11:51:05 -0400 Received: by mail-pf1-x444.google.com with SMTP id y25so1741185pfn.5; Fri, 01 May 2020 08:51:04 -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=ylx/pEFyvBSzuAmPVOtbxB6kgH6sZM8QUMYekIzs/aY=; b=N7RJoGZHPd/sT2zyDo2JpkYjMwCSI5Tf4r6xFeFEytxWE1ftjQQmmeIGRAkfu/Wbsn VBKwNwIAqieRLuhQOVNK9W1QFoyu1vFBVbV7JyaaPCZUGc/dRC9Vy4p92NfaqbXEVUt3 /KcfzoVLw6LSY4sNPNaDMGLcYnRLmlm0YmRMrZleCOQ8LAST+jDInXBS+Rh0BCwegOy1 vgCTXwlhdYKLMn5H7s8INNDD9bdimvoRAuWkZ2ABkAdhtqUY/aXBrGBRRAO6tyCOyikC UvNvxxbIAaUtwYD2lGd1DdSD4n3BmGudzfBdXk85kc1IwAuYWCsuu9x+wHkukWaZKGUx 9rkw== 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=ylx/pEFyvBSzuAmPVOtbxB6kgH6sZM8QUMYekIzs/aY=; b=oij08kSt1SjoTVGzNye/r1QjeOtwgfiDc27pwNoKm4zZfdPkwefWz7FZ1PYcQY8g7v J+gb61vjh2YGGkANzxl9b3OIVhgVLMlFqzK8uG23zk5VnmpxuGajLLwkS71NKKP3gZcU h9l/ZbPt8tAToVtpMLZ5Pe9j61ECaiOfRXoXNNxsX445Df1H0r0kdCjJvhrL7GEqFXmI u+FTUX1WemjFtQ/cjPHTTo6IueybrtQeK0wS1iSJa6OuoCy2WmmucvEyru1/qe/vB8DH Irb/xbZR47H4tKTOuw8qW/7Hk9KbzihXY73sKfGm7zqyaD8XinjpdIN32ab+1p+IQW0F Gcvg== X-Gm-Message-State: AGi0PuYlPN1NkHuOkUp8GXHUQdD7NJsIpdQNnL+6lcbCPwN/DofA6s5t 3i/DQWbfjTpS4aJMI+aB5lA= X-Google-Smtp-Source: APiQypI1Pal54Zi+k3sS7Jsaw5WnOsQP0id5eiYJFD223tTwl93iFVo8/KhOc9QGLZFSzzXr/9pJwg== X-Received: by 2002:aa7:8b15:: with SMTP id f21mr4709179pfd.72.1588348263483; Fri, 01 May 2020 08:51:03 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id e4sm2385968pge.45.2020.05.01.08.51.02 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 01 May 2020 08:51:03 -0700 (PDT) From: Bin Meng To: Alistair Francis , Bastian Koppelmann , Palmer Dabbelt , Sagar Karandikar , qemu-devel@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH 3/5] riscv: Use pre-built bios image of generic platform for virt & sifive_u Date: Fri, 1 May 2020 08:50:52 -0700 Message-Id: <1588348254-7241-4-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1588348254-7241-1-git-send-email-bmeng.cn@gmail.com> References: <1588348254-7241-1-git-send-email-bmeng.cn@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::444; envelope-from=bmeng.cn@gmail.com; helo=mail-pf1-x444.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2607:f8b0:4864:20::444 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bin Meng , Anup Patel Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng Update virt and sifive_u machines to use the opensbi bios image built for the generic FDT platform. Remove the out-of-date no longer used bios images. Signed-off-by: Bin Meng Reviewed-by: Anup Patel Reviewed-by: Alistair Francis --- hw/riscv/sifive_u.c | 4 ++-- hw/riscv/virt.c | 4 ++-- pc-bios/opensbi-riscv32-generic-fw_jump.bin | Bin 0 -> 58032 bytes pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin | Bin 49520 -> 0 bytes pc-bios/opensbi-riscv32-virt-fw_jump.bin | Bin 49504 -> 0 bytes pc-bios/opensbi-riscv64-generic-fw_jump.bin | Bin 0 -> 66680 bytes pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin | Bin 57936 -> 0 bytes pc-bios/opensbi-riscv64-virt-fw_jump.bin | Bin 57920 -> 0 bytes 8 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 pc-bios/opensbi-riscv32-generic-fw_jump.bin delete mode 100644 pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin delete mode 100644 pc-bios/opensbi-riscv32-virt-fw_jump.bin create mode 100644 pc-bios/opensbi-riscv64-generic-fw_jump.bin delete mode 100644 pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin delete mode 100644 pc-bios/opensbi-riscv64-virt-fw_jump.bin Binary files a/pc-bios/opensbi-riscv64-virt-fw_jump.bin and /dev/null differ diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c index bed10fc..cf015cc 100644 --- a/hw/riscv/sifive_u.c +++ b/hw/riscv/sifive_u.c @@ -58,9 +58,9 @@ #include #if defined(TARGET_RISCV32) -# define BIOS_FILENAME "opensbi-riscv32-sifive_u-fw_jump.bin" +# define BIOS_FILENAME "opensbi-riscv32-generic-fw_jump.bin" #else -# define BIOS_FILENAME "opensbi-riscv64-sifive_u-fw_jump.bin" +# define BIOS_FILENAME "opensbi-riscv64-generic-fw_jump.bin" #endif static const struct MemmapEntry { diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index daae3eb..0c00d93 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -46,9 +46,9 @@ #include #if defined(TARGET_RISCV32) -# define BIOS_FILENAME "opensbi-riscv32-virt-fw_jump.bin" +# define BIOS_FILENAME "opensbi-riscv32-generic-fw_jump.bin" #else -# define BIOS_FILENAME "opensbi-riscv64-virt-fw_jump.bin" +# define BIOS_FILENAME "opensbi-riscv64-generic-fw_jump.bin" #endif static const struct MemmapEntry { diff --git a/pc-bios/opensbi-riscv32-generic-fw_jump.bin b/pc-bios/opensbi-riscv32-generic-fw_jump.bin new file mode 100644 index 0000000..dc39398 Binary files /dev/null and b/pc-bios/opensbi-riscv32-generic-fw_jump.bin differ diff --git a/pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin b/pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin deleted file mode 100644 index 3e0da54..0000000 Binary files a/pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin and /dev/null differ diff --git a/pc-bios/opensbi-riscv32-virt-fw_jump.bin b/pc-bios/opensbi-riscv32-virt-fw_jump.bin deleted file mode 100644 index bc56ed6..0000000 Binary files a/pc-bios/opensbi-riscv32-virt-fw_jump.bin and /dev/null differ diff --git a/pc-bios/opensbi-riscv64-generic-fw_jump.bin b/pc-bios/opensbi-riscv64-generic-fw_jump.bin new file mode 100644 index 0000000..c8f209a Binary files /dev/null and b/pc-bios/opensbi-riscv64-generic-fw_jump.bin differ diff --git a/pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin b/pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin deleted file mode 100644 index 1acee86..0000000 Binary files a/pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin and /dev/null differ diff --git a/pc-bios/opensbi-riscv64-virt-fw_jump.bin b/pc-bios/opensbi-riscv64-virt-fw_jump.bin deleted file mode 100644 index c62f2b4..0000000 From patchwork Fri May 1 15:50:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1281374 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=2001:470:142::17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; 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=PP9Hbrr/; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49DGwz2cJsz9sSG for ; Sat, 2 May 2020 01:52:51 +1000 (AEST) Received: from localhost ([::1]:39898 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUXy5-0006Db-1O for incoming@patchwork.ozlabs.org; Fri, 01 May 2020 11:52:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUXwe-0005mk-Lu for qemu-devel@nongnu.org; Fri, 01 May 2020 11:51:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUXwQ-0006rU-Ad for qemu-devel@nongnu.org; Fri, 01 May 2020 11:51:20 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:45950) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUXwP-0006nh-Sw; Fri, 01 May 2020 11:51:05 -0400 Received: by mail-pl1-x642.google.com with SMTP id u22so3765440plq.12; Fri, 01 May 2020 08:51:05 -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=WrvmKTGX/CX3RpsyigZdEeijEnWRcSxW4YeYCjRcA5s=; b=PP9Hbrr/FqPDEBZUCi1vvua/oqtzpdR806p1kmtmCawzKe1vYke0LGUGPUaaEuZ+PO tp/PGfKqHi8lZL/uBzXOuUyV4mwdpAk5K/j4s4/iBzIJ5BsNXuy6DVdnfT947c+rrZWc k/DXOzV48fAD+Rg9yIYDbWQZjM3onEh8Wy/MhvCfjA7RySMn5EHX3u39aPO/bgT4rZF2 RvevVgRwrDaFI/MxtxPZgt6NtPr9dZFPyvCTb74W0VPtKW0GVKhIhFpffgwNgI5/gCzC IeQmWCxIDL6+9jQXI5ayufnU6a6TKh9bdA64XVMILFs36py03HlKPm1g7D1BajaECRkj x8bA== 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=WrvmKTGX/CX3RpsyigZdEeijEnWRcSxW4YeYCjRcA5s=; b=coGnt3qva15kfUaz53jFexgIweRpyYq3TTCZEbArDggf/mMpwJpXUf1aff/o/1x/CM xJod9wUa2xobHctXv9W/KwmyxkkOOJB7XjaZGeJ2/+6MQye0m686sU48qa/I4SFQAtDS CBHMRKR6SJ/htH5bRe78mPTuKn5uqS91V8DXSs61AvxtXjDg7Ir2poDh5ryGrFSQ1oqO AlcebWKl3qx2c+Q58oHiWZyT45P7PVAA9je3ZTW30/p4uNCDWeue1cw9113n2C++Oq+z noyZHez+wgs5T/GFt/mWsaIrmGfD4TzKM3ST83OpCOVp9UEAFetLePLPoFjvDJgz50oz K8Pw== X-Gm-Message-State: AGi0PuYE0VEKSDmMi0TfoM2LVMB2SJh7H/OLZJdQooUEPCNLjhAOBBw9 IxNVlLYtka041CsbQIykQLc= X-Google-Smtp-Source: APiQypJTKuL0ox5D3gQO7sAq7oKs6A7YLyJUW3U2IyDEb7wH+UlVJ5K+vPbUYxKi8eL7d8eXz8yVdA== X-Received: by 2002:a17:90a:a484:: with SMTP id z4mr271357pjp.40.1588348264323; Fri, 01 May 2020 08:51:04 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id e4sm2385968pge.45.2020.05.01.08.51.03 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 01 May 2020 08:51:03 -0700 (PDT) From: Bin Meng To: Alistair Francis , Bastian Koppelmann , Palmer Dabbelt , Sagar Karandikar , qemu-devel@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH 4/5] riscv/spike: Change the default bios to use generic platform image Date: Fri, 1 May 2020 08:50:53 -0700 Message-Id: <1588348254-7241-5-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1588348254-7241-1-git-send-email-bmeng.cn@gmail.com> References: <1588348254-7241-1-git-send-email-bmeng.cn@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::642; envelope-from=bmeng.cn@gmail.com; helo=mail-pl1-x642.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2607:f8b0:4864:20::642 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bin Meng , Anup Patel Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng To keep sync with other RISC-V machines, change the default bios to use generic platform image. While we are here, add some comments to mention that keeping ELF files here was intentional. Signed-off-by: Bin Meng Reviewed-by: Anup Patel Reviewed-by: Alistair Francis --- hw/riscv/spike.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c index d0c4843..6f26fcf 100644 --- a/hw/riscv/spike.c +++ b/hw/riscv/spike.c @@ -45,10 +45,15 @@ #include +/* + * Not like other RISC-V machines that use plain binary bios images, + * keeping ELF files here was intentional because BIN files don't work + * for the Spike machine as HTIF emulation depends on ELF parsing. + */ #if defined(TARGET_RISCV32) -# define BIOS_FILENAME "opensbi-riscv32-spike-fw_jump.elf" +# define BIOS_FILENAME "opensbi-riscv32-generic-fw_jump.elf" #else -# define BIOS_FILENAME "opensbi-riscv64-spike-fw_jump.elf" +# define BIOS_FILENAME "opensbi-riscv64-generic-fw_jump.elf" #endif static const struct MemmapEntry { From patchwork Fri May 1 15:50:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1281375 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=2001:470:142::17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; 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=CEp8CmDk; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49DGxY3l2vz9sTP for ; Sat, 2 May 2020 01:53:21 +1000 (AEST) Received: from localhost ([::1]:42474 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUXyZ-0008Ej-5t for incoming@patchwork.ozlabs.org; Fri, 01 May 2020 11:53:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59856) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUXwf-0005nd-0k for qemu-devel@nongnu.org; Fri, 01 May 2020 11:51:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUXwR-0006tV-4G for qemu-devel@nongnu.org; Fri, 01 May 2020 11:51:20 -0400 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:38257) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUXwQ-0006q0-Nn; Fri, 01 May 2020 11:51:06 -0400 Received: by mail-pj1-x1044.google.com with SMTP id t40so50239pjb.3; Fri, 01 May 2020 08:51:06 -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=uJA64DlQQdrU8SYfFsnJOCDlr49qq6ib4zkHrW6VhfQ=; b=CEp8CmDk6tx20ddYF82vHMNF9CTQXidBPpS/lHJFy68sAE0dyAZu70UkcPZf2Lcyev 7ziQe9M2Phke+v4Ixc85szz7dDK4wkmR+KlHs447TFEy1uFO1S9YU36/Hxo3AdWt57DY l04mTnT6NNSyJTAcP4dK75Gx8m8lHYFab5Te3sF3dUpp4awcYtgxnWN9Jf7kdznOr7gn ZLuQnx/8icxA3tGrnmFBnajoAHzwRnml3FI6nw7CQQbWIi1RgzAXr840UjwhGNnJXW8j YYwiP5L5Z0JxBv8IDyRWIIPHLayEU3Cyfwm+uTUi5A+CWQoIOr7Ty+j26V+hGn6eIL1S HYow== 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=uJA64DlQQdrU8SYfFsnJOCDlr49qq6ib4zkHrW6VhfQ=; b=mdyPrRQ7p6f+kewXXLhekuO1Ss0LLYXTD7DCDwi4LaFFdoudyskc2dxUAvTRdwTc8j WrW0wlj+D+2SWg6bLj0QMI2DBfEO5oDqduxHGKrzPa5NvLwi6ybLZ2WXRPqYBx+VhLh0 a/HdcdDKfP7EnW8YeJu3V9RlKf8Wk4amn2vElPrNLJImpnxXjb/FQOVSwhkqW+Dyei51 oYr4tEbMllRnPlnT0JsupG1YbLtF/yo41AA1Kv2dj4ohUGu0QP+NI2w3hMUXZGau+7qK xDCqMgUw+XcmtVcSm9s+a6qpMj2Zu422ugv83v8BO2pet+u1LaCpWFsQ6q+1gUXTy1Fu qhZg== X-Gm-Message-State: AGi0PuZigpMy9fpNDzV8cKFXRutzwfyFqRJ40mVOZbuj1jhRTRqLnYNH JhPXYgZZWaHLNhYbzkYFfPk= X-Google-Smtp-Source: APiQypLtUQsDePBjvuswL+LESlQP370heeRUBhiQc604bLer/K2q3ms6SAbC8BFPGYo+lGeJUKbUJQ== X-Received: by 2002:a17:90a:1743:: with SMTP id 3mr267938pjm.106.1588348265175; Fri, 01 May 2020 08:51:05 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id e4sm2385968pge.45.2020.05.01.08.51.04 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 01 May 2020 08:51:04 -0700 (PDT) From: Bin Meng To: Alistair Francis , Bastian Koppelmann , Palmer Dabbelt , Sagar Karandikar , qemu-devel@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH 5/5] riscv: Suppress the error report for QEMU testing with riscv_find_firmware() Date: Fri, 1 May 2020 08:50:54 -0700 Message-Id: <1588348254-7241-6-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1588348254-7241-1-git-send-email-bmeng.cn@gmail.com> References: <1588348254-7241-1-git-send-email-bmeng.cn@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::1044; envelope-from=bmeng.cn@gmail.com; helo=mail-pj1-x1044.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2607:f8b0:4864:20::1044 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bin Meng , Anup Patel Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Bin Meng We only ship plain binary bios images in the QEMU source. With Spike machine that uses ELF images as the default bios, running QEMU test will complain hence let's suppress the error report for QEMU testing. Signed-off-by: Bin Meng Reviewed-by: Anup Patel --- hw/riscv/boot.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/hw/riscv/boot.c b/hw/riscv/boot.c index b76b2f3..adb421b 100644 --- a/hw/riscv/boot.c +++ b/hw/riscv/boot.c @@ -65,9 +65,17 @@ char *riscv_find_firmware(const char *firmware_filename) filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, firmware_filename); if (filename == NULL) { - error_report("Unable to load the RISC-V firmware \"%s\"", - firmware_filename); - exit(1); + if (!qtest_enabled()) { + /* + * We only ship plain binary bios images in the QEMU source. + * With Spike machine that uses ELF images as the default bios, + * running QEMU test will complain hence let's suppress the error + * report for QEMU testing. + */ + error_report("Unable to load the RISC-V firmware \"%s\"", + firmware_filename); + exit(1); + } } return filename;