Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2161456pxb; Fri, 25 Mar 2022 12:10:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCxJcHpN4M1Ktuop38lh6+G97/n3/swjaufMPE5yk5YNW1u40Fv476nbrW5JKkZordAnfY X-Received: by 2002:a62:8647:0:b0:4fa:dff3:4614 with SMTP id x68-20020a628647000000b004fadff34614mr11671509pfd.5.1648235455710; Fri, 25 Mar 2022 12:10:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648235455; cv=none; d=google.com; s=arc-20160816; b=Qq7UYG+mMNQsl95ligu9hgKlS5XB2B4JEaH+vAA9Z1ndgqicyD8tOeT2MBYeKd7YV8 W3PQ9nWX7sPVGDcxZtLNV3iY5+nGbIgz0H3gwdJQqwYRHZeAoZhcCEIHzECaKOe7G1du i9h0XmNt3Pd6P/XbPJezlt9NHczaFrxtq0eFQx/cfzzgAptgJEDBD7NdfcZPlgyX1w33 I9CfIB1dvesft15LjV4j0i1s64hRowDoj7j5NbNEL9SgePYQrQ4JwA9jJNwxnuylByzP lwiHY8fTJMY4fKIbp3N8PCWwTnNllkA+zPvYMk8zdbJMfXyYfgZISqaxXx3e0SynuoUn jy7g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9p/vcrwqBOrP0KbaFxiNL9/Owbq2Z1Di93pUOF5XMtU=; b=t86fEppusM79oRkgQCubNjyZtxCgYS6Cq54EgIIfFPz5EcdzkL37boiY4NP7AjL5Q4 Ln+eRU1AUHgvlfeJ45bqSngYC9CuzWfAVle/V9mDlVPVJYRuT+6A73hj8Yf/EwrirXTA 8U+0z7AmwwsqsAhykrw7ojLpphuesIHqeBqp0SLkV/KbzWzarVukGH0vmwmL5d64vnmY IuLSBOLRllneIhTqpvQsrteFtuJStG842HENCFS9XPVdTKStpDQcmei8z+qGoUQaBjpg IEfXm7QYYxx7xgsx9RifXx/aM7zXxzugsSPzqM67jLFLWmiW/WPVf03KOdWRnDb/+8aJ ZfXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="h2v/ag+F"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id lx16-20020a17090b4b1000b001c71583fda1si3775708pjb.29.2022.03.25.12.10.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 12:10:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="h2v/ag+F"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 34E5E1FF216; Fri, 25 Mar 2022 11:14:50 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376777AbiCYPaR (ORCPT + 99 others); Fri, 25 Mar 2022 11:30:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377834AbiCYPYi (ORCPT ); Fri, 25 Mar 2022 11:24:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAD12DFDCF; Fri, 25 Mar 2022 08:19:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0EEBF60C86; Fri, 25 Mar 2022 15:19:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2100AC340E9; Fri, 25 Mar 2022 15:19:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1648221543; bh=wbVzCmsC9GRDSscRfLJ+281cXygqPHZB/gvOOdKZGuM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h2v/ag+FKg2UbxBLW6n1vb98w67Tk9oGv3ehjJXAMxA1qUj7TuHEjBL2bmt3kJUpP X7arQ9gKD70CrNosNg34Gkct75+BZ2aoqmYjuxJAnYACAFaSI8Ib72Xpm5I5BAEL4h ex8MjmmHXpB5HiYKeDu/+SZ15gnyDiA/fwf4WyeU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Cilissen , Hans de Goede , "Rafael J. Wysocki" Subject: [PATCH 5.17 22/39] ACPI / x86: Work around broken XSDT on Advantech DAC-BJ01 board Date: Fri, 25 Mar 2022 16:14:37 +0100 Message-Id: <20220325150420.877841956@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220325150420.245733653@linuxfoundation.org> References: <20220325150420.245733653@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Mark Cilissen commit e702196bf85778f2c5527ca47f33ef2e2fca8297 upstream. 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: All applicable Reviewed-by: Hans de Goede Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/acpi/boot.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) --- 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 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_d 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_VERSION, "V1.12"), + DMI_MATCH(DMI_BIOS_DATE, "02/01/2011"), + }, + }, {} };