Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/i386 Use xpmap_pg_nx. Not tested (due to some ...



details:   https://anonhg.NetBSD.org/src/rev/63e6bf185fdd
branches:  trunk
changeset: 350813:63e6bf185fdd
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Jan 22 20:17:10 2017 +0000

description:
Use xpmap_pg_nx. Not tested (due to some unrelated panic I'm getting), but
obvious enough.

diffstat:

 sys/arch/i386/i386/machdep.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (46 lines):

diff -r a05dd7b6f8da -r 63e6bf185fdd sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c      Sun Jan 22 20:04:35 2017 +0000
+++ b/sys/arch/i386/i386/machdep.c      Sun Jan 22 20:17:10 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.776 2016/12/26 17:54:06 cherry Exp $     */
+/*     $NetBSD: machdep.c,v 1.777 2017/01/22 20:17:10 maxv Exp $       */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.776 2016/12/26 17:54:06 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.777 2017/01/22 20:17:10 maxv Exp $");
 
 #include "opt_beep.h"
 #include "opt_compat_ibcs2.h"
@@ -1006,11 +1006,11 @@
                 * which are in the callpath of pmap_kenter_pa().
                 * So we mash up our own - this is MD code anyway.
                 */
+               extern pt_entry_t xpmap_pg_nx;
                pt_entry_t pte;
-               pt_entry_t pg_nx = (cpu_feature[2] & CPUID_NOX ? PG_NX : 0);
 
                pte = pmap_pa2pte((vaddr_t)gdt - KERNBASE);
-               pte |= PG_k | PG_RO | pg_nx | PG_V;
+               pte |= PG_k | PG_RO | xpmap_pg_nx | PG_V;
 
                if (HYPERVISOR_update_va_mapping((vaddr_t)gdt, pte, UVMF_INVLPG) < 0) {
                        panic("gdt page RO update failed.\n");
@@ -1208,11 +1208,11 @@
 
        /* Reclaim the boot gdt page - see locore.s */
        {
+               extern pt_entry_t xpmap_pg_nx;
                pt_entry_t pte;
-               pt_entry_t pg_nx = (cpu_feature[2] & CPUID_NOX ? PG_NX : 0);
 
                pte = pmap_pa2pte((vaddr_t)tmpgdt - KERNBASE);
-               pte |= PG_k | PG_RW | pg_nx | PG_V;
+               pte |= PG_k | PG_RW | xpmap_pg_nx | PG_V;
 
                if (HYPERVISOR_update_va_mapping((vaddr_t)tmpgdt, pte, UVMF_INVLPG) < 0) {
                        panic("tmpgdt page relaim RW update failed.\n");



Home | Main Index | Thread Index | Old Index