From owner-freebsd-acpi@FreeBSD.ORG Sun Nov 30 20:10:57 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12E1D1065672; Sun, 30 Nov 2008 20:10:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id ABAB78FC08; Sun, 30 Nov 2008 20:10:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from [212.86.226.226] (account mav@alkar.net HELO mavbook.mavhome.dp.ua) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPSA id 228427600; Sun, 30 Nov 2008 22:10:54 +0200 Message-ID: <4932F34C.1040804@FreeBSD.org> Date: Sun, 30 Nov 2008 22:10:52 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.17 (X11/20081029) MIME-Version: 1.0 To: Jung-uk Kim References: <1224616985.00027652.1224606603@10.7.7.3> <1224728582.00028075.1224715806@10.7.7.3> In-Reply-To: <1224728582.00028075.1224715806@10.7.7.3> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org, freebsd-amd64@freebsd.org, peter@freebsd.org Subject: Re: Semi-working patch for amd64 suspend/resume X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Nov 2008 20:10:57 -0000 Hi. Alexander Motin wrote: > Jung-uk Kim wrote: >> I was working on suspend/resume support for amd64 and this is the >> result. It works with a modified QEMU (QEMU does not support S3) but >> real boxes that I have don't seem to like it (e.g., broken BIOSes). >> If there is someone interested in finishing it off or giving it a try, >> the patch is here: >> >> http://people.freebsd.org/~jkim/amd64_suspend.diff > > I have tried it on my Acer TM6292. S1/S2 are unsupported. On S3 system > successfully got down, but on wakeup button, two seconds after power up, > even without video initialization, it shut down, reset and then started > usual boot. I have tried both original and updated BIOS, without any > difference. > > Can I give you any other help? I have spent a day investigating the problem. I was inserting empty infinite loop into the different points of wakeup process trying to find the place where system reboots. I just haven't found any other feedback channel as video is not initialized and beeper is not working for some reason. As result, I have found, that if I am inserting: qqq: jmp qqq lines before line 98 of acpi_switch.S: movl $MSR_MTRRdefType, %ecx movl WAKEUP_CTX(mtrr), %eax wrmsr system hangs, but if I insert it just after them - system reboots. With just commenting this three lines I was able to get successful suspend/resume with UP amd64 kernel!!! Here is problems I still have now: - SMP kernel resume is not working, system reboots while doing acpi_wakeup_cpus(); - SATA controller does not resumes correctly, it dies for some reason, reporting timeouts on any request; - text mode video does not restores on resume, while Xorg graphic one does. hw.acpi.reset_video=1 does not help, it just hanging resume process. -- Alexander Motin