Add a CTASSERT that KERNBASE is valid. This is usually messed up by an

invalid KVA_PAGES, so add a pointer to there.
This commit is contained in:
peter 2008-01-14 22:51:43 +00:00
parent 021a700f2a
commit 8ead68ecb0

View File

@ -291,6 +291,13 @@ static void *pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int w
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