linux/include/acpi
Lv Zheng aca2a5d3a8 ACPICA: Hardware: Enable 64-bit firmware waking vector for selected FACS
ACPICA commit 7aa598d711644ab0de5f70ad88f1e2de253115e4

The following commit is reported to have broken s2ram on some platforms:
 Commit: 0249ed2444
 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 1.

ACPI specification says:
A. 32-bit FACS address (FIRMWARE_CTRL field in FADT):
   Physical memory address of the FACS, where OSPM and firmware exchange
   control information.
   If the X_FIRMWARE_CTRL field contains a non zero value then this field
   must be zero.
   A zero value indicates that no FACS is specified by this field.
B. 64-bit FACS address (X_FIRMWARE_CTRL field in FADT):
   64bit physical memory address of the FACS.
   This field is used when the physical address of the FACS is above 4GB.
   If the FIRMWARE_CTRL field contains a non zero value then this field
   must be zero.
   A zero value indicates that no FACS is specified by this field.
Thus the 32bit and 64bit firmware waking vector should indicate completely
different resuming environment - real mode (1MB addressable) and non real
mode (4GB+ addressable) and currently Linux only supports resuming from
real mode.

This patch enables 64-bit firmware waking vector for selected FACS via new
acpi_set_firmware_waking_vectors() API so that it's up to OSPMs to
determine which resuming mode should be used by BIOS and ACPICA changes
won't trigger the bugs caused by the root cause 1. Lv Zheng.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=74021
Link: https://github.com/acpica/acpica/commit/7aa598d7
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>
2015-07-01 23:17:52 +02:00
..
platform ACPICA: Linuxize: Reduce divergences for 20150616 release 2015-06-23 15:44:53 +02:00
acbuffer.h ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
acconfig.h ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
acexcep.h ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
acnames.h ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
acoutput.h kernel.h: remove ancient __FUNCTION__ hack 2015-02-12 18:54:13 -08:00
acpi_bus.h Merge branch 'device-properties' 2015-04-13 00:35:54 +02:00
acpi_drivers.h ACPI / PCI: Stub out pci_acpi_crs_quirks() and make it x86 specific 2014-05-07 01:09:47 +02:00
acpi_io.h ACPI: fix acpi_os_ioremap for arm64 2015-03-25 11:49:30 +00:00
acpi_lpat.h ACPI / LPAT: Common table processing functions 2015-01-29 21:02:10 +08:00
acpi_numa.h ACPI / numa: Make __acpi_map_pxm_to_node(), acpi_get_pxm() static 2014-02-03 10:39:38 -07:00
acpi.h ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
acpiosxf.h ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
acpixf.h ACPICA: Hardware: Enable 64-bit firmware waking vector for selected FACS 2015-07-01 23:17:52 +02:00
acrestyp.h ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
actbl1.h ACPICA: ACPI 6.0: Add support for NFIT table. 2015-05-22 03:22:21 +02:00
actbl2.h ACPICA: ACPI 6.0: Add support for IORT table. 2015-05-22 03:22:20 +02:00
actbl3.h ACPICA: ACPI 6.0: Add changes for DRTM table. 2015-05-22 03:22:20 +02:00
actbl.h ACPICA: ACPI 6.0: Add changes for FADT table. 2015-05-22 03:22:19 +02:00
actypes.h ACPICA: ACPI 6.0: Add ACPI_SUB_PTR(). 2015-05-22 03:22:20 +02:00
acuuid.h ACPICA: Fix for ill-formed GUID strings for NFIT tables. 2015-05-25 23:42:34 +02:00
apei.h acpi, apei, ghes: Factor out ioremap virtual memory for IRQ and NMI context. 2014-07-22 15:05:06 -07:00
button.h ACPI: make ACPI button funcs no-ops if not built in 2009-09-17 14:48:23 -07:00
ghes.h ACPICA: Restore error table definitions to reduce code differences between Linux and ACPICA upstream. 2014-06-16 22:33:50 +02:00
hed.h ACPI Hardware Error Device (PNP0C33) support 2010-05-19 22:40:24 -04:00
pdc_intel.h ACPI: Enable bit 11 in _PDC to advertise hw coord 2009-02-07 00:41:14 -05:00
processor.h ACPI / processor: Introduce phys_cpuid_t for CPU hardware ID 2015-03-26 15:12:51 +00:00
reboot.h Add the ability to reset the machine using the RESET_REG in ACPI's FADT table. 2008-07-16 23:27:08 +02:00
video.h ACPI / i915: ignore firmware requests for backlight change 2014-07-07 23:38:05 +02:00