[syslinux:firmware] efi: setup ramdisk before invoking handover protocol
syslinux-bot for Matt Fleming
matt.fleming at intel.com
Tue Jul 9 02:42:06 PDT 2013
Commit-ID: fa03fdebfd8d051d80a96282466b76593ed1d468
Gitweb: http://www.syslinux.org/commit/fa03fdebfd8d051d80a96282466b76593ed1d468
Author: Matt Fleming <matt.fleming at intel.com>
AuthorDate: Tue, 9 Jul 2013 10:14:38 +0100
Committer: Matt Fleming <matt.fleming at intel.com>
CommitDate: Tue, 9 Jul 2013 10:20:53 +0100
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 at intel.com>
---
efi/main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/efi/main.c b/efi/main.c
index 1ad0d01..6c45596 100644
--- a/efi/main.c
+++ b/efi/main.c
@@ -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))
More information about the Syslinux-commits
mailing list