svn commit: r319825 - head/sys/x86/acpica

Konstantin Belousov kib at FreeBSD.org
Sun Jun 11 14:39:09 UTC 2017


Author: kib
Date: Sun Jun 11 14:39:08 2017
New Revision: 319825
URL: https://svnweb.freebsd.org/changeset/base/319825

Log:
  More accurately handle early EFER restoration on resume.
  
  Do not try to set LMA bit while CPU is still in legacy mode.
  Apparently Intel CPUs ignore non-id writes to LMA, while AMD's
  (over-)react with #GP.
  
  Reported and tested by:	danfe
  Sponsored by:	The FreeBSD Foundation
  MFC after:	3 days

Modified:
  head/sys/x86/acpica/acpi_wakeup.c

Modified: head/sys/x86/acpica/acpi_wakeup.c
==============================================================================
--- head/sys/x86/acpica/acpi_wakeup.c	Sun Jun 11 14:33:16 2017	(r319824)
+++ head/sys/x86/acpica/acpi_wakeup.c	Sun Jun 11 14:39:08 2017	(r319825)
@@ -224,7 +224,8 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
 		WAKECODE_FIXUP(reset_video, uint8_t, (acpi_reset_video != 0));
 
 #ifdef __amd64__
-		WAKECODE_FIXUP(wakeup_efer, uint64_t, rdmsr(MSR_EFER));
+		WAKECODE_FIXUP(wakeup_efer, uint64_t, rdmsr(MSR_EFER) &
+		    ~(EFER_LMA));
 #else
 		WAKECODE_FIXUP(wakeup_cr4, register_t, pcb->pcb_cr4);
 #endif


More information about the svn-src-all mailing list