diff options
-rw-r--r-- | arch/x86/boot/compressed/eboot.c | 4 | ||||
-rw-r--r-- | arch/x86/platform/efi/efi.c | 5 | ||||
-rw-r--r-- | drivers/firmware/efi/efi.c | 5 |
3 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index 2c82bd150d43..7d69afd8b6fa 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c | |||
@@ -1193,6 +1193,10 @@ static efi_status_t setup_e820(struct boot_params *params, | |||
1193 | unsigned int e820_type = 0; | 1193 | unsigned int e820_type = 0; |
1194 | unsigned long m = efi->efi_memmap; | 1194 | unsigned long m = efi->efi_memmap; |
1195 | 1195 | ||
1196 | #ifdef CONFIG_X86_64 | ||
1197 | m |= (u64)efi->efi_memmap_hi << 32; | ||
1198 | #endif | ||
1199 | |||
1196 | d = (efi_memory_desc_t *)(m + (i * efi->efi_memdesc_size)); | 1200 | d = (efi_memory_desc_t *)(m + (i * efi->efi_memdesc_size)); |
1197 | switch (d->type) { | 1201 | switch (d->type) { |
1198 | case EFI_RESERVED_TYPE: | 1202 | case EFI_RESERVED_TYPE: |
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index cfba30f27392..e4308fe6afe8 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c | |||
@@ -972,6 +972,11 @@ u64 efi_mem_attributes(unsigned long phys_addr) | |||
972 | 972 | ||
973 | static int __init arch_parse_efi_cmdline(char *str) | 973 | static int __init arch_parse_efi_cmdline(char *str) |
974 | { | 974 | { |
975 | if (!str) { | ||
976 | pr_warn("need at least one option\n"); | ||
977 | return -EINVAL; | ||
978 | } | ||
979 | |||
975 | if (parse_option_str(str, "old_map")) | 980 | if (parse_option_str(str, "old_map")) |
976 | set_bit(EFI_OLD_MEMMAP, &efi.flags); | 981 | set_bit(EFI_OLD_MEMMAP, &efi.flags); |
977 | if (parse_option_str(str, "debug")) | 982 | if (parse_option_str(str, "debug")) |
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index 9fa8084a7c8d..d6144e3b97c5 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c | |||
@@ -58,6 +58,11 @@ bool efi_runtime_disabled(void) | |||
58 | 58 | ||
59 | static int __init parse_efi_cmdline(char *str) | 59 | static int __init parse_efi_cmdline(char *str) |
60 | { | 60 | { |
61 | if (!str) { | ||
62 | pr_warn("need at least one option\n"); | ||
63 | return -EINVAL; | ||
64 | } | ||
65 | |||
61 | if (parse_option_str(str, "noruntime")) | 66 | if (parse_option_str(str, "noruntime")) |
62 | disable_runtime = true; | 67 | disable_runtime = true; |
63 | 68 | ||