qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Anton Johansson <anjo@rev.ng>, qemu-devel@nongnu.org
Cc: pierrick.bouvier@linaro.org, alistair.francis@wdc.com,
	richard.henderson@linaro.org, palmer@dabbelt.com
Subject: Re: [PATCH v2 3/3] hw/riscv: Widen OpenSBI dynamic info struct
Date: Mon, 27 Oct 2025 13:42:15 +0100	[thread overview]
Message-ID: <3e6b7bb6-0509-41c1-aa35-d73ced79e87f@linaro.org> (raw)
In-Reply-To: <20251027-feature-single-binary-hw-v1-v2-3-44478d589ae9@rev.ng>

On 27/10/25 13:35, Anton Johansson wrote:
> Since fw_dynamic_info is only used for non 32 bit targets, target_long
> is int64_t anyway.  Rename struct to fw_dynamic_info64 and use int64_t.
> 
> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
> Signed-off-by: Anton Johansson <anjo@rev.ng>
> ---
>   include/hw/riscv/boot_opensbi.h | 14 +++++++-------
>   hw/riscv/boot.c                 | 22 ++++++++++++----------
>   2 files changed, 19 insertions(+), 17 deletions(-)
> 
> diff --git a/include/hw/riscv/boot_opensbi.h b/include/hw/riscv/boot_opensbi.h
> index 18664a174b..ab9999be3f 100644
> --- a/include/hw/riscv/boot_opensbi.h
> +++ b/include/hw/riscv/boot_opensbi.h
> @@ -29,17 +29,17 @@ enum sbi_scratch_options {
>   };
>   
>   /** Representation dynamic info passed by previous booting stage */
> -struct fw_dynamic_info {
> +struct fw_dynamic_info64 {
>       /** Info magic */
> -    target_long magic;
> +    int64_t magic;

I wonder why some of these fields are signed; but this is pre-existing,
so for this patch:

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

>       /** Info version */
> -    target_long version;
> +    int64_t version;
>       /** Next booting stage address */
> -    target_long next_addr;
> +    int64_t next_addr;
>       /** Next booting stage mode */
> -    target_long next_mode;
> +    int64_t next_mode;
>       /** Options for OpenSBI library */
> -    target_long options;
> +    int64_t options;
>       /**
>        * Preferred boot HART id
>        *
> @@ -55,7 +55,7 @@ struct fw_dynamic_info {
>        * stage can set it to -1UL which will force the FW_DYNAMIC firmware
>        * to use the relocation lottery mechanism.
>        */
> -    target_long boot_hart;
> +    int64_t boot_hart;
>   };


  reply	other threads:[~2025-10-27 12:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-27 12:35 [PATCH v2 0/3] single-binary: Prepare hw/riscv for single compilation Anton Johansson via
2025-10-27 12:35 ` [PATCH v2 1/3] hw/riscv: Use generic hwaddr for firmware addressses Anton Johansson via
2025-10-27 12:39   ` Philippe Mathieu-Daudé
2025-10-27 18:13     ` Anton Johansson via
2025-10-27 12:35 ` [PATCH v2 2/3] hw/riscv: Replace target_ulong uses Anton Johansson via
2025-10-29 18:01   ` Philippe Mathieu-Daudé
2025-10-30 12:32     ` Anton Johansson via
2025-10-30 12:52       ` Philippe Mathieu-Daudé
2025-10-30  4:10   ` Alistair Francis
2025-10-27 12:35 ` [PATCH v2 3/3] hw/riscv: Widen OpenSBI dynamic info struct Anton Johansson via
2025-10-27 12:42   ` Philippe Mathieu-Daudé [this message]
2025-10-28  7:25 ` [PATCH v2 0/3] single-binary: Prepare hw/riscv for single compilation Philippe Mathieu-Daudé
2025-10-29 21:56   ` Philippe Mathieu-Daudé

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=3e6b7bb6-0509-41c1-aa35-d73ced79e87f@linaro.org \
    --to=philmd@linaro.org \
    --cc=alistair.francis@wdc.com \
    --cc=anjo@rev.ng \
    --cc=palmer@dabbelt.com \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).