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 5D9C2C3DA6D for ; Fri, 23 May 2025 09:18:26 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D52F5831C3; Fri, 23 May 2025 11:18:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="DZmWJ5UY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7D360831D8; Fri, 23 May 2025 11:18:23 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (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 9A9718310F for ; Fri, 23 May 2025 11:18:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=conor@kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 58DAE5C6ED1; Fri, 23 May 2025 09:16:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3E85C4CEE9; Fri, 23 May 2025 09:18:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747991898; bh=UBM/0nKf/fnq35wbWrOHjLSFtfUXWH3XDH+4D/b7Aa4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DZmWJ5UYC95G8EcXL55C+bmOQf5D0AC5UPewYBDsy9SCIycCGr7V+BKHIZDrT714X 0t1/KMDX9xuxJh1B3yuoPnwCYkVUso4LMcXxsdm7DCZkaaXkSXPRb1Ccg7OMZI0nrg A3Ulh+GhVLEXQQmDgvNUA1iv0430iDfPo1gkYo6MB+2H6oY9g3R6eDI5PEdl+dqtZE p3Ek2pI+EMBc4UvkO9XONLvq03A0NV9WKjXgueApy8KSmt3lAG+TtMHmiAjG+MGo2M Fl2OM6FNKsh9hEXCkYKF30bp/DgB4Qxp9/V7MI3TUHwA+Yap2hzf/B8NvuBFgm6YjV y5xVpRpHhT6qg== Date: Fri, 23 May 2025 10:18:14 +0100 From: Conor Dooley To: Yao Zi Cc: Tom Rini , Leo Liang , u-boot@lists.denx.de, rick@andestech.com, Mayuresh Chitale Subject: Re: [GIT PULL] u-boot-riscv/master Message-ID: <20250523-alibi-nervous-807af196fad3@spud> References: <174785279069.2062062.17616710293064147131.b4-ty@konsulko.com> <20250522-eradicate-clip-538f48710ad7@spud> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Ql3ojLaCluJ3Vifn" Content-Disposition: inline In-Reply-To: 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.8 at phobos.denx.de X-Virus-Status: Clean --Ql3ojLaCluJ3Vifn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 22, 2025 at 04:40:57PM +0000, Yao Zi wrote: > On Thu, May 22, 2025 at 12:28:18PM +0100, Conor Dooley wrote: > > On Wed, May 21, 2025 at 12:39:50PM -0600, Tom Rini wrote: > > > On Wed, 21 May 2025 17:50:03 +0800, Leo Liang wrote: > > >=20 > > > > The following changes since commit a3e09b24ffd4429909604f1b28455b44= 306edbaa: > > > >=20 > > > > Merge tag 'mmc-2025-05-20' of https://source.denx.de/u-boot/custo= dians/u-boot-mmc (2025-05-20 08:35:31 -0600) > > > >=20 > > > > are available in the Git repository at: > > > >=20 > > > > https://source.denx.de/u-boot/custodians/u-boot-riscv.git > > > >=20 > > > > [...] > > >=20 > > > Merged into u-boot/master, thanks! > >=20 > > This PR seems to have made my CI blow up, and I'm not entirely sure if > > that's something intentional or not. I've not yet bisected, but since > > the error is "Image arch not compatible with host arch", I can only > > imagine the patch in question is: > > | Subject: [PATCH v2 1/3] riscv: image: Add new image type for RV64 > > | Date: Fri, 4 Apr 2025 14:48:55 +0000 [thread overview] > > | Message-ID: <20250404144859.112313-2-mchitale@ventanamicro.com> (raw) > > | In-Reply-To: <20250404144859.112313-1-mchitale@ventanamicro.com> > > |=20 > > | Similar to ARM and X86, introduce a new image type which allows u-boot > > | to distinguish between images built for 32-bit vs 64-bit Risc-V CPUs. > > |=20 > > | Signed-off-by: Mayuresh Chitale > > | Reviewed-by: Maxim Moskalets > > | --- > > | boot/image.c | 3 ++- > > | include/image.h | 3 ++- > > | 2 files changed, 4 insertions(+), 2 deletions(-) > > |=20 > > | diff --git a/boot/image.c b/boot/image.c > > | index 139c5bd035a..45299a7dc33 100644 > > | --- a/boot/image.c > > | +++ b/boot/image.c > > | @@ -92,7 +92,8 @@ static const table_entry_t uimage_arch[] =3D { > > | { IH_ARCH_ARC, "arc", "ARC", }, > > | { IH_ARCH_X86_64, "x86_64", "AMD x86_64", }, > > | { IH_ARCH_XTENSA, "xtensa", "Xtensa", }, > > | - { IH_ARCH_RISCV, "riscv", "RISC-V", }, > > | + { IH_ARCH_RISCV, "riscv", "RISC-V 32 Bit",}, > > | + { IH_ARCH_RISCV64, "riscv64", "RISC-V 64 Bit",}, > > | { -1, "", "", }, > > | }; > > | =20 > > | diff --git a/include/image.h b/include/image.h > > | index 07912606f33..411bfcd0877 100644 > > | --- a/include/image.h > > | +++ b/include/image.h > > | @@ -138,7 +138,8 @@ enum { > > | IH_ARCH_ARC, /* Synopsys DesignWare ARC */ > > | IH_ARCH_X86_64, /* AMD x86_64, Intel and Via */ > > | IH_ARCH_XTENSA, /* Xtensa */ > > | - IH_ARCH_RISCV, /* RISC-V */ > > | + IH_ARCH_RISCV, /* RISC-V 32 bit*/ > > | + IH_ARCH_RISCV64, /* RISC-V 64 bit*/ > > | =20 > > | IH_ARCH_COUNT, > > | }; > > | --=20 > > | 2.43.0 > > |=20 > > since it is changing the existing "riscv" image type to be the 32-bit > > image and requiring the new entry for 64-bit. My CI job uses the system > > mkimage to create the image that U-Boot is loading, so it doesn't know > > about the new define etc. Maybe it's not considered a problem if a new > > U-Boot cannot boot an old image, but the comment above the enum reads: > > |/* > > | * CPU Architecture Codes (supported by Linux) > > | * > > | * The following are exposed to uImage header. > > | * New IDs *MUST* be appended at the end of the list and *NEVER* > > | * inserted for backward compatibility. > > | */ > > The overwhelming majority of existing supported boards in U-Boot are > > 64-bit platforms, and the 64-bit platforms are the ones that have been > > supported for longer, so my thought would be that the compatibility of > > 64-bit platforms should be prioritised over 32-bit? Or even add explicit > > 32-bit and 64-bit entries and the existing one is a catch-all for > > compatibility reasons? >=20 > I've mentioned entries with bitwidth explicitly specified in my previous > reply (and there hasn't been any response). >=20 > > I'll consider IH_ARCH_RISCV32 a better idea, instead of implying 32bit > > when no suffix attached. We (and the Linux kernel) mix 32-bit and 64-bit > > variants of RISC-V together, thus it's hard to tell the exact bitwidth > > of "IH_ARCH_RISCV" without inspecting the code around. To me, it sounds > > more like "RISC-V, but no bitwidth specified". > > > > It will be nice if we could avoid this kind of ambiguity. >=20 > (referring my own reply[1]) >=20 > I'll second explicit 32-bit and 64-bit entries, and keeping > IH_ARCH_RISCV for compatibility consideration. Yeah, I noticed your mail after I sent this report. I think this is the way to go that makes most sense to me. > [1]: https://lore.kernel.org/u-boot/Z_CjTyXaVrpUOPnJ@pie.lan/ --Ql3ojLaCluJ3Vifn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCaDA9VgAKCRB4tDGHoIJi 0pgJAQCrZuaU47ZmOrYM9EaQ4xpdfhW4w7in/biQ8ZB+FzFipQEAgDJo3i3Xn1Yg rtgC8X+EeWzN4CkLrxCRvP2WRB7pmA0= =DTwg -----END PGP SIGNATURE----- --Ql3ojLaCluJ3Vifn--