summaryrefslogtreecommitdiff
path: root/arch/x86/lib/zimage.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-03-25 17:34:34 -0400
committerTom Rini <trini@konsulko.com>2023-03-25 17:34:34 -0400
commitfde439219ff53a46bdd5dff69e049ccd4be57310 (patch)
tree423643707fad940e0845cbebf74d545b05b3d336 /arch/x86/lib/zimage.c
parent4b635046b5e92e419fbd1bf93e5b0ef86dbcadc2 (diff)
parent93e3364804ffd4a5d4a0df9c750a1859f9fe298b (diff)
Merge tag 'efi-next-20230325' of https://source.denx.de/u-boot/custodians/u-boot-efi into next
Pull request for efi-next-20230325 Documenation: * add man-page for efi command UEFI: * Let EFI app call ExitBootServices() before legacy booting kernel * Support zboot and bootm in the EFI app * Let efi command show configuration tables * Support booting a 64-bit kernel from 64-bit EFI app * Allocate device-tree copy from high memory * simplify efi_str_to_u16()
Diffstat (limited to 'arch/x86/lib/zimage.c')
-rw-r--r--arch/x86/lib/zimage.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index 9cc04490307..e5ea5129c1e 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -504,13 +504,24 @@ static int do_zboot_info(struct cmd_tbl *cmdtp, int flag, int argc,
static int do_zboot_go(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
+ struct boot_params *params = state.base_ptr;
+ struct setup_header *hdr = &params->hdr;
+ bool image_64bit;
+ ulong entry;
int ret;
disable_interrupts();
+ entry = state.load_address;
+ image_64bit = false;
+ if (IS_ENABLED(CONFIG_X86_RUN_64BIT) &&
+ (hdr->xloadflags & XLF_KERNEL_64)) {
+ entry += 0x200;
+ image_64bit = true;
+ }
+
/* we assume that the kernel is in place */
- ret = boot_linux_kernel((ulong)state.base_ptr, state.load_address,
- false);
+ ret = boot_linux_kernel((ulong)state.base_ptr, entry, image_64bit);
printf("Kernel returned! (err=%d)\n", ret);
return CMD_RET_FAILURE;
@@ -655,7 +666,7 @@ void zimage_dump(struct boot_params *base_ptr)
printf("%-20s %s\n", "", "Ancient kernel, using version 100");
print_num("Version", hdr->version);
print_num("Real mode switch", hdr->realmode_swtch);
- print_num("Start sys", hdr->start_sys);
+ print_num("Start sys seg", hdr->start_sys_seg);
print_num("Kernel version", hdr->kernel_version);
version = get_kernel_version(base_ptr, (void *)state.bzimage_addr);
if (version)