From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Anton Johansson <anjo@rev.ng>, qemu-devel@nongnu.org
Cc: alistair.francis@wdc.com, palmer@dabbelt.com
Subject: Re: [PATCH] hw/riscv: Treat kernel_start_addr as vaddr
Date: Tue, 9 Dec 2025 13:39:42 +0100 [thread overview]
Message-ID: <b68ec589-cc1f-4fc6-98a1-dd321a96a42a@linaro.org> (raw)
In-Reply-To: <20251209123135.22534-1-anjo@rev.ng>
On 9/12/25 13:31, Anton Johansson wrote:
> Changes kernel_start_addr from target_ulong to vaddr. Logically, the
> argument represents the virtual address at which to load the kernel image,
> which as a fallback gets treated as a hwaddr if elf/uimage loading fails.
>
> (Note: callers of riscv_load_kernel() currently pass in a hwaddr as
> kernel_start_addr, so I'm not 100% if hwaddr or vaddr is right here.
> Please correct me if I'm wrong.)
IMHO they need to be updated, i.e.:
-- >8 --
diff --git a/hw/riscv/microchip_pfsoc.c b/hw/riscv/microchip_pfsoc.c
index a17f62cd082..bc4f409c19c 100644
--- a/hw/riscv/microchip_pfsoc.c
+++ b/hw/riscv/microchip_pfsoc.c
@@ -521,7 +521,8 @@ static void
microchip_icicle_kit_machine_init(MachineState *machine)
uint64_t mem_low_size, mem_high_size;
hwaddr firmware_load_addr;
const char *firmware_name;
- hwaddr firmware_end_addr, kernel_start_addr;
+ hwaddr firmware_end_addr;
+ vaddr kernel_start_addr;
uint64_t kernel_entry;
uint64_t fdt_load_addr;
DriveInfo *dinfo = drive_get(IF_SD, 0, 0);
---
>
> Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Signed-off-by: Anton Johansson <anjo@rev.ng>
> ---
> include/hw/riscv/boot.h | 2 +-
> hw/riscv/boot.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
prev parent reply other threads:[~2025-12-09 12:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 12:31 [PATCH] hw/riscv: Treat kernel_start_addr as vaddr Anton Johansson via
2025-12-09 12:39 ` Philippe Mathieu-Daudé [this message]
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=b68ec589-cc1f-4fc6-98a1-dd321a96a42a@linaro.org \
--to=philmd@linaro.org \
--cc=alistair.francis@wdc.com \
--cc=anjo@rev.ng \
--cc=palmer@dabbelt.com \
--cc=qemu-devel@nongnu.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).