All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bootm: Pass SMP core ID and DTB address for ELF-formatted kernels
@ 2025-05-13  9:50 牛 志宏
  2025-05-23 16:41 ` Simon Glass
  0 siblings, 1 reply; 9+ messages in thread
From: 牛 志宏 @ 2025-05-13  9:50 UTC (permalink / raw)
  To: u-boot@lists.denx.de

When booting RISC-V ELF-formatted kernel images (IH_TYPE_KERNEL + IH_OS_ELF),
explicitly pass SMP core/hart ID and DTB address to comply with modern
SMP-enabled kernels' boot protocol requirements.

Signed-off-by: Zone.N <zone.niuzh@hotmail.com>
---
 boot/bootm_os.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/boot/bootm_os.c b/boot/bootm_os.c
index a3c7cb5332e..a0f310b1359 100644
--- a/boot/bootm_os.c
+++ b/boot/bootm_os.c
@@ -402,6 +402,11 @@ static int do_bootm_elf(int flag, struct bootm_info *bmi)
        if (flag != BOOTM_STATE_OS_GO)
                return 0;

+#if defined(CONFIG_RISCV)
+       bmi->argc = gd->arch.boot_hart;
+       bmi->argv = (char **)bmi->images->ft_addr;
+#endif
+
        bootelf(bmi->images->ep, flags, bmi->argc, bmi->argv);

        return 1;
--
2.45.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-06-05 14:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-13  9:50 [PATCH] bootm: Pass SMP core ID and DTB address for ELF-formatted kernels 牛 志宏
2025-05-23 16:41 ` Simon Glass
2025-05-23 17:04   ` Heinrich Schuchardt
2025-05-23 22:29     ` Tom Rini
2025-05-24  4:29       ` Heinrich Schuchardt
2025-05-29  9:33         ` 回复: " 牛 志宏
2025-05-29 15:49           ` Tom Rini
     [not found]             ` <ME0P300MB13099B02B4C316E4784D23529F6FA@ME0P300MB1309.AUSP300.PROD.OUTLOOK.COM>
2025-06-05 14:29               ` 回复: " Yao Zi
2025-06-05 14:47               ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.