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 <[email protected]>
Signed-off-by: Anton Johansson <[email protected]>
---
  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é <[email protected]>

      /** 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 via email to