U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yao Zi <ziyao@disroot.org>
To: Mayuresh Chitale <mchitale@ventanamicro.com>, u-boot@lists.denx.de
Cc: Tom Rini <trini@konsulko.com>,
	Maxim Moskalets <maximmosk4@gmail.com>,
	Mattijs Korpershoek <mkorpershoek@kernel.org>,
	Igor Opaniuk <igor.opaniuk@gmail.com>,
	Raymond Mao <raymond.mao@linaro.org>,
	Marek Vasut <marek.vasut+renesas@mailbox.org>,
	Simon Glass <sjg@chromium.org>,
	Julien Masson <jmasson@baylibre.com>,
	Sughosh Ganu <sughosh.ganu@linaro.org>,
	Paul HENRYS <paul.henrys_ext@softathome.com>
Subject: Re: [PATCH v2 1/3] riscv: image: Add new image type for RV64
Date: Sat, 5 Apr 2025 03:28:15 +0000	[thread overview]
Message-ID: <Z_CjTyXaVrpUOPnJ@pie.lan> (raw)
In-Reply-To: <20250404144859.112313-2-mchitale@ventanamicro.com>

On Fri, Apr 04, 2025 at 02:48:55PM +0000, Mayuresh Chitale wrote:
> 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.
> 
> Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
> Reviewed-by: Maxim Moskalets <maximmosk4@gmail.com>
> ---
>  boot/image.c    | 3 ++-
>  include/image.h | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> 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[] = {
>  	{	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,			"",		"",		},
>  };
>  
> 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*/

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.

> +	IH_ARCH_RISCV64,		/* RISC-V 64 bit*/
>  	IH_ARCH_COUNT,
>  };
> -- 
> 2.43.0
> 

Thanks,
Yao Zi

  reply	other threads:[~2025-04-05  3:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-04 14:48 [PATCH v2 0/3] Risc-V 32 bit/64 bit images Mayuresh Chitale
2025-04-04 14:48 ` [PATCH v2 1/3] riscv: image: Add new image type for RV64 Mayuresh Chitale
2025-04-05  3:28   ` Yao Zi [this message]
2025-04-04 14:48 ` [PATCH v2 2/3] riscv: Select appropriate image type Mayuresh Chitale
2025-05-12  9:26   ` Leo Liang
2025-04-04 14:48 ` [PATCH v2 3/3] booti/bootm: riscv: Verify image arch type Mayuresh Chitale

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z_CjTyXaVrpUOPnJ@pie.lan \
    --to=ziyao@disroot.org \
    --cc=igor.opaniuk@gmail.com \
    --cc=jmasson@baylibre.com \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=maximmosk4@gmail.com \
    --cc=mchitale@ventanamicro.com \
    --cc=mkorpershoek@kernel.org \
    --cc=paul.henrys_ext@softathome.com \
    --cc=raymond.mao@linaro.org \
    --cc=sjg@chromium.org \
    --cc=sughosh.ganu@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox