Fix NKPT comments to match reality. Note that the current value
of NKPT is no longer enough to run amd64 with 16G of RAM, as it doesn't have space for mapping a kernel (16M kernel would require additionally 8 page tables).
This commit is contained in:
parent
bfc5793f96
commit
d77f5882e7
@ -101,9 +101,10 @@
|
||||
((unsigned long)(l2) << PDRSHIFT) | \
|
||||
((unsigned long)(l1) << PAGE_SHIFT))
|
||||
|
||||
/* Initial number of kernel page tables */
|
||||
/* Initial number of kernel page tables. */
|
||||
#ifndef NKPT
|
||||
#define NKPT 240 /* Enough for 16GB (2MB page tables) */
|
||||
/* 240 page tables needed to map 16G (120B "struct vm_page", 2M page tables). */
|
||||
#define NKPT 240
|
||||
#endif
|
||||
|
||||
#define NKPML4E 1 /* number of kernel PML4 slots */
|
||||
|
@ -98,14 +98,17 @@
|
||||
*/
|
||||
#define VADDR(pdi, pti) ((vm_offset_t)(((pdi)<<PDRSHIFT)|((pti)<<PAGE_SHIFT)))
|
||||
|
||||
/* Actual number of kernel page tables */
|
||||
/* Initial number of kernel page tables. */
|
||||
#ifndef NKPT
|
||||
#ifdef PAE
|
||||
#define NKPT 240 /* Enough for 16GB (2MB page tables) */
|
||||
/* 152 page tables needed to map 16G (76B "struct vm_page", 2M page tables). */
|
||||
#define NKPT 240
|
||||
#else
|
||||
#define NKPT 30 /* Enough for 4GB (4MB page tables) */
|
||||
/* 18 page tables needed to map 4G (72B "struct vm_page", 4M page tables). */
|
||||
#define NKPT 30
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef NKPDE
|
||||
#ifdef SMP
|
||||
#define NKPDE (KVA_PAGES - 1) /* number of page tables/pde's */
|
||||
|
Loading…
Reference in New Issue
Block a user