public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: dagit-LP0vGzdgvNwj5TC/SZClsA@public.gmane.org
To: Shaohua Li <shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: stefandoesinger-RbZlAiThDcE@public.gmane.org,
	acpi-dev
	<acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	Matthew Garrett <mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>,
	lkml <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>
Subject: Re: S3 test tool (was : Re: Bizarre oops after suspend to RAM (was: Re: Resume from Suspend to RAM))
Date: Tue, 14 Jun 2005 00:25:42 -0700	[thread overview]
Message-ID: <87ll5diemh.fsf@www.codersbase.com> (raw)
In-Reply-To: <1118125410.3828.12.camel-ECwVeV2eNyQD0+JXs3kMbRL4W9x8LtSr@public.gmane.org> (Shaohua Li's message of "Tue, 07 Jun 2005 14:23:30 +0800")

[-- Attachment #1: Type: text/plain, Size: 2893 bytes --]

Shaohua Li <shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> writes:

> On Mon, 2005-06-06 at 23:31 +0800, stefandoesinger-RbZlAiThDcE@public.gmane.org wrote:
>> Am Montag, 6. Juni 2005 11:06 schrieb Matthew Garrett: 
>> > Whoops. May have been a bit too hasty there. I'm not sure why that 
>> > doesn't reset it, but we've now got the following (really rather
>> odd) 
>> > serial output. Does anyone have any idea what might be triggering
>> this? 
>> > Shell builtins work fine, but anything else seems to explode very 
>> > messily. Memory corruption of some description?
>> 
>> <snip> 
>> So it does reach the kernel, right? I don't know if I remembered that
>> call  
>> correctly, but "lcall $0xffff,$0" should call the real mode BIOS
>> reset  
>> code... 
>> Anyone else who can correct me here?
>> 
>> Perhaps the disk driver is going mad? Has anyone tried to boot a
>> kernel  
>> without any disk drivers with a minimal root system on an initrd?
> For those who suffer from strange S3 resume problem such as resume hang,
> could you please try this debug patch.
> It uses machine_real_restart to switch to real mode, and soon jump to
> the S3 wakeup address. So it simulates how BIOS resume a system from S3,
> but completely bypasses BIOS. If the system lives after S3 with the
> patch, at least we can know the suspend/resume code path is ok and it's
> not a Linux driver issue.

If you've looked at this bug you will know that myself at and atleast
one other person experience a reboot on resume at a specific line in
the wakeup code:
http://bugme.osdl.org/show_bug.cgi?id=3586

One note about the code in the bug, my code for detecting PM is
backwards, so ignore it, what I say in this email is still valid.

Specifically, if I get rid of the pushl;popl then the computer does
not reboot.  See the attached diff.  The question is 1) is this
pushl;popl the final nail in the coffin? 2) Does windows not clear the
flags completely, but instead sets them to some "special value"?

The reason for (1) is because as I understand it, when a certain
number of illegal operations (3 iirc) are issued at certain times
(real mode iirc) the machine automatically reboots.  That could be
what we are seeing here.

The reason for (2) is because if I remove the pushl;popl, boot into
windows suspend/resume, and immeditaly boot into linux then the
suspend/resume works.  I have screen blanking issues, but I can type
blindly and the commands all work just fine (I can startx for
example).

Also, what flags are being cleared?  What is their meaning?  Can you
or someone on this list point me to the approriate documentation?  I'd
love to look at it and try to understand my hardware better.

I would encourage others following this thread to try my patch and
the the trick of doing a suspend/resume in windows followed by a
reboot into linux where you try suspend/resume.

Thanks,
Jason


