summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMike Larkin <mlarkin@cvs.openbsd.org>2014-11-27 17:35:13 +0000
committerMike Larkin <mlarkin@cvs.openbsd.org>2014-11-27 17:35:13 +0000
commitc6cf3930f61feed15a05318e2b67b95a28d17a3a (patch)
tree827ef6c15b655ff4fc08dd696f01b7da29d3085d /sys
parentcfd4d3ad863deab48b1605425c7ce30b540c8e08 (diff)
Missing comparison caused NX to always be enabled during boot, even on CPUs
that may have had it disabled in BIOS. ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/locore.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/locore.S b/sys/arch/amd64/amd64/locore.S
index a860c0bec71..eeecb1157b1 100644
--- a/sys/arch/amd64/amd64/locore.S
+++ b/sys/arch/amd64/amd64/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.59 2014/11/20 08:56:52 mlarkin Exp $ */
+/* $OpenBSD: locore.S,v 1.60 2014/11/27 17:35:12 mlarkin Exp $ */
/* $NetBSD: locore.S,v 1.13 2004/03/25 18:33:17 drochner Exp $ */
/*
@@ -598,7 +598,8 @@ cont:
xorl %eax,%eax /* XXX */
orl $(EFER_LME|EFER_SCE),%eax
movl RELOC((pg_nx + 4)), %ebx
- jz write_efer
+ cmpl $0, %ebx
+ je write_efer
orl $(EFER_NXE), %eax
write_efer:
wrmsr