summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2008-01-14 22:51:43 +0000
committerpeter <peter@FreeBSD.org>2008-01-14 22:51:43 +0000
commit8ead68ecb0cef2086a17ea44de4d68c42434fd7a (patch)
treee28f19b0d9eaa97778dffb9ff51588797fa22d71
parent021a700f2af95edd7062ab6729ce73450c36bd67 (diff)
downloadFreeBSD-src-8ead68ecb0cef2086a17ea44de4d68c42434fd7a.zip
FreeBSD-src-8ead68ecb0cef2086a17ea44de4d68c42434fd7a.tar.gz
Add a CTASSERT that KERNBASE is valid. This is usually messed up by an
invalid KVA_PAGES, so add a pointer to there.
-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 25a8ab8..f812245 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
OpenPOWER on IntegriCloud