Module Name: src
Committed By: maxv
Date: Sat Oct 5 07:30:03 UTC 2019
Modified Files:
src/sys/arch/x86/include: pmap.h pte.h
Log Message:
Switch to the new PTE naming. No binary diff (tested with MKREPRO).
To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/x86/include/pmap.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x86/include/pte.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x86/include/pmap.h
diff -u src/sys/arch/x86/include/pmap.h:1.102 src/sys/arch/x86/include/pmap.h:1.103
--- src/sys/arch/x86/include/pmap.h:1.102 Wed Aug 7 06:23:48 2019
+++ src/sys/arch/x86/include/pmap.h Sat Oct 5 07:30:03 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.102 2019/08/07 06:23:48 maxv Exp $ */
+/* $NetBSD: pmap.h,v 1.103 2019/10/05 07:30:03 maxv Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -315,8 +315,8 @@ struct pmap {
*/
extern u_long PDPpaddr;
-extern pd_entry_t pmap_pg_g; /* do we support PG_G? */
-extern pd_entry_t pmap_pg_nx; /* do we support PG_NX? */
+extern pd_entry_t pmap_pg_g; /* do we support PTE_G? */
+extern pd_entry_t pmap_pg_nx; /* do we support PTE_NX? */
extern int pmap_largepages;
extern long nkptp[PTP_LEVELS];
@@ -526,7 +526,7 @@ kvtopte(vaddr_t va)
KASSERT(va >= VM_MIN_KERNEL_ADDRESS);
pde = L2_BASE + pl2_i(va);
- if (*pde & PG_PS)
+ if (*pde & PTE_PS)
return ((pt_entry_t *)pde);
return (PTE_BASE + pl1_i(va));
@@ -560,7 +560,7 @@ xpmap_ptetomach(pt_entry_t *pte)
va = ((va & XPTE_MASK) >> XPTE_SHIFT) | (vaddr_t) PTE_BASE;
up_pte = (pt_entry_t *) va;
- return (paddr_t) (((*up_pte) & PG_FRAME) + (((vaddr_t) pte) & (~PG_FRAME & ~VA_SIGN_MASK)));
+ return (paddr_t) (((*up_pte) & PTE_FRAME) + (((vaddr_t) pte) & (~PTE_FRAME & ~VA_SIGN_MASK)));
}
/* Xen helpers to change bits of a pte */
Index: src/sys/arch/x86/include/pte.h
diff -u src/sys/arch/x86/include/pte.h:1.1 src/sys/arch/x86/include/pte.h:1.2
--- src/sys/arch/x86/include/pte.h:1.1 Tue Jul 6 20:50:35 2010
+++ src/sys/arch/x86/include/pte.h Sat Oct 5 07:30:03 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: pte.h,v 1.1 2010/07/06 20:50:35 cegger Exp $ */
+/* $NetBSD: pte.h,v 1.2 2019/10/05 07:30:03 maxv Exp $ */
/*
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -33,10 +33,10 @@
#define _X86_PTE_H
/* Cacheability bits when we are using PAT */
-#define PGC_WB 0 /* The default */
-#define PGC_WC PG_WT /* WT and CD is WC */
-#define PGC_UCMINUS PG_N /* UC but mtrr can override */
-#define PGC_UC (PG_WT | PG_N) /* hard UC */
+#define PGC_WB 0 /* The default */
+#define PGC_WC PTE_PWT /* WT and CD is WC */
+#define PGC_UCMINUS PTE_PCD /* UC but mtrr can override */
+#define PGC_UC (PTE_PWT | PTE_PCD) /* hard UC */
/*
* page protection exception bits