diff options
author | 2014-11-30 18:29:11 +0000 | |
---|---|---|
committer | 2014-11-30 18:29:11 +0000 | |
commit | 0620a56fa90bf09bb0b73019a15d5a213bae1897 (patch) | |
tree | e297bc29e34f40232c27294a8670d54fb5e169c9 | |
parent | Fix comment: We don't use RC4 anymore, it's better to be more (diff) | |
download | wireguard-openbsd-0620a56fa90bf09bb0b73019a15d5a213bae1897.tar.xz wireguard-openbsd-0620a56fa90bf09bb0b73019a15d5a213bae1897.zip |
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.S | 4 | ||||
-rw-r--r-- | sys/arch/amd64/include/specialreg.h | 6 |
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 */ |