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
This commit is contained in:
Zbigniew Bodek 2017-04-18 10:25:59 +00:00
parent c7df7863ae
commit 2dc97081b1

View File

@ -814,9 +814,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;