aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/boot
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2014-06-14 15:23:41 -0400
committerMatt Fleming <matt.fleming@intel.com>2014-06-19 06:14:34 -0400
commit4bf7111f50167133a71c23530ca852a41355e739 (patch)
tree56dbb0a33703a53b42fe3e5f53744f465bd02239 /arch/x86/boot
parent98a716b66cab993e15001c7ec06f637ca6f1079b (diff)
x86/efi: Support initrd loaded above 4G
For boot efi kernel directly without bootloader. If the kernel support XLF_CAN_BE_LOADED_ABOVE_4G, we should not limit initrd under hdr->initrd_add_max. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'arch/x86/boot')
-rw-r--r--arch/x86/boot/compressed/eboot.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index 0331d765c2bb..385f42c200bc 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -1038,6 +1038,7 @@ struct boot_params *make_boot_params(struct efi_config *c)
1038 int i; 1038 int i;
1039 unsigned long ramdisk_addr; 1039 unsigned long ramdisk_addr;
1040 unsigned long ramdisk_size; 1040 unsigned long ramdisk_size;
1041 unsigned long initrd_addr_max;
1041 1042
1042 efi_early = c; 1043 efi_early = c;
1043 sys_table = (efi_system_table_t *)(unsigned long)efi_early->table; 1044 sys_table = (efi_system_table_t *)(unsigned long)efi_early->table;
@@ -1100,14 +1101,21 @@ struct boot_params *make_boot_params(struct efi_config *c)
1100 1101
1101 memset(sdt, 0, sizeof(*sdt)); 1102 memset(sdt, 0, sizeof(*sdt));
1102 1103
1104 if (hdr->xloadflags & XLF_CAN_BE_LOADED_ABOVE_4G)
1105 initrd_addr_max = -1UL;
1106 else
1107 initrd_addr_max = hdr->initrd_addr_max;
1108
1103 status = handle_cmdline_files(sys_table, image, 1109 status = handle_cmdline_files(sys_table, image,
1104 (char *)(unsigned long)hdr->cmd_line_ptr, 1110 (char *)(unsigned long)hdr->cmd_line_ptr,
1105 "initrd=", hdr->initrd_addr_max, 1111 "initrd=", initrd_addr_max,
1106 &ramdisk_addr, &ramdisk_size); 1112 &ramdisk_addr, &ramdisk_size);
1107 if (status != EFI_SUCCESS) 1113 if (status != EFI_SUCCESS)
1108 goto fail2; 1114 goto fail2;
1109 hdr->ramdisk_image = ramdisk_addr; 1115 hdr->ramdisk_image = ramdisk_addr & 0xffffffff;
1110 hdr->ramdisk_size = ramdisk_size; 1116 hdr->ramdisk_size = ramdisk_size & 0xffffffff;
1117 boot_params->ext_ramdisk_image = (u64)ramdisk_addr >> 32;
1118 boot_params->ext_ramdisk_size = (u64)ramdisk_size >> 32;
1111 1119
1112 return boot_params; 1120 return boot_params;
1113fail2: 1121fail2: