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 Actually, put the NOX identification abov...
details: https://anonhg.NetBSD.org/src/rev/1a1940167d24
branches: trunk
changeset: 345243:1a1940167d24
user: maxv <maxv%NetBSD.org@localhost>
date: Sat May 14 09:51:56 2016 +0000
description:
Actually, put the NOX identification above. Old CPUs do not support the
cpuid instruction.
diffstat:
sys/arch/i386/i386/locore.S | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diffs (52 lines):
diff -r 59a3e422d03b -r 1a1940167d24 sys/arch/i386/i386/locore.S
--- a/sys/arch/i386/i386/locore.S Sat May 14 09:37:21 2016 +0000
+++ b/sys/arch/i386/i386/locore.S Sat May 14 09:51:56 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.121 2016/05/14 08:49:16 maxv Exp $ */
+/* $NetBSD: locore.S,v 1.122 2016/05/14 09:51:56 maxv Exp $ */
/*
* Copyright-o-rama!
@@ -128,7 +128,7 @@
*/
#include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.121 2016/05/14 08:49:16 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.122 2016/05/14 09:51:56 maxv Exp $");
#include "opt_compat_oldboot.h"
#include "opt_copy_symtab.h"
@@ -555,6 +555,16 @@
cpuid
movl %eax,RELOC(cpuid_level)
+ /*
+ * Retrieve the NX/XD flag. We use the 32bit version of PG_NX.
+ */
+ movl $0x80000001,%eax
+ cpuid
+ andl $CPUID_NOX,%edx
+ jz no_NOX
+ movl $PG_NX32,RELOC(nox_flag)
+no_NOX:
+
2:
/*
* Finished with old stack; load new %esp now instead of later so we
@@ -571,16 +581,6 @@
*/
movl $_RELOC(tmpstk),%esp
- /*
- * Retrieve the NX/XD flag. We use the 32bit version of PG_NX.
- */
- movl $0x80000001,%eax
- cpuid
- andl $CPUID_NOX,%edx
- jz no_NOX
- movl $PG_NX32,RELOC(nox_flag)
-no_NOX:
-
/*
* There are two different layouts possible, depending on whether PAE is
* enabled or not.
Home |
Main Index |
Thread Index |
Old Index