OpenCloudOS-Kernel/drivers/firmware/efi
Mark Salter 0ceac9e094 efi/arm64: Fix fdt-related memory reservation
Commit 86c8b27a01cf:
 "arm64: ignore DT memreserve entries when booting in UEFI mode

prevents early_init_fdt_scan_reserved_mem() from being called for
arm64 kernels booting via UEFI. This was done because the kernel
will use the UEFI memory map to determine reserved memory regions.
That approach has problems in that early_init_fdt_scan_reserved_mem()
also reserves the FDT itself and any node-specific reserved memory.
By chance of some kernel configs, the FDT may be overwritten before
it can be unflattened and the kernel will fail to boot. More subtle
problems will result if the FDT has node specific reserved memory
which is not really reserved.

This patch has the UEFI stub remove the memory reserve map entries
from the FDT as it does with the memory nodes. This allows
early_init_fdt_scan_reserved_mem() to be called unconditionally
so that the other needed reservations are made.

Signed-off-by: Mark Salter <msalter@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2014-09-09 07:51:09 +01:00
..
libstub efi/arm64: Fix fdt-related memory reservation 2014-09-09 07:51:09 +01:00
Kconfig efi: efistub: Convert into static library 2014-07-18 21:22:19 +01:00
Makefile efi/reboot: Add generic wrapper around EfiResetSystem() 2014-07-18 21:23:51 +01:00
cper.c ACPI and power management updates for 3.17-rc1 2014-08-06 20:34:19 -07:00
efi-pstore.c efi-pstore: Fix an overflow on 32-bit builds 2014-06-27 07:30:32 +01:00
efi.c Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-08-04 17:13:50 -07:00
efivars.c efi: Autoload efivars 2014-07-18 21:24:01 +01:00
reboot.c x86/reboot: Add EFI reboot quirk for ACPI Hardware Reduced flag 2014-07-18 21:23:52 +01:00
runtime-map.c kexec: support kexec/kdump on EFI systems 2014-08-08 15:57:33 -07:00
runtime-wrappers.c efi/x86: Move UEFI Runtime Services wrappers to generic code 2014-07-07 20:12:53 +01:00
vars.c firmware: Do not use WARN_ON(!spin_is_locked()) 2014-08-22 08:45:40 +01:00