diff options
author | neel <neel@FreeBSD.org> | 2013-02-06 04:53:00 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2013-02-06 04:53:00 +0000 |
commit | c25d6690790d84356e2a43d03341e6787d16d2d6 (patch) | |
tree | f8f524fba0c5057bea8cd82bb2c58b476a001d44 /sys/amd64/include | |
parent | e1ce6ad8dd8348d781f3da2548bc66a336e4a5fc (diff) | |
download | FreeBSD-src-c25d6690790d84356e2a43d03341e6787d16d2d6.zip FreeBSD-src-c25d6690790d84356e2a43d03341e6787d16d2d6.tar.gz |
Compute the number of initial kernel page table pages (NKPT) dynamically.
This eliminates the need to recompile the kernel when the default value
of NKPT is not big enough - for e.g. when loading large kernel modules
or memory disk images from the loader.
If NKPT is defined in the kernel configuration file then it overrides the
dynamic calculation.
Reviewed by: alc, kib
Diffstat (limited to 'sys/amd64/include')
-rw-r--r-- | sys/amd64/include/pmap.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 71045ae..334d6c6 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -113,13 +113,7 @@ ((unsigned long)(l2) << PDRSHIFT) | \ ((unsigned long)(l1) << PAGE_SHIFT)) -/* Initial number of kernel page tables. */ -#ifndef NKPT -#define NKPT 32 -#endif - #define NKPML4E 1 /* number of kernel PML4 slots */ -#define NKPDPE howmany(NKPT, NPDEPG)/* number of kernel PDP slots */ #define NUPML4E (NPML4EPG/2) /* number of userland PML4 pages */ #define NUPDPE (NUPML4E*NPDPEPG)/* number of userland PDP pages */ @@ -181,6 +175,7 @@ typedef u_int64_t pml4_entry_t; #define PML4map ((pd_entry_t *)(addr_PML4map)) #define PML4pml4e ((pd_entry_t *)(addr_PML4pml4e)) +extern int nkpt; /* Initial number of kernel page tables */ extern u_int64_t KPDPphys; /* physical address of kernel level 3 */ extern u_int64_t KPML4phys; /* physical address of kernel level 4 */ |