summaryrefslogtreecommitdiff
path: root/arch/x86/lib/bootm.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-01-08 14:19:22 -0600
committerTom Rini <trini@konsulko.com>2025-01-08 14:19:22 -0600
commit3bfd12008bef1a8353e7ceaca2cb06cf388527ed (patch)
treeac25e8db2f18bcba9f48518249fc020a05cb576c /arch/x86/lib/bootm.c
parent6d41f0a39d6423c8e57e92ebbe9f8c0333a63f72 (diff)
parentd6da3dbaef57fc1d319b6b552efa009e2489d7d9 (diff)
Merge branch 'next'
Diffstat (limited to 'arch/x86/lib/bootm.c')
-rw-r--r--arch/x86/lib/bootm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
index 0f79a5d5495..0cf3824d203 100644
--- a/arch/x86/lib/bootm.c
+++ b/arch/x86/lib/bootm.c
@@ -189,6 +189,12 @@ int boot_linux_kernel(ulong setup_base, ulong entry, bool image_64bit)
if (CONFIG_IS_ENABLED(X86_64)) {
typedef void (*h_func)(ulong zero, ulong setup);
h_func func;
+ struct setup_header *hdr = &(((struct boot_params *)(setup_base))->hdr);
+
+ /* Handle kernel with legacy 64-bit entry point at 0x200 */
+ if (hdr->xloadflags & XLF_KERNEL_64) {
+ entry += 0x200;
+ }
/* jump to Linux with rdi=0, rsi=setup_base */
func = (h_func)entry;