[-- Attachment #2: patch-popl.diff --]
[-- Type: text/plain, Size: 484 bytes --]

--- /home/dagit/kernels/linux-2.6.12-rc6/arch/i386/kernel/acpi/wakeup.S	2005-03-01 23:37:49.000000000 -0800
+++ arch/i386/kernel/acpi/wakeup.S	2005-06-13 23:24:30.000000000 -0700
@@ -34,8 +34,8 @@
 	mov	$(wakeup_stack - wakeup_code), %sp		# Private stack is needed for ASUS board
 	movw	$0x0e00 + 'S', %fs:(0x12)
 
-	pushl	$0						# Kill any dangerous flags
-	popfl
+#	pushl	$0						# Kill any dangerous flags
+#	popfl
 
 	movl	real_magic - wakeup_code, %eax
 	cmpl	$0x12345678, %eax

  parent reply	other threads:[~2005-06-14  7:25 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-05 12:56 Resume from Suspend to RAM Frank
     [not found] ` <200506051456.44810.hugelmopf-S0/GAf8tV78@public.gmane.org>
2005-06-05 13:37   ` Matthew Garrett
2005-06-05 15:56     ` Frank
2005-06-05 17:32     ` Stefan Dösinger
     [not found]       ` <200506051732.08854.stefandoesinger-RbZlAiThDcE@public.gmane.org>
2005-06-06 10:26         ` Matthew Garrett
2005-06-06 11:06           ` Bizarre oops after suspend to RAM (was: Re: [ACPI] Resume from Suspend to RAM) Matthew Garrett
2005-06-06 14:45             ` Pavel Machek
     [not found]               ` <20050606144501.GB2243-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2005-06-06 14:54                 ` Bizarre oops after suspend to RAM (was: " Matthew Garrett
     [not found]                   ` <20050606145429.GA18396-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
2005-06-06 15:09                     ` Pavel Machek
     [not found]                       ` <20050606150909.GA2230-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2005-06-07 14:14                         ` Martin Michlmayr
2005-06-06 15:31             ` Stefan Dösinger
2005-06-07  6:23               ` S3 test tool (was : Re: Bizarre oops after suspend to RAM (was: Re: [ACPI] Resume from Suspend to RAM)) Shaohua Li
     [not found]                 ` <1118125410.3828.12.camel-ECwVeV2eNyQD0+JXs3kMbRL4W9x8LtSr@public.gmane.org>
2005-06-07 12:07                   ` S3 test tool (was : Re: Bizarre oops after suspend to RAM (was: " Martin Michlmayr
     [not found]                     ` <20050607120727.GA6077-u+sgIaa8TU6A7rR/f+Zz5kHK5LHFu9C3@public.gmane.org>
2005-06-09 11:51                       ` Stefan Seyfried
     [not found]                         ` <20050609115134.GA31903-l0tNAEGuAhhzZ8+rp42Dbp9+tswZ0GTaehPwdyo5hKaELgA04lAiVw@public.gmane.org>
2005-06-09 14:38                           ` Matthew Garrett
     [not found]                             ` <1118327939.12491.44.camel-Xmbc1Sz64/5pghhO6/9/sx2eb7JE58TQ@public.gmane.org>
2005-06-09 15:29                               ` Stefan Seyfried
     [not found]                                 ` <20050609152943.GA3334-l0tNAEGuAhiXoBlonBaIS7NAH6kLmebB@public.gmane.org>
2005-06-09 17:51                                   ` Matthew Garrett
2005-06-07 15:32                   ` Frank
     [not found]                     ` <200506071732.23095.hugelmopf-S0/GAf8tV78@public.gmane.org>
2005-06-08  1:15                       ` Shaohua Li
     [not found]                         ` <1118193341.3857.4.camel-ECwVeV2eNyQD0+JXs3kMbRL4W9x8LtSr@public.gmane.org>
2005-06-10 18:49                           ` Frank Siegert
     [not found]                             ` <200506102049.42313.hugelmopf-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2005-06-12 20:55                               ` Christoph Tavan
     [not found]                                 ` <200506122255.38020.chefturner-S0/GAf8tV78@public.gmane.org>
2005-06-12 21:40                                   ` Jason Dagit
     [not found]                                     ` <878y1fjltd.fsf-mMfbam+mt929kzlf/Hu3QdBPR1lH4CV8@public.gmane.org>
2005-06-12 23:01                                       ` Christoph Tavan
     [not found]                                         ` <200506130101.20005.chefturner-S0/GAf8tV78@public.gmane.org>
2005-06-12 23:13                                           ` Matthew Garrett
2005-06-14 19:38                                             ` Display black after s3 resume, vbetool not working (was: Re: S3 test tool) Christoph Tavan
     [not found]                                               ` <200506142138.04603.chefturner-S0/GAf8tV78@public.gmane.org>
2005-06-14 20:18                                                 ` Christoph Tavan
2005-06-15 22:59                                                 ` Pavel Machek
     [not found]                                                   ` <20050615225918.GA5680-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2005-06-17 12:06                                                     ` Hanspeter Kunz
2005-06-19  9:11                                                 ` Stefan Seyfried
2005-06-12 23:19                                           ` S3 test tool (was : Re: Bizarre oops after suspend to RAM (was: Re: Resume from Suspend to RAM)) Jason Dagit
     [not found]                                             ` <87k6kzi2o7.fsf-mMfbam+mt929kzlf/Hu3QdBPR1lH4CV8@public.gmane.org>
2005-06-12 23:25                                               ` Jason Dagit
2005-06-13 10:55                                       ` Frank
2005-06-12 21:48                           ` Jason Dagit
     [not found]                             ` <87slzni6vu.fsf-mMfbam+mt929kzlf/Hu3QdBPR1lH4CV8@public.gmane.org>
2005-06-12 21:54                               ` Jason Dagit
2005-06-10  0:46                   ` Bernd Schubert
2005-06-14  7:25                   ` dagit-LP0vGzdgvNwj5TC/SZClsA [this message]
2005-06-14  8:47                     ` S3 test tool (was : Re: Bizarre oops after suspend to RAM (was: Re: [ACPI] " Matthew Garrett
2005-06-14 16:24                       ` S3 test tool (was : Re: Bizarre oops after suspend to RAM (was: " dagit-LP0vGzdgvNwj5TC/SZClsA
     [not found]                         ` <877jgw9a9c.fsf-mMfbam+mt929kzlf/Hu3QdBPR1lH4CV8@public.gmane.org>
2005-06-17 13:16                           ` Matthew Garrett
     [not found]                     ` <87ll5diemh.fsf-mMfbam+mt929kzlf/Hu3QdBPR1lH4CV8@public.gmane.org>
2005-06-14  9:06                       ` Pavel Machek
2005-06-14 15:51                         ` S3 test tool (was : Re: Bizarre oops after suspend to RAM (was: Re: [ACPI] " dagit
2005-06-14 21:37                           ` Pavel Machek
2005-06-14 22:01                             ` dagit
     [not found]                               ` <87u0k061jx.fsf-mMfbam+mt929kzlf/Hu3QdBPR1lH4CV8@public.gmane.org>
2005-06-14 22:09                                 ` S3 test tool (was : Re: Bizarre oops after suspend to RAM (was: " Pavel Machek
     [not found]                                   ` <20050614220911.GD2172-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2005-06-14 22:18                                     ` dagit-LP0vGzdgvNwj5TC/SZClsA
     [not found]                                       ` <87oea860rl.fsf-mMfbam+mt929kzlf/Hu3QdBPR1lH4CV8@public.gmane.org>
2005-06-14 23:11                                         ` Pavel Machek
2005-06-15  0:41                                           ` S3 test tool (was : Re: Bizarre oops after suspend to RAM (was: Re: [ACPI] " dagit
2005-06-15  0:50                                             ` dagit
     [not found]                                             ` <87ekb45u5a.fsf-mMfbam+mt929kzlf/Hu3QdBPR1lH4CV8@public.gmane.org>
2005-06-15 18:41                                               ` S3 test tool (was : Re: Bizarre oops after suspend to RAM (was: " Pavel Machek
2005-06-06 14:43           ` Resume from Suspend to RAM Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2005-06-13 11:47 S3 test tool (was : Re: Bizarre oops after suspend to RAM (was: Re: Resume from Suspend to RAM)) Li, Shaohua

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ll5diemh.fsf@www.codersbase.com \
    --to=dagit-lp0vgzdgvnwj5tc/szclsa@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org \
    --cc=pavel-+ZI9xUNit7I@public.gmane.org \
    --cc=shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=stefandoesinger-RbZlAiThDcE@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox