• Lv Zheng's avatar
    ACPICA: Tables: Add mechanism to control early table checksum verification. · 47d68c7f
    Lv Zheng authored
    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: 86dfc6f3
     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: default avatarYuanhan Liu <yuanhan.liu@linux.intel.com>
    Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    47d68c7f
actables.h 5.35 KB