From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0FEE2C4708C for ; Tue, 6 Dec 2022 10:59:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A76B0853BE; Tue, 6 Dec 2022 11:59:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=andestech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 75192852EB; Tue, 6 Dec 2022 11:59:55 +0100 (CET) Received: from Atcsqr.andestech.com (60-248-80-70.hinet-ip.hinet.net [60.248.80.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D21D3852EB for ; Tue, 6 Dec 2022 11:59:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=andestech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ycliang@andestech.com Received: from mail.andestech.com (ATCPCS16.andestech.com [10.0.1.222]) by Atcsqr.andestech.com with ESMTP id 2B6AxPoc028185; Tue, 6 Dec 2022 18:59:25 +0800 (+08) (envelope-from ycliang@andestech.com) Received: from ubuntu01 (10.0.12.75) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.498.0; Tue, 6 Dec 2022 18:59:23 +0800 Date: Tue, 6 Dec 2022 10:58:21 +0000 From: Leo Liang To: Kautuk Consul CC: Sean Anderson , Bin Meng , Rayagonda Kokatanur , Rick Chen , Simon Glass , Ilias Apalodimas , Alexandru Gagniuc , Philippe Reynes , Heinrich Schuchardt , Rasmus Villemoes , "Eugen Hristev" , Stefan Roese , "Loic Poulain" , Peng Fan , Michal Simek , Subject: Re: [PATCH v5 3/3] board: qemu-riscv: enable semihosting Message-ID: References: <20220923070320.617623-1-kconsul@ventanamicro.com> <20220923070320.617623-4-kconsul@ventanamicro.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.5 (2021-01-21) X-Originating-IP: [10.0.12.75] X-DNSRBL: X-MAIL: Atcsqr.andestech.com 2B6AxPoc028185 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Hi Kautuk, We have tested your patchset with QEMU 7.1.0. It generally looks fine, but CI error seems to persist. https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/14314 The error comes from CI testcase timed-out. The reason for the time-out is not yet confirmed, but we suspect it's because when executing under semihosting, QEMU could not exit normally. (thru ctrl+x a) There is a seemingly relevent patchset that sits on QEMU mailing list for some time. https://lore.kernel.org/all/20220620190834.GA16887@ws2101.lin.mbt.kalray.eu/T/#m1bc32cc32511b6ac8adfaf67983dc2bccd4b9ec9 On the u-boot side, what do you think if we disable semihosting by default? (i.e., not adding CONFIG_SEMIHOSTING_XXX in qemu's defconfig) Best regards, Leo On Tue, Dec 06, 2022 at 11:12:41AM +0530, Kautuk Consul wrote: > Hi, > > On Mon, Dec 5, 2022 at 8:46 PM Sean Anderson wrote: > > > > On 12/5/22 00:51, Kautuk Consul wrote: > > > Hi, > > > > > > On Sat, Dec 3, 2022 at 9:44 AM Bin Meng wrote: > > >> > > >> On Fri, Sep 23, 2022 at 3:03 PM Kautuk Consul wrote: > > >> > > > >> > To enable semihosting we also need to enable the following > > >> > configs in defconfigs: > > >> > CONFIG_SEMIHOSTING > > >> > CONFIG_SPL_SEMIHOSTING > > >> > CONFIG_SEMIHOSTING_SERIAL > > >> > CONFIG_SERIAL_PROBE_ALL > > >> > CONFIG_SPL_FS_EXT4 > > >> > CONFIG_SPL_FS_FAT > > >> > > >> Why should these _SPL_FS_xxx be required? If it's required by > > >> SEMIHOSTING, could the dependency be fixed there? > > > > > > The build dependencies require that these options be there. > > > > What error do you get? > > If I disable both the _SPL_FS_* config options then I get the > following compilation error: > common/spl/spl_semihosting.c: In function 'spl_smh_load_image': > common/spl/spl_semihosting.c:27:32: error: > 'CONFIG_SPL_FS_LOAD_PAYLOAD_NAME' undeclared (first use in this > function) > 27 | const char *filename = CONFIG_SPL_FS_LOAD_PAYLOAD_NAME; > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > common/spl/spl_semihosting.c:27:32: note: each undeclared identifier > is reported only once for each function it appears in > > Bin/Sean: This error is not really related to the semihosting feature > but is related to COFIG_SPL in general. > Can you please accept this patch-set and then I'll try and find time > in the future maybe to rectify this build dependency > problem ? > > > > > --Sean > > > > >> > > >> > > > >> > Signed-off-by: Kautuk Consul > > >> > --- > > >> > configs/qemu-riscv32_defconfig | 4 ++++ > > >> > configs/qemu-riscv32_smode_defconfig | 4 ++++ > > >> > configs/qemu-riscv32_spl_defconfig | 7 +++++++ > > >> > configs/qemu-riscv64_defconfig | 4 ++++ > > >> > configs/qemu-riscv64_smode_defconfig | 4 ++++ > > >> > configs/qemu-riscv64_spl_defconfig | 7 +++++++ > > >> > 6 files changed, 30 insertions(+) > > >> > > > >> > > >> Regards, > > >> Bin > >