]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ACPICA: Hardware: Enable firmware waking vector for both 32-bit and 64-bit FACS
authorLv Zheng <lv.zheng@intel.com>
Wed, 1 Jul 2015 06:43:18 +0000 (14:43 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 1 Jul 2015 21:17:52 +0000 (23:17 +0200)
commitf06147f9fbf134c0258bd53aebeb4ed5efea5a25
treefc307fd7b60a4d96c7b64590171fff5affb09f24
parentc04e1fb4396d27f18296db0f914760fa7fe8223a
ACPICA: Hardware: Enable firmware waking vector for both 32-bit and 64-bit FACS

ACPICA commit 368eb60778b27b6ae94d3658ddc902ca1342a963
ACPICA commit 70f62a80d65515e1285fdeeb50d94ee6f07df4bd
ACPICA commit a04dbfa308a48ab0b2d10519c54a6c533c5c8949
ACPICA commit ebd544ed24c5a4faba11f265e228b7a821a729f5

The following commit is reported to have broken s2ram on some platforms:
 Commit: 0249ed2444d65d65fc3f3f64f398f1ad0b7e54cd
 ACPICA: Add option to favor 32-bit FADT addresses.
The platform reports 2 FACS tables (which is not allowed by ACPI
specification) and the new 32-bit address favor rule forces OSPMs to use
the FACS table reported via FADT's X_FIRMWARE_CTRL field.

The root cause of the reported bug might be one of the followings:
1. BIOS may favor the 64-bit firmware waking vector address when the
   version of the FACS is greater than 0 and Linux currently only supports
   resuming from the real mode, so the 64-bit firmware waking vector has
   never been set and might be invalid to BIOS while the commit enables
   higher version FACS.
2. BIOS may favor the FACS reported via the "FIRMWARE_CTRL" field in the
   FADT while the commit doesn't set the firmware waking vector address of
   the FACS reported by "FIRMWARE_CTRL", it only sets the firware waking
   vector address of the FACS reported by "X_FIRMWARE_CTRL".

This patch excludes the cases that can trigger the bugs caused by the root
cause 2.

There is no handshaking mechanism can be used by OSPM to tell BIOS which
FACS is currently used. Thus the FACS reported by "FIRMWARE_CTRL" may still
be used by BIOS and the 0 value of the 32-bit firmware waking vector might
trigger such failure.

This patch enables the firmware waking vectors for both 32bit/64bit FACS
tables in order to ensure we can exclude the cases that trigger the bugs
caused by the root cause 2. The exclusion is split into 2 commits so that
if it turns out not to be necessary, this single commit can be reverted
without affecting the useful one. Lv Zheng, Bob Moore.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=74021
Link: https://github.com/acpica/acpica/commit/368eb607
Link: https://github.com/acpica/acpica/commit/70f62a80
Link: https://github.com/acpica/acpica/commit/a04dbfa3
Link: https://github.com/acpica/acpica/commit/ebd544ed
Reported-and-tested-by: Oswald Buddenhagen <ossi@kde.org>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/acglobal.h
drivers/acpi/acpica/hwxfsleep.c
drivers/acpi/acpica/tbutils.c