diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/include/pmap.h | 17 | ||||
-rw-r--r-- | sys/conf/options.i386 | 3 | ||||
-rw-r--r-- | sys/conf/options.pc98 | 3 | ||||
-rw-r--r-- | sys/i386/include/pmap.h | 17 |
4 files changed, 32 insertions, 8 deletions
diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index ab923fb..a6eabae 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -83,19 +83,28 @@ #define PGEX_U 0x04 /* access from User mode (UPL) */ /* + * Size of Kernel address space. This is the number of page table pages + * (4MB each) to use for the kernel. 256 pages == 1 Gigabyte. + * This **MUST** be a multiple of 4 (eg: 252, 256, 260, etc). + */ +#ifndef KVA_PAGES +#define KVA_PAGES 256 +#endif + +/* * Pte related macros */ #define VADDR(pdi, pti) ((vm_offset_t)(((pdi)<<PDRSHIFT)|((pti)<<PAGE_SHIFT))) #ifndef NKPT -#define NKPT 30 /* actual number of kernel page tables */ +#define NKPT 30 /* actual number of kernel page tables */ #endif #ifndef NKPDE #ifdef SMP -#define NKPDE 254 /* addressable number of page tables/pde's */ +#define NKPDE (KVA_PAGES - 2) /* addressable number of page tables/pde's */ #else -#define NKPDE 255 /* addressable number of page tables/pde's */ -#endif /* SMP */ +#define NKPDE (KVA_PAGES - 1) /* addressable number of page tables/pde's */ +#endif #endif /* diff --git a/sys/conf/options.i386 b/sys/conf/options.i386 index dc83994..34780d2 100644 --- a/sys/conf/options.i386 +++ b/sys/conf/options.i386 @@ -35,6 +35,9 @@ PECOFF_DEBUG opt_pecoff.h # i386 SMP options APIC_IO opt_global.h +# Change KVM size. Changes things all over the kernel. +KVA_PAGES opt_global.h + CLK_CALIBRATION_LOOP opt_clock.h CLK_USE_I8254_CALIBRATION opt_clock.h CLK_USE_TSC_CALIBRATION opt_clock.h diff --git a/sys/conf/options.pc98 b/sys/conf/options.pc98 index 81b92fd..2716795 100644 --- a/sys/conf/options.pc98 +++ b/sys/conf/options.pc98 @@ -35,6 +35,9 @@ PECOFF_DEBUG opt_pecoff.h # i386 SMP options APIC_IO opt_global.h +# Change KVM size. Changes things all over the kernel. +KVA_PAGES opt_global.h + CLK_CALIBRATION_LOOP opt_clock.h CLK_USE_I8254_CALIBRATION opt_clock.h CLK_USE_TSC_CALIBRATION opt_clock.h diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h index ab923fb..a6eabae 100644 --- a/sys/i386/include/pmap.h +++ b/sys/i386/include/pmap.h @@ -83,19 +83,28 @@ #define PGEX_U 0x04 /* access from User mode (UPL) */ /* + * Size of Kernel address space. This is the number of page table pages + * (4MB each) to use for the kernel. 256 pages == 1 Gigabyte. + * This **MUST** be a multiple of 4 (eg: 252, 256, 260, etc). + */ +#ifndef KVA_PAGES +#define KVA_PAGES 256 +#endif + +/* * Pte related macros */ #define VADDR(pdi, pti) ((vm_offset_t)(((pdi)<<PDRSHIFT)|((pti)<<PAGE_SHIFT))) #ifndef NKPT -#define NKPT 30 /* actual number of kernel page tables */ +#define NKPT 30 /* actual number of kernel page tables */ #endif #ifndef NKPDE #ifdef SMP -#define NKPDE 254 /* addressable number of page tables/pde's */ +#define NKPDE (KVA_PAGES - 2) /* addressable number of page tables/pde's */ #else -#define NKPDE 255 /* addressable number of page tables/pde's */ -#endif /* SMP */ +#define NKPDE (KVA_PAGES - 1) /* addressable number of page tables/pde's */ +#endif #endif /* |