Date: Sun, 11 Jun 2017 14:39:08 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319825 - head/sys/x86/acpica Message-ID: <201706111439.v5BEd8M7029064@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706111439.v5BEd8M7029064>