aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRoy Franz <roy.franz@linaro.org>2015-04-15 19:32:24 -0400
committerMatt Fleming <matt.fleming@intel.com>2015-04-17 10:46:32 -0400
commit98b228f55014870092c15d7d168fecac69f2f12a (patch)
tree5a5d4b1a2026c945a968d8acdb23380715ab4a00 /arch
parentc57dcb566d3d866a302a1da2e06344bec31d5bcd (diff)
x86/efi: Store upper bits of command line buffer address in ext_cmd_line_ptr
Until now, the EFI stub was only setting the 32 bit cmd_line_ptr in the setup_header structure, so on 64 bit platforms this could be truncated. This patch adds setting the upper bits of the buffer address in ext_cmd_line_ptr. This case was likely never hit, as the allocation for this buffer is done at the lowest available address. Only x86_64 kernels have this problem, as the 1-1 mapping mandated by EFI ensures that all memory is 32 bit addressable on 32 bit platforms. The EFI stub does not support mixed mode, so the 32 bit kernel on 64 bit firmware case does not need to be handled. Signed-off-by: Roy Franz <roy.franz@linaro.org> Cc: <stable@vger.kernel.org> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/boot/compressed/eboot.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index 92b9a5f2aed6..5999980206bf 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -1110,6 +1110,8 @@ struct boot_params *make_boot_params(struct efi_config *c)
1110 if (!cmdline_ptr) 1110 if (!cmdline_ptr)
1111 goto fail; 1111 goto fail;
1112 hdr->cmd_line_ptr = (unsigned long)cmdline_ptr; 1112 hdr->cmd_line_ptr = (unsigned long)cmdline_ptr;
1113 /* Fill in upper bits of command line address, NOP on 32 bit */
1114 boot_params->ext_cmd_line_ptr = (u64)(unsigned long)cmdline_ptr >> 32;
1113 1115
1114 hdr->ramdisk_image = 0; 1116 hdr->ramdisk_image = 0;
1115 hdr->ramdisk_size = 0; 1117 hdr->ramdisk_size = 0;