aboutsummaryrefslogtreecommitdiff
path: root/sys/i386
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2008-01-14 22:51:43 +0000
committerPeter Wemm <peter@FreeBSD.org>2008-01-14 22:51:43 +0000
commita658a1e0a5f32e9af17dbb79451cb29f249e8b38 (patch)
treee28f19b0d9eaa97778dffb9ff51588797fa22d71 /sys/i386
parentdd9d15f2940c9a1e6d57525b9e386ec787577947 (diff)
downloadsrc-a658a1e0a5f32e9af17dbb79451cb29f249e8b38.tar.gz
src-a658a1e0a5f32e9af17dbb79451cb29f249e8b38.zip
Add a CTASSERT that KERNBASE is valid. This is usually messed up by an
invalid KVA_PAGES, so add a pointer to there.
Notes
Notes: svn path=/head/; revision=175328
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/pmap.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index 25a8ab8cc7f2..f812245a87df 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -292,6 +292,13 @@ CTASSERT(1 << PDESHIFT == sizeof(pd_entry_t));
CTASSERT(1 << PTESHIFT == sizeof(pt_entry_t));
/*
+ * If you get an error here, then you set KVA_PAGES wrong! See the
+ * description of KVA_PAGES in sys/i386/include/pmap.h. It must be
+ * multiple of 4 for a normal kernel, or a multiple of 8 for a PAE.
+ */
+CTASSERT(KERNBASE % (1 << 24) == 0);
+
+/*
* Move the kernel virtual free pointer to the next
* 4MB. This is used to help improve performance
* by using a large (4MB) page for much of the kernel