From owner-svn-src-head@freebsd.org Thu Oct 25 17:17:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6132A1086934; Thu, 25 Oct 2018 17:17:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B3E698FEC9; Thu, 25 Oct 2018 17:17:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 92A3514D83; Thu, 25 Oct 2018 17:17:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9PHHBeA030709; Thu, 25 Oct 2018 17:17:11 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PHHBwh030708; Thu, 25 Oct 2018 17:17:11 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201810251717.w9PHHBwh030708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 25 Oct 2018 17:17:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r339736 - head/sys/dev/acpica X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/acpica X-SVN-Commit-Revision: 339736 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 17:17:12 -0000 Author: imp Date: Thu Oct 25 17:17:11 2018 New Revision: 339736 URL: https://svnweb.freebsd.org/changeset/base/339736 Log: Update comment for AMI00[12]0 override. The AML is even stupider than always returning 0. It will only return non-zero for an OS that reports itself as "Windows 2015", at least on the Threadripper board's AML that I've examined. Those AMLs also suggest we may need this quirk for AMI0030 as well. There may be other cases where we need to override the _STA in a generic way, so we should consider writing code to do that. Modified: head/sys/dev/acpica/acpi.c Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Thu Oct 25 17:00:39 2018 (r339735) +++ head/sys/dev/acpica/acpi.c Thu Oct 25 17:17:11 2018 (r339736) @@ -2222,10 +2222,10 @@ acpi_DeviceIsPresent(device_t dev) status = acpi_GetInteger(h, "_STA", &s); /* - * Onboard serial ports on certain AMD motherboards have an invalid _STA - * method that always returns 0. Force them to always be treated as present. - * - * This may solely be a quirk of a preproduction BIOS. + * Certain Treadripper boards always returns 0 for FreeBSD because it + * only returns non-zero for the OS string "Windows 2015". Otherwise it + * will return zero. Force them to always be treated as present. + * Beata versions were worse: they always returned 0. */ if (acpi_MatchHid(h, "AMDI0020") || acpi_MatchHid(h, "AMDI0010")) return (TRUE);