summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/include
diff options
context:
space:
mode:
authormaxv <maxv@NetBSD.org>2019-03-09 09:09:56 +0000
committermaxv <maxv@NetBSD.org>2019-03-09 09:09:56 +0000
commit2bebbe9a0728b6bb57fb2a38eefacd09a9bcb8f3 (patch)
tree8a6314802ba695d30929705b439f992ef3c07d8b /sys/arch/amd64/include
parentff3b35581bba391dafdb2b7ff6a2a79f9b07802d (diff)
New software PTE bits.
Diffstat (limited to 'sys/arch/amd64/include')
-rw-r--r--sys/arch/amd64/include/pmap.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/sys/arch/amd64/include/pmap.h b/sys/arch/amd64/include/pmap.h
index 00ba6e6ffcf..c1b2e7fda22 100644
--- a/sys/arch/amd64/include/pmap.h
+++ b/sys/arch/amd64/include/pmap.h
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.59 2019/02/11 14:59:32 cherry Exp $ */
+/* $NetBSD: pmap.h,v 1.60 2019/03/09 09:09:56 maxv Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -163,14 +163,16 @@ extern pt_entry_t *pte_base;
#define PTP_LEVELS 4
/*
- * PG_AVAIL usage: we make use of the ignored bits of the PTE
+ * PTE_AVL usage: we make use of the ignored bits of the PTE
*/
+#define PTE_WIRED PTE_AVL1 /* Wired Mapping */
+#define PTE_PVLIST PTE_AVL2 /* Mapping has entry on pvlist */
+#define PTE_X 0 /* Dummy */
-#define PG_W PG_AVAIL1 /* "wired" mapping */
-#define PG_PVLIST PG_AVAIL2 /* mapping has entry on pvlist */
-/* PG_AVAIL3 not used */
-
-#define PG_X 0 /* dummy */
+/* XXX To be deleted. */
+#define PG_W PTE_WIRED
+#define PG_PVLIST PTE_PVLIST
+#define PG_X PTE_X
void svs_pmap_sync(struct pmap *, int);
void svs_lwp_switch(struct lwp *, struct lwp *);
@@ -182,7 +184,7 @@ extern bool svs_enabled;
#ifndef XENPV
#define pmap_pa2pte(a) (a)
-#define pmap_pte2pa(a) ((a) & PG_FRAME)
+#define pmap_pte2pa(a) ((a) & PTE_FRAME)
#define pmap_pte_set(p, n) do { *(p) = (n); } while (0)
#define pmap_pte_cas(p, o, n) atomic_cas_64((p), (o), (n))
#define pmap_pte_testset(p, n) \
@@ -204,7 +206,7 @@ pmap_pa2pte(paddr_t pa)
static __inline paddr_t
pmap_pte2pa(pt_entry_t pte)
{
- return xpmap_mtop_masked(pte & PG_FRAME);
+ return xpmap_mtop_masked(pte & PTE_FRAME);
}
static __inline void