summaryrefslogtreecommitdiff
path: root/arch/x86/lib
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/lib')
-rw-r--r--arch/x86/lib/bootm.c6
-rw-r--r--arch/x86/lib/fsp2/fsp_dram.c4
-rw-r--r--arch/x86/lib/zimage.c1
3 files changed, 8 insertions, 3 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/fsp2/fsp_dram.c b/arch/x86/lib/fsp2/fsp_dram.c
index 4c4c8334bdb..75fa8f9de7a 100644
--- a/arch/x86/lib/fsp2/fsp_dram.c
+++ b/arch/x86/lib/fsp2/fsp_dram.c
@@ -59,7 +59,7 @@ int dram_init(void)
#endif
} else {
#if CONFIG_IS_ENABLED(HANDOFF)
- struct spl_handoff *ho = handoff_get();
+ struct spl_handoff *ho = gd->spl_handoff;
if (!ho) {
log_debug("No SPL handoff found\n");
@@ -82,7 +82,7 @@ phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
return gd->ram_size;
#if CONFIG_IS_ENABLED(HANDOFF)
- struct spl_handoff *ho = handoff_get();
+ struct spl_handoff *ho = gd->spl_handoff;
log_debug("usable_ram_top = %lx\n", ho->arch.usable_ram_top);
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;
}