]> git.baikalelectronics.ru Git - kernel.git/commit
ACPICA: Tables: Add mechanism to control early table checksum verification.
authorLv Zheng <lv.zheng@intel.com>
Sat, 31 May 2014 00:14:44 +0000 (08:14 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 31 May 2014 22:18:52 +0000 (00:18 +0200)
commit662f5a23eaefc7680d9495b818e9ce53ea0018b9
treebc1415fd1b1ead6a1fe0818458f890ebed2ec4e1
parent53813bf9070d7fb502d88223f205ea1f0cc98eed
ACPICA: Tables: Add mechanism to control early table checksum verification.

It is reported that Linux x86 kernel cannot map large tables. The following
large SSDT table on such platform fails to pass checksum verification and
cannot be installed:
 ACPI: SSDT 0x00000000B9638018 07A0C4 (v02 INTEL  S2600CP  00004000 INTL 20100331)

It sounds strange that in the 64-bit virtual memory address space, we
cannot map a single ACPI table to do checksum verification. The root cause
is:
 1. ACPICA doesn't split IO memory mapping and table mapping;
 2. Linux x86 OSL implements acpi_os_map_memory() using a size limited fix-map
    mechanism during early boot stage, which is more suitable for only IO
    mappings.

ACPICA originally only mapped table header for signature validation, and
this header mapping is required by OSL override mechanism. There was no
checksum verification because we could not map the whole table using this
OSL. While the following ACPICA commit enforces checksum verification by
mapping the whole table during Linux boot stage and it finally triggers
this issue on some platforms:
 Commit: 329947bc902dcdf7a0b02f1ca9cbaac30d165286
 Subject: ACPICA: Tables: Fix table checksums verification before installation.

Before doing further cleanups for the OSL table mapping and override
implementation, this patch introduces an option for such OSPMs to
temporarily discard the checksum verification feature. It then can be
re-enabled easily when the ACPICA and the underlying OSL is ready.

This patch also deletes a comment around the limitation of mappings because
it is not correct. The limitation is not how many times we can map in the
early stage, but the OSL mapping facility may not be suitable for mapping
the ACPI tables and thus may complain us the size limitation.

The acpi_tb_verify_table() is renamed to acpi_tb_verify_temp_table() due to the
work around added, it now only applies to the table descriptor that hasn't
been installed and cannot be used in other cases. Lv Zheng.

Tested-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/actables.h
drivers/acpi/acpica/tbdata.c
drivers/acpi/acpica/tbinstal.c
drivers/acpi/acpica/tbutils.c
include/acpi/acpixf.h