Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch New software PTE bits.
details: https://anonhg.NetBSD.org/src/rev/2180ffda0f0f
branches: trunk
changeset: 997474:2180ffda0f0f
user: maxv <maxv%NetBSD.org@localhost>
date: Sat Mar 09 09:09:56 2019 +0000
description:
New software PTE bits.
diffstat:
sys/arch/amd64/include/pmap.h | 20 +++++++++++---------
sys/arch/i386/include/pmap.h | 20 ++++++++++++--------
2 files changed, 23 insertions(+), 17 deletions(-)
diffs (105 lines):
diff -r 546f74fc06ad -r 2180ffda0f0f sys/arch/amd64/include/pmap.h
--- a/sys/arch/amd64/include/pmap.h Sat Mar 09 09:02:38 2019 +0000
+++ b/sys/arch/amd64/include/pmap.h Sat Mar 09 09:09:56 2019 +0000
@@ -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 @@
#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 @@
#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 @@
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
diff -r 546f74fc06ad -r 2180ffda0f0f sys/arch/i386/include/pmap.h
--- a/sys/arch/i386/include/pmap.h Sat Mar 09 09:02:38 2019 +0000
+++ b/sys/arch/i386/include/pmap.h Sat Mar 09 09:09:56 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.122 2019/02/11 14:59:32 cherry Exp $ */
+/* $NetBSD: pmap.h,v 1.123 2019/03/09 09:09:56 maxv Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -224,7 +224,7 @@
#define L2_SLOT_KERN (KERNBASE/NBPD_L2) /* 768: start of kernel space */
#endif /* PAE */
-#define L2_SLOT_KERNBASE L2_SLOT_KERN
+#define L2_SLOT_KERNBASE L2_SLOT_KERN
#define PDIR_SLOT_KERN L2_SLOT_KERN
#define PDIR_SLOT_PTE L2_SLOT_PTE
@@ -278,18 +278,22 @@
#define PTP_LEVELS 2
/*
- * 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 PTE_AVL3 /* Executable */
-#define PG_W PG_AVAIL1 /* "wired" mapping */
-#define PG_PVLIST PG_AVAIL2 /* mapping has entry on pvlist */
-#define PG_X PG_AVAIL3 /* executable mapping */
+/* XXX To be deleted. */
+#define PG_W PTE_WIRED
+#define PG_PVLIST PTE_PVLIST
+#define PG_X PTE_X
#include <x86/pmap.h>
#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_flush() /* nothing */
@@ -323,7 +327,7 @@
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
pmap_pte_set(pt_entry_t *pte, pt_entry_t npte)
Home |
Main Index |
Thread Index |
Old Index