summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/param.h
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2003-02-23 21:20:00 +0000
committerjake <jake@FreeBSD.org>2003-02-23 21:20:00 +0000
commitc614cef2af17fe4c523a48a9f77274187ebc9bc4 (patch)
treef9a063d9107dd28be16b7af3fa39b8c300d71592 /sys/i386/include/param.h
parent9318f6d82c57682e409deb011440527b6179d5a0 (diff)
downloadFreeBSD-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/i386/include/param.h')
-rw-r--r--sys/i386/include/param.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/i386/include/param.h b/sys/i386/include/param.h
index cf9cfe4..54fe27a 100644
--- a/sys/i386/include/param.h
+++ b/sys/i386/include/param.h
@@ -87,8 +87,12 @@
#define PAGE_MASK (PAGE_SIZE-1)
#define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t)))
-#define NPDEPG (PAGE_SIZE/(sizeof (pd_entry_t)))
+#define NPGPTD 1
#define PDRSHIFT 22 /* LOG2(NBPDR) */
+
+#define NBPTD (NPGPTD<<PAGE_SHIFT)
+#define NPDEPTD (NBPTD/(sizeof (pd_entry_t)))
+#define NPDEPG (PAGE_SIZE/(sizeof (pd_entry_t)))
#define NBPDR (1<<PDRSHIFT) /* bytes/page dir */
#define PDRMASK (NBPDR-1)
OpenPOWER on IntegriCloud