summaryrefslogtreecommitdiff
path: root/sys/arch/i386/include/param.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/i386/include/param.h')
-rw-r--r--sys/arch/i386/include/param.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/i386/include/param.h b/sys/arch/i386/include/param.h
index cc288c2239b..161973c6f36 100644
--- a/sys/arch/i386/include/param.h
+++ b/sys/arch/i386/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.38 2006/11/30 21:20:41 dim Exp $ */
+/* $OpenBSD: param.h,v 1.39 2007/02/20 21:15:01 tom Exp $ */
/* $NetBSD: param.h,v 1.29 1996/03/04 05:04:26 cgd Exp $ */
/*-
@@ -75,6 +75,8 @@
#define PAGE_SIZE (1 << PAGE_SHIFT)
#define PAGE_MASK (PAGE_SIZE - 1)
+#define NPTEPG (NBPG/(sizeof (pt_entry_t)))
+
/*
* Start of kernel virtual space. Remember to alter the memory and
* page table layout description in pmap.h when changing this.
@@ -129,3 +131,9 @@
/* bytes to disk blocks */
#define dbtob(x) ((x) << DEV_BSHIFT)
#define btodb(x) ((x) >> DEV_BSHIFT)
+
+/*
+ * Mach derived conversion macros
+ */
+#define i386_round_pdr(x) ((((unsigned)(x)) + PDOFSET) & ~PDOFSET)
+#define i386_trunc_pdr(x) ((unsigned)(x) & ~PDOFSET)