diff options
| author | Paul HENRYS <[email protected]> | 2024-11-20 11:39:43 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-12-18 15:43:50 -0600 |
| commit | 37f0c32ca2590135304f6d1c1acebca16681056e (patch) | |
| tree | 1023f5cc8d9391eb849740dec01d4c9b71e29f19 | |
| parent | 511b8dea970aab24f574ce230ac76089990df884 (diff) | |
arch: x86: lib: Add support of legacy 64-bit entry point at 0x200
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]>
| -rw-r--r-- | arch/x86/lib/bootm.c | 6 | ||||
| -rw-r--r-- | arch/x86/lib/zimage.c | 1 |
2 files changed, 6 insertions, 1 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; diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index 73a21bc8f03..2eece34a073 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -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; } |
