]> Git Repo - J-u-boot.git/commitdiff
arch: x86: lib: Add support of legacy 64-bit entry point at 0x200
authorPaul HENRYS <[email protected]>
Wed, 20 Nov 2024 10:39:43 +0000 (11:39 +0100)
committerTom Rini <[email protected]>
Wed, 18 Dec 2024 21:43:50 +0000 (15:43 -0600)
Support of legacy 64-bit entry point was already present when booting a bzimage
with 'zboot' but not supported with 'bootm' when the x86_64 Linux kernel is
embedded in a FIT image.

Signed-off-by: Paul HENRYS <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
arch/x86/lib/bootm.c
arch/x86/lib/zimage.c

index 0f79a5d54959fd50ffaadfefb3f7fedb841699c9..0cf3824d2031835399222ac3536daf30fd7562ea 100644 (file)
@@ -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;
index 73a21bc8f03b650180d0fc42c03e30c0ea41118b..2eece34a073cda756bae94fb800470c7c3fff1ae 100644 (file)
@@ -426,7 +426,6 @@ int zboot_go(void)
        image_64bit = false;
        if (IS_ENABLED(CONFIG_X86_RUN_64BIT) &&
            (hdr->xloadflags & XLF_KERNEL_64)) {
-               entry += 0x200;
                image_64bit = true;
        }
 
This page took 0.037161 seconds and 4 git commands to generate.