From owner-dev-commits-src-branches@freebsd.org Thu Feb 11 05:14:35 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F61253AAA8; Thu, 11 Feb 2021 05:14:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DblDW1Sfyz4kv6; Thu, 11 Feb 2021 05:14:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 21198313E; Thu, 11 Feb 2021 05:14:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 11B5EYXV012273; Thu, 11 Feb 2021 05:14:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11B5EYn0012272; Thu, 11 Feb 2021 05:14:34 GMT (envelope-from git) Date: Thu, 11 Feb 2021 05:14:34 GMT Message-Id: <202102110514.11B5EYn0012272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: a60c5de933e1 - stable/13 - acpi: limit the AMDI0020/AMDI0010 workaround to an option MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a60c5de933e1516f65ead98b0ee141224ad607f4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2021 05:14:35 -0000 The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a60c5de933e1516f65ead98b0ee141224ad607f4 commit a60c5de933e1516f65ead98b0ee141224ad607f4 Author: Warner Losh AuthorDate: 2021-02-08 21:43:25 +0000 Commit: Warner Losh CommitDate: 2021-02-11 05:13:04 +0000 acpi: limit the AMDI0020/AMDI0010 workaround to an option It appears that production versions of EPYC firmware get the _STA method right for these nodes. In fact, this workaround breaks on production hardware by including too many uart nodes. This work around was for pre-release hardware that wound up not having a large deployment. Move this work around to a kernel option since the machines that needed it have been powered off and are difficult to resurrect. Should there be a more significant deployment than is understood, we can restrict it based on smbios strings. Discussed with: mmacy@, seanc@, jhb@ MFC After: 3 days (cherry picked from commit 35af933173d516101f4c44af328fbe2d6e587869) --- sys/conf/options | 1 + sys/dev/acpica/acpi.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/sys/conf/options b/sys/conf/options index 77979b72fe58..2f324143c574 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -705,6 +705,7 @@ ACPI_DEBUG opt_acpi.h ACPI_MAX_TASKS opt_acpi.h ACPI_MAX_THREADS opt_acpi.h DEV_ACPI opt_acpi.h +ACPI_EARLY_EPYC_WAR opt_acpi.h # options for IOMMU support IOMMU opt_iommu.h diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 04c8c1b27625..18623a6ab240 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -2273,6 +2273,8 @@ acpi_DeviceIsPresent(device_t dev) h = acpi_get_handle(dev); if (h == NULL) return (FALSE); + +#ifdef ACPI_EARLY_EPYC_WAR /* * Certain Treadripper boards always returns 0 for FreeBSD because it * only returns non-zero for the OS string "Windows 2015". Otherwise it @@ -2281,6 +2283,7 @@ acpi_DeviceIsPresent(device_t dev) */ if (acpi_MatchHid(h, "AMDI0020") || acpi_MatchHid(h, "AMDI0010")) return (TRUE); +#endif status = acpi_GetInteger(h, "_STA", &s);