1
0
Fork 0
mirror of https://github.com/followmsi/android_kernel_google_msm.git synced 2024-11-06 23:17:41 +00:00
android_kernel_google_msm/include/acpi
Lv Zheng c77676b7c6 ACPICA: Utilities: split IO address types from data type models.
commit 2b8760100e1de69b6ff004c986328a82947db4ad upstream.

ACPICA commit aacf863cfffd46338e268b7415f7435cae93b451

It is reported that on a physically 64-bit addressed machine, 32-bit kernel
can trigger crashes in accessing the memory regions that are beyond the
32-bit boundary. The region field's start address should still be 32-bit
compliant, but after a calculation (adding some offsets), it may exceed the
32-bit boundary. This case is rare and buggy, but there are real BIOSes
leaked with such issues (see References below).

This patch fixes this gap by always defining IO addresses as 64-bit, and
allows OSPMs to optimize it for a real 32-bit machine to reduce the size of
the internal objects.

Internal acpi_physical_address usages in the structures that can be fixed
by this change include:
 1. struct acpi_object_region:
    acpi_physical_address		address;
 2. struct acpi_address_range:
    acpi_physical_address		start_address;
    acpi_physical_address		end_address;
 3. struct acpi_mem_space_context;
    acpi_physical_address		address;
 4. struct acpi_table_desc
    acpi_physical_address		address;
See known issues 1 for other usages.

Note that acpi_io_address which is used for ACPI_PROCESSOR may also suffer
from same problem, so this patch changes it accordingly.

For iasl, it will enforce acpi_physical_address as 32-bit to generate
32-bit OSPM compatible tables on 32-bit platforms, we need to define
ACPI_32BIT_PHYSICAL_ADDRESS for it in acenv.h.

Known issues:
 1. Cleanup of mapped virtual address
   In struct acpi_mem_space_context, acpi_physical_address is used as a virtual
   address:
    acpi_physical_address                   mapped_physical_address;
   It is better to introduce acpi_virtual_address or use acpi_size instead.
   This patch doesn't make such a change. Because this should be done along
   with a change to acpi_os_map_memory()/acpi_os_unmap_memory().
   There should be no functional problem to leave this unchanged except
   that only this structure is enlarged unexpectedly.

Link: https://github.com/acpica/acpica/commit/aacf863c
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=87971
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=79501
Reported-and-tested-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reported-and-tested-by: Sial Nije <sialnije@gmail.com>
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>
[lizf: Backported to 3.4: adjust context]
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-09-18 09:20:30 +08:00
..
platform ACPICA: Utilities: split IO address types from data type models. 2015-09-18 09:20:30 +08:00
acconfig.h ACPICA: Support for custom ACPICA build for ACPI 5 reduced hardware 2012-03-22 01:44:49 -04:00
acexcep.h Merge branch 'tboot' into release 2012-03-30 16:38:59 -04:00
acnames.h ACPICA: Clarify METHOD_NAME* defines for full-pathname cases 2012-03-22 01:45:53 -04:00
acoutput.h ACPICA: Fix unresolved name issue for no-debug and no-error-msg cases 2011-03-02 19:38:04 -05:00
acpi.h ACPICA: Update all ACPICA copyrights and signons to 2011 2011-01-18 23:48:03 -05:00
acpi_bus.h ACPI, PCI: Move acpi_dev_run_wake() to ACPI core 2012-03-30 02:21:18 -04:00
acpi_drivers.h ACPI: Fix CONFIG_ACPI_DOCK=n compiler warning 2011-11-06 20:58:17 -05:00
acpi_numa.h ACPI: Store SRAT table revision 2012-01-17 04:19:04 -05:00
acpiosxf.h ACPICA: Add acpi_os_physical_table_override interface 2012-03-22 01:44:59 -04:00
acpixf.h ACPICA: Update to version 20120320 2012-03-30 01:45:14 -04:00
acrestyp.h ACPI 5.0: Support for all new resource descriptors 2012-01-17 03:36:30 -05:00
actbl.h ACPICA: ACPI 5: Support for new FADT SleepStatus, SleepControl registers 2012-03-22 01:44:34 -04:00
actbl1.h acpi/apei/einj: Add extensions to EINJ from rev 5.0 of acpi spec 2012-01-18 01:14:17 -05:00
actbl2.h ACPICA: Header support for SLIC table 2011-03-23 00:18:18 -04:00
actbl3.h ACPI 5.0: Add new/changed tables to headers 2012-01-17 03:36:28 -05:00
actypes.h ACPICA: Utilities: split IO address types from data type models. 2015-09-18 09:20:30 +08:00
apei.h module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
button.h ACPI: make ACPI button funcs no-ops if not built in 2009-09-17 14:48:23 -07:00
container.h
hed.h ACPI Hardware Error Device (PNP0C33) support 2010-05-19 22:40:24 -04:00
pdc_intel.h
processor.h Merge 3.3-rc2 into the driver-core-next branch. 2012-02-02 11:24:44 -08:00
reboot.h
video.h i915: Fix opregion notifications 2011-07-13 11:19:47 -07:00