Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86c8b27a authored by Leif Lindholm's avatar Leif Lindholm Committed by Will Deacon
Browse files

arm64: ignore DT memreserve entries when booting in UEFI mode



UEFI provides its own method for marking regions to reserve, via the
memory map which is also used to initialise memblock. So when using the
UEFI memory map, ignore any memreserve entries present in the DT.

Reported-by: default avatarMark Rutland <mark.rutland@arm.com>
Reviewed-by: default avatarMark Rutland <mark.rutland@arm.com>
Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarLeif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 49d947fa
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -188,6 +188,8 @@ static __init void reserve_regions(void)
		if (uefi_debug)
		if (uefi_debug)
			pr_cont("\n");
			pr_cont("\n");
	}
	}

	set_bit(EFI_MEMMAP, &efi.flags);
}
}




+3 −1
Original line number Original line Diff line number Diff line
@@ -32,6 +32,7 @@
#include <linux/of_fdt.h>
#include <linux/of_fdt.h>
#include <linux/dma-mapping.h>
#include <linux/dma-mapping.h>
#include <linux/dma-contiguous.h>
#include <linux/dma-contiguous.h>
#include <linux/efi.h>


#include <asm/fixmap.h>
#include <asm/fixmap.h>
#include <asm/sections.h>
#include <asm/sections.h>
@@ -148,6 +149,7 @@ void __init arm64_memblock_init(void)
		memblock_reserve(__virt_to_phys(initrd_start), initrd_end - initrd_start);
		memblock_reserve(__virt_to_phys(initrd_start), initrd_end - initrd_start);
#endif
#endif


	if (!efi_enabled(EFI_MEMMAP))
		early_init_fdt_scan_reserved_mem();
		early_init_fdt_scan_reserved_mem();


	/* 4GB maximum for 32-bit only capable devices */
	/* 4GB maximum for 32-bit only capable devices */