summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Larkin <mlarkin@cvs.openbsd.org>2014-11-30 18:29:12 +0000
committerMike Larkin <mlarkin@cvs.openbsd.org>2014-11-30 18:29:12 +0000
commit3bfb68f093e13e3a9bcf99e6eb14726d8b2eb7cb (patch)
tree9f890a10b104f6b48df60125a94185991180ffe3
parent612db519921b0bcaf7cbd7ecf10aca71c1c78271 (diff)
Mask out EFER_LMA when restoring saved EFER on zzz/ZZZ resume as it's a
read only bit. Also fix some comments describing EFER bits that were obviously wrong. ok deraadt@
-rw-r--r--sys/arch/amd64/amd64/acpi_wakecode.S4
-rw-r--r--sys/arch/amd64/include/specialreg.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/amd64/amd64/acpi_wakecode.S b/sys/arch/amd64/amd64/acpi_wakecode.S
index f30d01254ca..548060b9563 100644
--- a/sys/arch/amd64/amd64/acpi_wakecode.S
+++ b/sys/arch/amd64/amd64/acpi_wakecode.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi_wakecode.S,v 1.31 2014/11/22 18:31:46 mlarkin Exp $ */
+/* $OpenBSD: acpi_wakecode.S,v 1.32 2014/11/30 18:29:11 mlarkin Exp $ */
/*
* Copyright (c) 2001 Takanori Watanabe <takawata@jp.freebsd.org>
* Copyright (c) 2001 Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
@@ -198,7 +198,7 @@ _C_LABEL(acpi_protected_mode_resume):
* out here.
*/
movl acpi_saved_efer, %ebx
- andl $(EFER_LME | EFER_LMA | EFER_NXE | EFER_SCE), %ebx
+ andl $(EFER_LME | EFER_NXE | EFER_SCE), %ebx
/*
* Set up a temporary long mode GDT describing 2
diff --git a/sys/arch/amd64/include/specialreg.h b/sys/arch/amd64/include/specialreg.h
index e8579bc7f4c..735b7cf89cf 100644
--- a/sys/arch/amd64/include/specialreg.h
+++ b/sys/arch/amd64/include/specialreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: specialreg.h,v 1.28 2014/07/03 21:15:28 matthew Exp $ */
+/* $OpenBSD: specialreg.h,v 1.29 2014/11/30 18:29:11 mlarkin Exp $ */
/* $NetBSD: specialreg.h,v 1.1 2003/04/26 18:39:48 fvdl Exp $ */
/* $NetBSD: x86/specialreg.h,v 1.2 2003/04/25 21:54:30 fvdl Exp $ */
@@ -374,8 +374,8 @@
#define MSR_EFER 0xc0000080 /* Extended feature enable */
#define EFER_SCE 0x00000001 /* SYSCALL extension */
-#define EFER_LME 0x00000100 /* Long Mode Active */
-#define EFER_LMA 0x00000400 /* Long Mode Enabled */
+#define EFER_LME 0x00000100 /* Long Mode Enabled */
+#define EFER_LMA 0x00000400 /* Long Mode Active */
#define EFER_NXE 0x00000800 /* No-Execute Enabled */
#define MSR_STAR 0xc0000081 /* 32 bit syscall gate addr */