From patchwork Tue Feb 6 06:37:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shunyong Yang X-Patchwork-Id: 10202391 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7185D60134 for ; Tue, 6 Feb 2018 06:41:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 599E528A11 for ; Tue, 6 Feb 2018 06:41:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E26C28A24; Tue, 6 Feb 2018 06:41:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2AEEB28A11 for ; Tue, 6 Feb 2018 06:41:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752293AbeBFGlx (ORCPT ); Tue, 6 Feb 2018 01:41:53 -0500 Received: from mx01.hxt-semitech.com.96.203.223.in-addr.arpa ([223.203.96.7]:37443 "EHLO barracuda.hxt-semitech.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752068AbeBFGlx (ORCPT ); Tue, 6 Feb 2018 01:41:53 -0500 X-ASG-Debug-ID: 1517899309-093b7e4cf11fb90001-I98ny2 Received: from HXTBJIDCEMVIW01.hxtcorp.net (localhost [10.128.0.14]) by barracuda.hxt-semitech.com with ESMTP id qVZhmZjtuJOtZUOA (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 06 Feb 2018 14:41:49 +0800 (CST) X-Barracuda-Envelope-From: shunyong.yang@hxt-semitech.com Received: from y.localdomain (10.5.21.109) by HXTBJIDCEMVIW01.hxtcorp.net (10.128.0.14) with Microsoft SMTP Server (TLS) id 15.0.847.32; Tue, 6 Feb 2018 14:41:59 +0800 From: Yang Shunyong To: CC: , , , Yang Shunyong , Joey Zheng , Wang Dongsheng , Jiang Yutang , Hanjun Guo Subject: [PATCH v4] ACPI / tables: Add IORT to injectable table list Date: Tue, 6 Feb 2018 14:37:12 +0800 X-ASG-Orig-Subj: [PATCH v4] ACPI / tables: Add IORT to injectable table list Message-ID: <1517899032-39073-1-git-send-email-shunyong.yang@hxt-semitech.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.5.21.109] X-ClientProxiedBy: HXTBJIDCEMVIW01.hxtcorp.net (10.128.0.14) To HXTBJIDCEMVIW01.hxtcorp.net (10.128.0.14) X-Barracuda-Connect: localhost[10.128.0.14] X-Barracuda-Start-Time: 1517899309 X-Barracuda-Encrypted: ECDHE-RSA-AES256-SHA X-Barracuda-URL: https://192.168.50.101:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at hxt-semitech.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.4997 1.0000 0.0000 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.47617 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Loading IORT table from initrd can be used to fix severe firmware IORT defects temporarily before platform/BIOS vendor releases an upgraded BIOS binary. Moreover, it is very powerful to debug SMMU node/device probe, MSI allocation, stream id translation and IORT table from firmware. It is also very useful to enable SMMU and devices behind SMMU before firmware is ready. This patch adds ACPI_SIG_IORT to the table, which enables IORT from initrd to override which from firmware. Cc: Joey Zheng Cc: Wang Dongsheng Cc: Jiang Yutang Cc: Hanjun Guo Signed-off-by: Yang Shunyong Acked-by: Hanjun Guo --- v4: Add more accurate description for fix operation in commit message according to Dongsheng and Hangjun's suggestion. v3: Add more detailed commit message according to Hanjun's suggestion. v2: Change typo ACPI_SIG_PPTT to ACPI_SIG_IORT in commit message. --- drivers/acpi/tables.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index 80ce2a7d224b..7bcb66ccccf3 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -456,7 +456,8 @@ static u8 __init acpi_table_checksum(u8 *buffer, u32 length) ACPI_SIG_SLIC, ACPI_SIG_SPCR, ACPI_SIG_SPMI, ACPI_SIG_TCPA, ACPI_SIG_UEFI, ACPI_SIG_WAET, ACPI_SIG_WDAT, ACPI_SIG_WDDT, ACPI_SIG_WDRT, ACPI_SIG_DSDT, ACPI_SIG_FADT, ACPI_SIG_PSDT, - ACPI_SIG_RSDT, ACPI_SIG_XSDT, ACPI_SIG_SSDT, NULL }; + ACPI_SIG_RSDT, ACPI_SIG_XSDT, ACPI_SIG_SSDT, ACPI_SIG_IORT, + NULL }; #define ACPI_HEADER_SIZE sizeof(struct acpi_table_header)