From c602678b5761242976dbf74b738a16ebe17d6378 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Thu, 24 May 2018 14:55:50 +0000 Subject: [PATCH] Exclude memory from the /reserved-memory mappings with the no-map property set. This memory must not be mapped by the operating system other than under control of the device driver. Obtained from: ABT Systems Ltd Sponsored by: Turing Robotic Industries --- sys/arm64/arm64/machdep.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index a4ee1a22d947..1552caaa2e77 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -1063,6 +1063,9 @@ initarm(struct arm64_bootparams *abp) &physmap_idx); arm_physmem_hardware_regions(mem_regions, mem_regions_sz); } + if (fdt_get_reserved_mem(mem_regions, &mem_regions_sz) == 0) + arm_physmem_exclude_regions(mem_regions, mem_regions_sz, + EXFLAG_NODUMP | EXFLAG_NOALLOC); #endif /* Set the pcpu data, this is needed by pmap_bootstrap */