]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: Don't build call64 and setjmp on 64-bit
authorSimon Glass <sjg@chromium.org>
Mon, 16 Jan 2017 14:04:10 +0000 (07:04 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 6 Feb 2017 03:38:46 +0000 (11:38 +0800)
These are currently not supported. Calling 64-bit code from 64-bit U-Boot is
much simpler, so this code is not needed. setjmp() is not yet implemented for
64-bit.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/cpu/Makefile
arch/x86/lib/bootm.c

index 7f89ff047faa8c21a3e9808096e0fc51c1e80c98..f0135a759e932e98babd431d4d9f81688224c085 100644 (file)
@@ -14,7 +14,11 @@ else
 extra-y        = start.o
 endif
 extra-$(CONFIG_$(SPL_)X86_16BIT_INIT) += resetvec.o start16.o
-obj-y  += cpu.o cpu_x86.o call64.o setjmp.o
+ifndef CONFIG_$(SPL_)X86_64
+obj-y  += call64.o setjmp.o
+endif
+
+obj-y  += cpu.o cpu_x86.o
 
 AFLAGS_REMOVE_call32.o := -mregparm=3 \
        $(if $(CONFIG_EFI_STUB_64BIT),-march=i386 -m32)
index e5e63f6888e3975993a03b78fff3199609bb65f5..3c3d9e1e800261839d45f70b9f0866f0ab67f77f 100644 (file)
@@ -155,7 +155,14 @@ int boot_linux_kernel(ulong setup_base, ulong load_address, bool image_64bit)
                        puts("Cannot boot 64-bit kernel on 32-bit machine\n");
                        return -EFAULT;
                }
+               /* At present 64-bit U-Boot does not support booting a
+                * kernel.
+                * TODO(sjg@chromium.org): Support booting both 32-bit and
+                * 64-bit kernels from 64-bit U-Boot.
+                */
+#if !CONFIG_IS_ENABLED(X86_64)
                return cpu_jump_to_64bit(setup_base, load_address);
+#endif
        } else {
                /*
                * Set %ebx, %ebp, and %edi to 0, %esi to point to the