Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 Actually, make the NOX part amd64-specific....
details: https://anonhg.NetBSD.org/src/rev/45c0d93d6e12
branches: trunk
changeset: 345218:45c0d93d6e12
user: maxv <maxv%NetBSD.org@localhost>
date: Fri May 13 11:47:02 2016 +0000
description:
Actually, make the NOX part amd64-specific. The secondary CPUs bug is not
yet fixed on i386.
diffstat:
sys/arch/x86/x86/pmap.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (43 lines):
diff -r 109fd36fbf8a -r 45c0d93d6e12 sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c Fri May 13 11:17:20 2016 +0000
+++ b/sys/arch/x86/x86/pmap.c Fri May 13 11:47:02 2016 +0000
@@ -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 @@
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 @@
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();
}
}
Home |
Main Index |
Thread Index |
Old Index