summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/pmap.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2015-08-18 01:53:41 +0000
committermarcel <marcel@FreeBSD.org>2015-08-18 01:53:41 +0000
commita428fe7759906778a1a3813782226467be8a9cf3 (patch)
tree8a40efa23df4cca94a5472ddb6c1521ddcf47ca4 /sys/amd64/amd64/pmap.c
parentc1348ba867375122372c3e873c5cc7d4eea3209d (diff)
downloadFreeBSD-src-a428fe7759906778a1a3813782226467be8a9cf3.zip
FreeBSD-src-a428fe7759906778a1a3813782226467be8a9cf3.tar.gz
Add 24 more page table pages we allocate on boot-up. 16MB slop
is a little tight in and by itself, but severily insufficient when one needs to map a large frame buffer as part of console initialization. 64MB slop should be enough for a while. As an example: a 15" MacBook Pro with retina display needs ~28MB of KVA for the frame buffer. PR: 193745
Diffstat (limited to 'sys/amd64/amd64/pmap.c')
-rw-r--r--sys/amd64/amd64/pmap.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 41dea8b..f3e54805 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -699,8 +699,14 @@ nkpt_init(vm_paddr_t addr)
* pmap_growkernel() will need to allocate page table pages to map
* the entire 512GB of KVA space which is an unnecessary tax on
* physical memory.
+ *
+ * Secondly, device memory mapped as part of setting up the low-
+ * level console(s) is taken from KVA, starting at virtual_avail.
+ * This is because cninit() is called after pmap_bootstrap() but
+ * before vm_init() and pmap_init(). 20MB for a frame buffer is
+ * not uncommon.
*/
- pt_pages += 8; /* 16MB additional slop for kernel modules */
+ pt_pages += 32; /* 64MB additional slop. */
#endif
nkpt = pt_pages;
}
OpenPOWER on IntegriCloud