diff options
author | Mike Larkin <mlarkin@cvs.openbsd.org> | 2015-01-09 03:43:53 +0000 |
---|---|---|
committer | Mike Larkin <mlarkin@cvs.openbsd.org> | 2015-01-09 03:43:53 +0000 |
commit | caf49179806032a3008ad33a218309c1f9c2321a (patch) | |
tree | 4b343215d513fc2e1cf4faf32d66e9b196ea38a1 /lib/libkvm/kvm_i386.c | |
parent | 3378634251e12f50a0c9361420a6dc39b51d63fd (diff) |
Cleanup some macros and #defines in i386 pmap. Previously committed and
backed out because of libkvm breakage, recommitting now with libkvm fix.
ok deraadt@
Diffstat (limited to 'lib/libkvm/kvm_i386.c')
-rw-r--r-- | lib/libkvm/kvm_i386.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libkvm/kvm_i386.c b/lib/libkvm/kvm_i386.c index ed4a3a65bab..fa93c7b1f19 100644 --- a/lib/libkvm/kvm_i386.c +++ b/lib/libkvm/kvm_i386.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm_i386.c,v 1.24 2013/11/01 15:57:56 deraadt Exp $ */ +/* $OpenBSD: kvm_i386.c,v 1.25 2015/01/09 03:43:52 mlarkin Exp $ */ /* $NetBSD: kvm_i386.c,v 1.9 1996/03/18 22:33:38 thorpej Exp $ */ /*- @@ -58,6 +58,15 @@ #include <machine/pte.h> +/* + * These must match the values in pmap.c/pmapae.c + */ +#define PD_MASK 0xffc00000 /* page directory address bits */ +#define PT_MASK 0x003ff000 /* page table address bits */ +#define pdei(VA) (((VA) & PD_MASK) >> PDSHIFT) +#define ptei(VA) (((VA) & PT_MASK) >> PAGE_SHIFT) + + struct vmstate { pd_entry_t *PTD; }; |