mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-16 09:54:35 +00:00
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 <paul.henrys_ext@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
511b8dea97
commit
37f0c32ca2
2 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue