Thread (1 message) 1 message, 1 author, 2008-01-08

Re: Suspend code ordering (again)

From: Shaohua Li <hidden>
Date: 2008-01-08 03:03:14

On Fri, 2007-12-28 at 08:25 +0800, Robert Hancock wrote:
Rafael J. Wysocki wrote: 
quoted
quoted
Also, as was pointed out, pre-Vista versions of Windows follow ACPI
1.0 
quoted
quoted
and Vista follows 3.0, so 2.0 doesn't really matter since BIOS
people 
quoted
quoted
won't test against it. 1.0 specifies that _PTS is to be called
before 
quoted
quoted
suspending devices and 3.0 says that the AML must not depend on
any 
quoted
quoted
specific device power state, so in both cases it should be safe to
call 
quoted
quoted
_PTS before suspending, no? 
Well, IMO, if we take one option only (whichever that is) and there
are systems 
quoted
that follow the other one, they will likely break. 

Apart from this, there are BIOSes that openly claim ACPI 2.0 support
(for 
quoted
example, the one in my HP nx6325 does that) and they may actually
prefer the 
quoted
post-ACPI-1.0 ordering even if they work with the pre-ACPI-2.0 one.
I doubt they would prefer the later ordering in any way that matters,
if 
the Windows version they were designed for uses the earlier ordering.

It would be best if somebody could manage to find out what ordering 
Windows XP (and Windows Vista, for good measure) actually use, then
we 
could just use that. Virtual machine trickery might be an option -
the 
only complication being that it'll be using the DSDT for the fake 
machine and not the real one..
I modified Qemu and use it to observe how winxp does suspend/resume. So
far, I just get some data for s4 suspend. I did have some interesting
finding.

1. xp seems not save pci config space. Or it appears just save config
PCICMD.
2. the order winxp does looks like
	a. save config (PCICMD), put device to D3 (it appears only for ne2000
NIC)
	b. _PTS
	c. write mem to disk
	d. write ACPI PM1_control register, then system shutdown
3. xp write ACPI GBL_EN bit just after _PTS (for both S4/S5), don't know
why

Attached is the log winxp does s4 suspend, it only includes pci config
read/write and ACPI register read/write.

I managed to make xp enter S3, but fails, so can't get the data for S3
so far. Anybody has other ideas which need to verify winxp, pls let me
know.

Thanks,
Shaohua

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help