Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jun 2017 15:20:25 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Alexey Dokuchaev <danfe@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r316767 - head/sys/amd64/amd64
Message-ID:  <20170611122025.GP2088@kib.kiev.ua>
In-Reply-To: <20170611041357.GA19892@FreeBSD.org>
References:  <201704131549.v3DFnt9I004050@repo.freebsd.org> <20170610235125.GA3587@FreeBSD.org> <20170611041357.GA19892@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jun 11, 2017 at 04:13:57AM +0000, Alexey Dokuchaev wrote:
> On Sat, Jun 10, 2017 at 11:51:25PM +0000, Alexey Dokuchaev wrote:
> > On Thu, Apr 13, 2017 at 03:49:55PM +0000, Konstantin Belousov wrote:
> > > New Revision: 316767
> > > URL: https://svnweb.freebsd.org/changeset/base/316767
> > > 
> > > Log:
> > >   Map DMAP as nx.
> > >   
> > >   Demotions preserve PG_NX, so it is enough to set nx bit for initial
> > >   lowest-level paging entries.
> > 
> > Hi Kostik,
> > 
> > It seems this change breaks resume with radeonkms(4): my laptop fells into
> > sleep, but upon resume it immediately reboots with kernels after r316767.
> > 
> > Reverting these two lines fixes resuming at least up to r316986, but the
> > latest -CURRENT still reboots, perhaps for another reason.
> 
> Second revision is r318318 which looks related to r316767.  Updating kernel
> to the latest revision and backing out these two (any one of them alone is
> not enough) fixed resume for me.
> 
> Apparently something else is required for nx-mapped DMAP.  Anything I can
> help with debugging this?

Do you claim that latest HEAD with reverted r316767 reboots on resume
on your machine ?  Please confirm.

Are you running on AMD CPU ?

I want to see the first 100 lines of verbose dmesg, and the
output of "cpucontrol -m 0xc0000080 /dev/cpuctl0".  Also, try the
following patch.

diff --git a/sys/x86/acpica/acpi_wakeup.c b/sys/x86/acpica/acpi_wakeup.c
index 74f4fedc28f..690f8b765f2 100644
--- a/sys/x86/acpica/acpi_wakeup.c
+++ b/sys/x86/acpica/acpi_wakeup.c
@@ -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?20170611122025.GP2088>