X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=arch%2Fx86%2Flib%2Fbootm.c;h=86030cf52aab1c3994d805d47d16c17e27178f05;hb=512e581c86a4066147a9a095eaed05a7aa9043df;hp=b90ca653fdf8fc3727ad09e7a98275b1f3eb847d;hpb=76539383ea0288985dc6216a92e3d7961df958b3;p=u-boot diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c index b90ca653fd..86030cf52a 100644 --- a/arch/x86/lib/bootm.c +++ b/arch/x86/lib/bootm.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #ifdef CONFIG_SYS_COREBOOT @@ -120,7 +121,7 @@ static int boot_prep_linux(bootm_headers_t *images) } else if (images->ep) { cmd_line_dest = (void *)images->ep + COMMAND_LINE_OFFSET; } else { - printf("## Kernel loading failed (no setup) ...\n"); + printf("## Kernel loading failed (missing x86 kernel setup) ...\n"); goto error; } @@ -148,7 +149,11 @@ int boot_linux_kernel(ulong setup_base, ulong load_address, bool image_64bit) timestamp_add_now(TS_U_BOOT_START_KERNEL); #endif if (image_64bit) { - /* TODO(boot 64-bit kernel) */ + if (!cpu_has_64bit()) { + puts("Cannot boot 64-bit kernel on 32-bit machine\n"); + return -EFAULT; + } + return cpu_jump_to_64bit(setup_base, load_address); } else { /* * Set %ebx, %ebp, and %edi to 0, %esi to point to the @@ -178,7 +183,8 @@ static int boot_jump_linux(bootm_headers_t *images) debug("## Transferring control to Linux (at address %08lx, kernel %08lx) ...\n", images->ep, images->os.load); - return boot_linux_kernel(images->ep, images->os.load, false); + return boot_linux_kernel(images->ep, images->os.load, + images->os.arch == IH_ARCH_X86_64); } int do_bootm_linux(int flag, int argc, char * const argv[],