diff options
author | jake <jake@FreeBSD.org> | 2003-02-23 21:20:00 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2003-02-23 21:20:00 +0000 |
commit | c614cef2af17fe4c523a48a9f77274187ebc9bc4 (patch) | |
tree | f9a063d9107dd28be16b7af3fa39b8c300d71592 /sys/amd64/include | |
parent | 9318f6d82c57682e409deb011440527b6179d5a0 (diff) | |
download | FreeBSD-src-c614cef2af17fe4c523a48a9f77274187ebc9bc4.zip FreeBSD-src-c614cef2af17fe4c523a48a9f77274187ebc9bc4.tar.gz |
- Added macros NPGPTD, NBPTD, and NPDEPTD, for dealing with the size of the
page directory.
- Use these instead of the magic constants 1 or PAGE_SIZE where appropriate.
There are still numerous assumptions that the page directory is exactly
1 page.
Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys/amd64/include')
-rw-r--r-- | sys/amd64/include/pmap.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 44f0b25..0cd3944 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -101,9 +101,9 @@ #endif #ifndef NKPDE #ifdef SMP -#define NKPDE (KVA_PAGES - 2) /* addressable number of page tables/pde's */ +#define NKPDE (KVA_PAGES - (NPGPTD + 1)) /* number of page tables/pde's */ #else -#define NKPDE (KVA_PAGES - 1) /* addressable number of page tables/pde's */ +#define NKPDE (KVA_PAGES - NPGPTD) /* number of page tables/pde's */ #endif #endif @@ -115,14 +115,14 @@ * * SMP_PRIVPAGES: The per-cpu address space is 0xff80000 -> 0xffbfffff */ -#define APTDPTDI (NPDEPG-1) /* alt ptd entry that points to APTD */ +#define APTDPTDI (NPDEPG-NPGPTD) /* alt ptd entry that points to APTD */ #ifdef SMP #define MPPTDI (APTDPTDI-1) /* per cpu ptd entry */ #define KPTDI (MPPTDI-NKPDE) /* start of kernel virtual pde's */ #else #define KPTDI (APTDPTDI-NKPDE)/* start of kernel virtual pde's */ #endif /* SMP */ -#define PTDPTDI (KPTDI-1) /* ptd entry that points to ptd! */ +#define PTDPTDI (KPTDI-NPGPTD) /* ptd entry that points to ptd! */ #define UMAXPTDI (PTDPTDI-1) /* ptd entry for user space end */ #define UMAXPTEOFF (NPTEPG) /* pte entry for user space end */ |