Skip to content

Commit e2f50c5

Browse files
committed
Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull EFI fix from Ingo Molnar: "An arm64 boot crash fix" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/arm64: Don't apply MEMBLOCK_NOMAP to UEFI memory map mapping
2 parents 2e57259 + f4d5b8a commit e2f50c5

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

drivers/firmware/efi/arm-init.c

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,19 @@ void __init efi_init(void)
203203

204204
reserve_regions();
205205
early_memunmap(memmap.map, params.mmap_size);
206-
memblock_mark_nomap(params.mmap & PAGE_MASK,
207-
PAGE_ALIGN(params.mmap_size +
208-
(params.mmap & ~PAGE_MASK)));
206+
207+
if (IS_ENABLED(CONFIG_ARM)) {
208+
/*
209+
* ARM currently does not allow ioremap_cache() to be called on
210+
* memory regions that are covered by struct page. So remove the
211+
* UEFI memory map from the linear mapping.
212+
*/
213+
memblock_mark_nomap(params.mmap & PAGE_MASK,
214+
PAGE_ALIGN(params.mmap_size +
215+
(params.mmap & ~PAGE_MASK)));
216+
} else {
217+
memblock_reserve(params.mmap & PAGE_MASK,
218+
PAGE_ALIGN(params.mmap_size +
219+
(params.mmap & ~PAGE_MASK)));
220+
}
209221
}

0 commit comments

Comments
 (0)