Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp428516pxm; Wed, 2 Mar 2022 01:06:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJw2wzK0dWfkuguie6Gejyyget14VWyo0eMU7ModYOS0GbqeZpHxA2edasu0ksozT9xACV6U X-Received: by 2002:a17:902:6a84:b0:14f:c378:51b9 with SMTP id n4-20020a1709026a8400b0014fc37851b9mr28780169plk.125.1646212010096; Wed, 02 Mar 2022 01:06:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646212010; cv=none; d=google.com; s=arc-20160816; b=sASoKlFQGjiogbwfrxFW6HjdPCmDz4sXCN57NLAXcp7ht9vNNbIAOcbVEkEaL5K+Fn 7VsZq5q0vlg2rwM4pIW4enZnvlf0pA6H0QBJZxKJZ28ShRm+poT3FyPLuTqaVTGHY9wA 29EHG21QrFlD7cYcGjQux70VCy8n0TF8OcKSCwXlrCoU/9tagnvqKjfTLhEiOMfNztDL +4zz/MaWVV1NUpHwhR17LSaUS+MyvUR5ShI7YgrU+KbuIwT0u7qXrEED0XmYdn724Rxm WB5LlcoC+s74+NPCzaFY3WVOMuUk6wtTozHAwN6IQb562OaKF9hYOXPzT/fpG4564XfD Im9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=ZPLV2jqAeH65KycreS1nxk1J+/tPHQWJCXOf2WrHUzE=; b=ScrXZqv+zRxRR3paw+e2xpflksUzV2IbEovpYBwOx1eZC6mInmSotM8S30OIWGGW4W 5wK9stE8map+NrefzMgvArv65FfkTffpfi6yS8V9yIQbS/IPwLVAUOl/QvBuP/J7tuGn W2JDLQoreh4ErT1CB60gX4iCVOWvlQoj+3O2cE03I6ko6e+6OgOrl+8cIDh48oxTffIe gRRWT6naKkiZoVP8foeV9nvb/W32UU6uZ2wC37kwDtMcNA+ua3vI6gjjJKXatIqrEDod 2SfSVplkCio4jb3+n2lryK/4VpKkbyj9cSScePGXw0jtT3WfbFN5KqfQUodMYw8f1kb+ PO/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yotsuba.nl header.s=fm2 header.b=IPimPJQa; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=TCsjVPYF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y2-20020a62f242000000b004f2765d1575si13566286pfl.193.2022.03.02.01.06.33; Wed, 02 Mar 2022 01:06:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@yotsuba.nl header.s=fm2 header.b=IPimPJQa; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=TCsjVPYF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239391AbiCBEJ4 (ORCPT + 99 others); Tue, 1 Mar 2022 23:09:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229980AbiCBEJz (ORCPT ); Tue, 1 Mar 2022 23:09:55 -0500 Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C71D3BA50; Tue, 1 Mar 2022 20:09:11 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 7F522580135; Tue, 1 Mar 2022 23:09:08 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 01 Mar 2022 23:09:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yotsuba.nl; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; bh=ZPLV2jqAeH65KycreS1nxk1J+/tPHQWJCXOf2WrHUzE=; b=IPimP JQa1EyYNtMQMZWlrOK+OvIapkwCxrplbQ2z6qIgTYaPBiQETpCjJwzmslFjTy5Jl UvL04YRs1MKm+oFacw8iOHGFr1WyasBL5Iew0Z03LF3cQAHXKqVKdiZjTBc8mKNn DCr1SicWBCTbfHD64yISNf9EuhwOJFn09bXPjN2LtNdx+ghL4Z22w4sGKVOgGbNO gGoxo2a6UowlfAj9tnLbxjC1IpW4flIUHVGQnszCHALY27avifp2mG6QPcgMLo36 buZ89TglRYV77G1yAAK4qNpYCXAFEoZzPAmOjMPwrcFxF7PyiTWGdRzu3HRkAuCM mDEYKCWRTpWWWMpcQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=ZPLV2jqAeH65KycreS1nxk1J+/tPH QWJCXOf2WrHUzE=; b=TCsjVPYFOn/dsuejo4rHXMcnE+vlw0/wHEq1YnFUq0pBs JrxEuz/5C0bMozhVu3jdyCNg9/ape5aAYk8hsmWBt67d6qEAWP5inuB2uLdf4oSE SVeqv34wqfCFjoE38Az/ZWgEUrUyFFi4bTuaUDPvN846u0wfnrIErP58Kq8xGERf VdECNCJOebpjr7t5DXvJFSCS7tbEPGxSaqbrWSTetKe8QSJMzgEPxS9guCk1QPI1 NXh+M06eawxbhAsLh9Jwc+fpxiJWjUXN9zGXaQCYE+dSXHMqU+K0nezqmhQjtnEi gwoMNAB8qsIuh/t3DcSDlyUmi8j/6ykv5Q6TC+42Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddruddtfedgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpeforghrkhcuvehi lhhishhsvghnuceomhgrrhhkseihohhtshhusggrrdhnlheqnecuggftrfgrthhtvghrnh epheduveehtdelfeekgfejudevhffghfehvdetffehgfelteelheelgefftdffudehnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrrhhkse ihohhtshhusggrrdhnlh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 1 Mar 2022 23:09:05 -0500 (EST) From: Mark Cilissen To: linux-acpi@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org Cc: Hans de Goede , "Rafael J. Wysocki" , Len Brown , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Mark Cilissen , kernel test robot Subject: [PATCH v2] ACPI / x86: Work around broken XSDT on Advantech DAC-BJ01 board Date: Wed, 2 Mar 2022 05:08:00 +0100 Message-Id: <20220302040800.10355-1-mark@yotsuba.nl> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On this board the ACPI RSDP structure points to both a RSDT and an XSDT, but the XSDT points to a truncated FADT. This causes all sorts of trouble and usually a complete failure to boot after the following error occurs: ACPI Error: Unsupported address space: 0x20 (*/hwregs-*) ACPI Error: AE_SUPPORT, Unable to initialize fixed events (*/evevent-*) ACPI: Unable to start ACPI Interpreter This leaves the ACPI implementation in such a broken state that subsequent kernel subsystem initialisations go wrong, resulting in among others mismapped PCI memory, SATA and USB enumeration failures, and freezes. As this is an older embedded platform that will likely never see any BIOS updates to address this issue and its default shipping OS only complies to ACPI 1.0, work around this by forcing `acpi=rsdt`. This patch, applied on top of Linux 5.10.102, was confirmed on real hardware to fix the issue. Signed-off-by: Mark Cilissen Cc: stable@vger.kernel.org Reviewed-by: Hans de Goede --- v2: - Reduce DMI match count to 4 to not overflow dmi_system_id structure Reported-by: kernel test robot - Change board ident to correct name - Fix small style issue - Fix up subject as per Rafael's changes As this patch is CC'd to stable, it seemed wiser to submit a V2 rather than an additional fixup patch to process. --- arch/x86/kernel/acpi/boot.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 5b6d1a95776f..b47338cd579d 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -1328,6 +1328,17 @@ static int __init disable_acpi_pci(const struct dmi_system_id *d) return 0; } +static int __init disable_acpi_xsdt(const struct dmi_system_id *d) +{ + if (!acpi_force) { + pr_notice("%s detected: force use of acpi=rsdt\n", d->ident); + acpi_gbl_do_not_use_xsdt = TRUE; + } else { + pr_notice("Warning: DMI blacklist says broken, but acpi XSDT forced\n"); + } + return 0; +} + static int __init dmi_disable_acpi(const struct dmi_system_id *d) { if (!acpi_force) { @@ -1451,6 +1462,19 @@ static const struct dmi_system_id acpi_dmi_table[] __initconst = { DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"), }, }, + /* + * Boxes that need ACPI XSDT use disabled due to corrupted tables + */ + { + .callback = disable_acpi_xsdt, + .ident = "Advantech DAC-BJ01", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "NEC"), + DMI_MATCH(DMI_PRODUCT_NAME, "Bearlake CRB Board"), + DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), + DMI_MATCH(DMI_BIOS_VERSION, "V1.12"), + }, + }, {} }; base-commit: 038101e6b2cd5c55f888f85db42ea2ad3aecb4b6 -- 2.28.0