Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2219383rwd; Fri, 26 May 2023 03:38:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6CSJ56U/YXLR//m2GnOPEZYptu60oK2RtFw3MsG7IDu7Kxj1kGTAH++9JylQoZn3YClcze X-Received: by 2002:a05:6a20:158a:b0:ee:f290:5b5e with SMTP id h10-20020a056a20158a00b000eef2905b5emr1640091pzj.43.1685097534380; Fri, 26 May 2023 03:38:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685097534; cv=none; d=google.com; s=arc-20160816; b=So5+FtNzUKz0O/LC7ldw6CClCb8tSysbaj905FCZ44Qs2RdQ4hLtjO9ZAg7jRwT5Tg 9iq9KgMums2b+62vjLOU2prV6OucFSTnQ3Ilq8GesSKOYuBgkAloMMKPbU0PmtBUP8IG obQBVG9ooZLNoxdKRTRxGu7SBLUUgJvo1KVsaPGtoqK/CtaQBiu/FrowP4x0yxLy5pss E4wMgx0eV1zwmGKhbGY0wdWQ01LCtQTZGnG7fNTynC6T2SOlr+GdAcZLcRHW4aVbflgE Xo6XFt7HbfpTqTdMz7gadr/9yBlHZn5OuTMfSO/a3rIVBweH9hh+Ps172YiqISe43Xlk B3VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=2WVxC0Kd6He0focmctVNzxZG886RrbSXVndLzoHTY04=; b=cP8SJhRL7pquQ1JZUFQVLBCVP431SyQM1DSpz19OWfKNv9rcQanJbul4X5+c+J7njD +dWOT4/6E3r8yL+wZvOA8V2mQ+z+89BJ++iLgKYubBhxQC4F4c6ehLXHPTBhbNfEPYOw TR+FYTC1rBauRdfFMhJQniEVLj00wFqcB0h2NkqYu7Rc+WusPuRIJyn4dIszCcBC6qOW N1hcW6XpJd3cO3r5+ydzZgxmCTw+LyU6UUSXU4DO/0L1PhGW/R+wWPO/ReDFTgD3dedL 7Y29D8iKkI2tpwhrlvycsLzg7gGalleiqHydFa6Av8f0AZ+EAHQbFBClCa2ltHTlQtJc FXDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t4-20020a17090ad14400b002562a054821si1359061pjw.138.2023.05.26.03.38.40; Fri, 26 May 2023 03:38:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242996AbjEZKZo (ORCPT + 99 others); Fri, 26 May 2023 06:25:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236978AbjEZKZn (ORCPT ); Fri, 26 May 2023 06:25:43 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.67.158]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3ED3E46; Fri, 26 May 2023 03:25:25 -0700 (PDT) X-QQ-mid: bizesmtp85t1685096719te1p3ayz Received: from linux-lab-host.localdomain ( [119.123.130.80]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 26 May 2023 18:25:18 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: +ynUkgUhZJk/BOqp0oA9cBg1YsH89tL5W5qI5R9skNk3ZDlWFZ9Rn3nuDLHs6 r+jdJjJ6RsVhmT4f02tw/MUiR95J8ZHDs3wLyf7AK1WOAA4EIeTLghnosNldvidGC0l67Gg 2wYkd1Z5Tp0KBw74IMW4oY64DEXTsLZTXdoOMnfzfQfg3GspMKUW0w+aX/PB1XNeHKCJ7ki rKwLr5llWwScHgLl/T/iRZLUbfPOilCzMWy+UioDCh9PuWaWLKFbQ7RhzPSDtCYJ0tJYlnv QcwgLYeEKtu0tr1zpA4GKs/VRufTXnJiYTkUJXcC2xgJq1V6qzS/+WgbkejKpVxpTvwS0AE pTyFJWz+eWpelE0SrSj+8C6mQRZa5VcSQVR8AnV0Hdew0584nkZshTSqBqhgn8mgsYKynPR X-QQ-GoodBg: 0 X-BIZMAIL-ID: 12828852806642903950 From: Zhangjin Wu To: thomas@t-8ch.de Cc: falcon@tinylab.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org, palmer@dabbelt.com, paul.walmsley@sifive.com, w@1wt.eu Subject: Re: [PATCH 06/13] selftests/nolibc: allow specify a bios for qemu Date: Fri, 26 May 2023 18:25:18 +0800 Message-Id: <20230526102518.150058-1-falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <2ab94136-d341-4a26-964e-6d6c32e66c9b@t-8ch.de> References: <2ab94136-d341-4a26-964e-6d6c32e66c9b@t-8ch.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Thomas > On 2023-05-25 01:52:29+0800, Zhangjin Wu wrote: > > riscv qemu has a builtin bios (opensbi), but it may not match the latest > > kernel and some old versions may hang during boot, let's allow user pass > > a newer version to qemu via the -bios option. > > Nitpick: > > This seems very specific and hopefully only necessary temporarily. > RISC-V is such a new ISA and the Spec (especially the SBI) changes very frequently ;-) > Instead it could be changed to some generic mechanim like > "QEMU_ARGS_EXTRA"? > Good point, will apply it. Thanks, Zhangjin > > we can use it like this: > > > > $ make run BIOS=/path/to/new-bios ... > > > > Signed-off-by: Zhangjin Wu > > --- > > tools/testing/selftests/nolibc/Makefile | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile > > index 9adc8944dd80..9213763ab3b6 100644 > > --- a/tools/testing/selftests/nolibc/Makefile > > +++ b/tools/testing/selftests/nolibc/Makefile > > @@ -70,7 +70,8 @@ QEMU_ARGS_mips = -M malta -append "panic=-1 $(TEST:%=NOLIBC_TEST=%)" > > QEMU_ARGS_riscv = -M virt -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" > > QEMU_ARGS_s390 = -M s390-ccw-virtio -m 1G -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" > > QEMU_ARGS_loongarch = -M virt -append "console=ttyS0,115200 panic=-1 $(TEST:%=NOLIBC_TEST=%)" > > -QEMU_ARGS = $(QEMU_ARGS_$(ARCH)) > > +QEMU_ARGS_BIOS = $(if $(BIOS),-bios $(BIOS)) > > +QEMU_ARGS = $(QEMU_ARGS_$(ARCH)) $(QEMU_ARGS_BIOS) > > > > # OUTPUT is only set when run from the main makefile, otherwise > > # it defaults to this nolibc directory.