diff options
author | Matt Fleming <matt.fleming@intel.com> | 2013-07-09 10:14:38 +0100 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2013-07-09 10:20:53 +0100 |
commit | fa03fdebfd8d051d80a96282466b76593ed1d468 (patch) | |
tree | 6833f23f70cce52146d8731a5948ec944ceb6a24 | |
parent | 7c66fc1a135257ec6c490cd73b58c78f6e48916d (diff) | |
download | syslinux-fa03fdebfd8d051d80a96282466b76593ed1d468.tar.gz syslinux-fa03fdebfd8d051d80a96282466b76593ed1d468.tar.xz syslinux-fa03fdebfd8d051d80a96282466b76593ed1d468.zip |
efi: setup ramdisk before invoking handover protocol
The EFI handover protocol expects us to have setup the following fields,
o hdr.code32_start
o hdr.cmd_line_ptr
o hdr.ramdisk_image (if applicable)
o hdr.ramdisk_size (if applicable)
Which means we need to call handle_ramdisks() before handover_boot().
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r-- | efi/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1126,6 +1126,9 @@ int efi_boot_linux(void *kernel_buf, size_t kernel_size, dprintf("efi_boot_linux: kernel_start 0x%x kernel_size 0x%x initramfs 0x%x setup_data 0x%x cmdline 0x%x\n", kernel_start, kernel_size, initramfs, setup_data, _cmdline); + if (handle_ramdisks(hdr, initramfs)) + goto free_map; + /* Attempt to use the handover protocol if available */ if (hdr->version >= 0x20b && hdr->handover_offset) handover_boot(hdr, bp); @@ -1137,9 +1140,6 @@ int efi_boot_linux(void *kernel_buf, size_t kernel_size, dprintf("efi_boot_linux: setup_sects %d kernel_size %d\n", hdr->setup_sects, kernel_size); - if (handle_ramdisks(hdr, initramfs)) - goto free_map; - efi_console_restore(); if (exit_boot(bp)) |