summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2019-07-30 18:08:29 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2019-07-30 18:08:29 +0000
commit9146927979a1c9bda1d9b688f6a2285f53815972 (patch)
tree6fec4b56350ac564b436f3d23d4c4e51e1fbd062
parent66d653e804184f5cbb054aa4cad1d4c798faa86b (diff)
Make sure the virtual addresses that are used for EFI runtime services
fit into the 39-bit address space that we currently use for the runtime mappings. ok patrick@
-rw-r--r--sys/arch/arm64/arm64/machdep.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/arm64/arm64/machdep.c b/sys/arch/arm64/arm64/machdep.c
index 9040ed4d536..04e7d0d3084 100644
--- a/sys/arch/arm64/arm64/machdep.c
+++ b/sys/arch/arm64/arm64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.41 2019/06/01 11:45:01 kettenis Exp $ */
+/* $OpenBSD: machdep.c,v 1.42 2019/07/30 18:08:28 kettenis Exp $ */
/*
* Copyright (c) 2014 Patrick Wildt <patrick@blueri.se>
*
@@ -1160,6 +1160,8 @@ remap_efi_runtime(EFI_PHYSICAL_ADDRESS system_table)
(phys_end - phys_start);
phys_end += src->NumberOfPages * PAGE_SIZE;
}
+ /* Mask address to make sure it fits in our pmap. */
+ src->VirtualStart &= ((1ULL << USER_SPACE_BITS) - 1);
memcpy(dst, src, mmap_desc_size);
dst = NextMemoryDescriptor(dst, mmap_desc_size);
}