summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzbb <zbb@FreeBSD.org>2017-04-18 10:25:59 +0000
committerLuiz Souza <luiz@netgate.com>2017-09-06 13:46:58 -0500
commit340af95c8edf5d88d6b33c9696a4e547ff439583 (patch)
treefce203b7ec70a93c60fcfca976c330f94d2cc8b5
parenta32890e1a4281280a31eb03b0e201711225be6b1 (diff)
downloadFreeBSD-src-340af95c8edf5d88d6b33c9696a4e547ff439583.zip
FreeBSD-src-340af95c8edf5d88d6b33c9696a4e547ff439583.tar.gz
Increase number of L2 tables required for kernel bootstrap
Memory space reserved for pmap_kernel_l2dtable_kva and pmap_kernel_l2ptp_kva has not been taken into account in original code. All the memory reserved from kernel space by pmap_alloc_specials() function called in pmap_bootstrap() should be mapped initially by initarm(). To create initial mapping initarm() function reserves proper number of l2 page tables. However the number of the l2 page tables does not take into account memory for: pmap_kernel_l2ptp_kva, pmap_kernel_l2dtable_kva, crashdumpmap, etc. Submitted by: Grzegorz Bernacki <gjb@semihalf.com> Obtained from: Semihalf Sponsored by: Stormshield Reviewed by: meloun-miracle-cz Differential revision: https://reviews.freebsd.org/D10217 (cherry picked from commit 2f72ed7d5a00369d3e7f83466fca58ff94b1c3a4)
-rw-r--r--sys/arm/arm/machdep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c
index 032a78b..1530d3c 100644
--- a/sys/arm/arm/machdep.c
+++ b/sys/arm/arm/machdep.c
@@ -813,9 +813,10 @@ initarm(struct arm_boot_params *abp)
/*
* Add one table for end of kernel map, one for stacks, msgbuf and
- * L1 and L2 tables map and one for vectors map.
+ * L1 and L2 tables map, one for vectors map and two for
+ * l2 structures from pmap_bootstrap.
*/
- l2size += 3;
+ l2size += 5;
/* Make it divisible by 4 */
l2size = (l2size + 3) & ~3;
OpenPOWER on IntegriCloud