public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Zhao Yakui <yakui.zhao@intel.com>
Cc: lenb@kernel.org, linux-acpi@vger.kernel.org, andi@firstfloor.org
Subject: Re: [PATCH]: ACPI : Set 32bit and 64bit waking vector in FCAS table
Date: Thu, 4 Sep 2008 11:48:50 +0200	[thread overview]
Message-ID: <200809041148.51401.rjw@sisk.pl> (raw)
In-Reply-To: <1220520475.4007.134.camel@yakui_zhao.sh.intel.com>

On Thursday, 4 of September 2008, Zhao Yakui wrote:
> On Thu, 2008-09-04 at 10:10 +0200, Rafael J. Wysocki wrote:
> > On Thursday, 4 of September 2008, Zhao Yakui wrote:
> > > Subject: ACPI : Set 32bit and 64bit waking vector in FCAS table
> > > From: Zhao Yakui <yakui.zhao@intel.com>
> > > 
> > >     On some laptops only the 64bit waking vecotr is set for ACPI 2.0 FACS.
> > > But when the system is resumed, BIOS will transfer control directly to 
> > > 32bit waking vector. In such case the system can't be resumed correctly.
> > >     Maybe it will be more appropriate that both the 32bit and 64bit waking 
> > > vector will be set for the ACPI 2.0 FACS when the system enters the S3 
> > > sleeping state.
> > > 
> > >  http://bugzilla.kernel.org/show_bug.cgi?id=11368
> > 
> > Well, the spec (2.0c) says we should use facs->firmware_waking_vector only
> > if facs->xfirmware_waking_vector is zero, so I'm afraid this change may cause
> > regressions to happen.
> The 32bit and 64bit waking vector are for BIOS. For the ACPI 2.0 FACS
> after the system is resumed, firmware will check whether the 64bit
> waking vector is zero. If not zero, it will transfer controls to 64 bit
> waking vector address. If zero, it will then check whether the 32bit is
> zero. If not zero, it will transfer controls to the 32bit waking vector
> address. 
> If bios can follow above check, it is ok to set only one. And another is
> set to zero. But if BIOS can't follow above check and only 64bit waking
> vector is set, maybe the system can't be resumed very well.

I understand that, but I'm not sure what happens if we set
facs->firmware_waking_vector even though the BIOS expects us not to set it
(probably nothing, but still).  In fact we should test that on all machines
known to work with the current code and that's impossible.  Let's just
add quirks for BIOSes that don't follow the spec (we can extend the
acpi_sleep= option for that too for the user's convenience).

> > Moreover, both 1.0b and 2.0c say that facs->length should be at least 64 bytes,
> > so the (facs->length >= 32) check is actually redundant (unless there is a
> > quirk setting this value below 32 for some broken systems I'm not aware of).
> What you said is right. In ACPI 1.0b FACS the length is also 64 Bytes. 
> We should use the facs->version to determine whether 64bit waking vector
> needs to be set.

Well, yes.  It's possible that some buggy BIOSes provide non-zero
facs->xfirmware_waking_vector although they shouldn't.  Still, there may be
broken BIOSes that set both facs->version and facs->xfirmware_waking_vector
although they shouldn't. :-)

In any case, I think we should add quirks for buggy BIOSes rather than slightly
depart from the spec in order to handle them.

Thanks,
Rafael

      reply	other threads:[~2008-09-04  9:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-04  5:51 [PATCH]: ACPI : Set 32bit and 64bit waking vector in FCAS table Zhao Yakui
2008-09-04  8:10 ` Rafael J. Wysocki
2008-09-04  9:18   ` Zhang Rui
2008-09-04  9:37     ` Rafael J. Wysocki
2008-09-04 12:07       ` Matthew Garrett
2008-09-05  1:17         ` Zhao Yakui
2008-09-05  1:21           ` Li, Shaohua
2008-09-05 10:48             ` Rafael J. Wysocki
2008-09-06 11:13             ` [PATCH] ACPI suspend: Always use the 32-bit waking vector Rafael J. Wysocki
2008-09-14 11:46               ` Pavel Machek
2008-09-14 23:56                 ` Rafael J. Wysocki
2008-09-15  9:50               ` Pavel Machek
2008-09-17  5:46                 ` Rafael J. Wysocki
2008-09-17  7:29                   ` Pavel Machek
2008-09-15 11:18               ` ACPI suspend: test 64-bit waking vector (was Re: [PATCH] ACPI suspend: Always use the 32-bit waking vector) Pavel Machek
2008-09-17  5:45                 ` Rafael J. Wysocki
2008-09-17  7:28                   ` Pavel Machek
2008-09-17 16:58                     ` Rafael J. Wysocki
2008-09-24  7:17               ` [PATCH] ACPI suspend: Always use the 32-bit waking vector Len Brown
2008-09-04  9:27   ` [PATCH]: ACPI : Set 32bit and 64bit waking vector in FCAS table Zhao Yakui
2008-09-04  9:48     ` Rafael J. Wysocki [this message]

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=200809041148.51401.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=andi@firstfloor.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=yakui.zhao@intel.com \
    /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