Module Name: src Committed By: maxv Date: Fri May 13 11:47:02 UTC 2016
Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: Actually, make the NOX part amd64-specific. The secondary CPUs bug is not yet fixed on i386. To generate a diff of this commit: cvs rdiff -u -r1.192 -r1.193 src/sys/arch/x86/x86/pmap.c 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/x86/pmap.c diff -u src/sys/arch/x86/x86/pmap.c:1.192 src/sys/arch/x86/x86/pmap.c:1.193 --- src/sys/arch/x86/x86/pmap.c:1.192 Fri May 13 10:24:42 2016 +++ src/sys/arch/x86/x86/pmap.c Fri May 13 11:47:02 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.192 2016/05/13 10:24:42 maxv Exp $ */ +/* $NetBSD: pmap.c,v 1.193 2016/05/13 11:47:02 maxv Exp $ */ /*- * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. @@ -171,7 +171,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.192 2016/05/13 10:24:42 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.193 2016/05/13 11:47:02 maxv Exp $"); #include "opt_user_ldt.h" #include "opt_lockdebug.h" @@ -1343,7 +1343,12 @@ pmap_bootstrap(vaddr_t kva_start) for (/* */; kva + NBPD_L2 <= kva_end; kva += NBPD_L2, pa += NBPD_L2) { pde = &L2_BASE[pl2_i(kva)]; +#ifdef __x86_64__ *pde = pa | pmap_pg_g | PG_PS | pg_nx | PG_KR | PG_V; +#else + *pde = pa | pmap_pg_g | PG_PS | PG_KR | PG_V; +#endif + tlbflushg(); } @@ -1354,7 +1359,11 @@ pmap_bootstrap(vaddr_t kva_start) for (/* */; kva + NBPD_L2 <= kva_end; kva += NBPD_L2, pa += NBPD_L2) { pde = &L2_BASE[pl2_i(kva)]; +#ifdef __x86_64__ *pde = pa | pmap_pg_g | PG_PS | pg_nx | PG_KW | PG_V; +#else + *pde = pa | pmap_pg_g | PG_PS | PG_KW | PG_V; +#endif tlbflushg(); } }