From nobody Fri Jan 03 16:27:23 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YPprX15dCz5k9CL; Fri, 03 Jan 2025 16:27:24 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YPprX0Qnbz4cxB; Fri, 3 Jan 2025 16:27:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735921644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FRmoEa1/CKgZa/GyIynE5DuxbAYgFBWOEgtyVAJCFzU=; b=gGrg+Zz5yCUdYITumrwltA2AM8pGlRKPjhMB1C64JJYbZXBJw1L2FaHHDxq9bY+oA7Phvt 25q+7rU/W3G+Mu5mbf3zXPVCHZk3q+DClJNzOYojUtqvxxYQUOjRxBpWtvALMexJlaATG4 I98LxX8UbEBe1QCi7UZNqXn42bKwnyIHKypH6EO3ObxpHcLvyMw2t316YapxO9y7e+XPlC 9WPeviWYRuZXjz9qhAUGEvJob95IUjFvlv7S2+f//dQNIAW+AWm4JWLuT6bzqo8G5tC9jJ 5eZsODdOl2FV1oEcrqOK1bcPE4i3jpZH4qtgp0cyv+iDykmwRAOzE825kWf2xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735921644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FRmoEa1/CKgZa/GyIynE5DuxbAYgFBWOEgtyVAJCFzU=; b=bK/BHPArrGjbW1hgNXrMAXg6YqDUc70Y5SA7kmtzPUyEHIpHakYLmq4vcy0E98SnPbd3+W 1JRDquLK8zqF1emKMFWAQafYIlllhurIQFnX640cgJ5xYjAf16cZx38Wi3dT0wPNJCehC9 crKF+sgstgoYuKYFTgdv7pgLnlZxpkfWtCCWDqAa27YF5FiKOC/fBCugwsYD6b80PU4J93 iblCs/dkbUE5tFiFuq7CVL7U5ohC1VbwYEhuEbO23bFGvZwSCrMvr485iz5sIwcQULQbgi RlPJeNNB+PECjpkco0OXx5KT2s3cf+wGOwYKEHDkUE/CAfaN60zSwzMXim8DYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735921644; a=rsa-sha256; cv=none; b=oSzXzEgqjkyeehTEVGIaKrDW+UYti8UC9/0iPW6QQREnGbva/OdcT9NQZvkSxXczNlpqzh xC6uupB2hsn1iDyVIh91mLnOHkaay1Aw2hgKBjjh5KUHA375M3pvldaXLUZCULQqNgyWBn CA1daTwAUo9j60PrhxDGz1iWm9bx7aF5hnaD0Bw+M/Ct51ZPXZ4Z17qmeIzULaUTn4YZoG X9W6jk6F0Wi1HhzB6aBuvfvShHNQDsae+e1+EesyzHlehZ3kbbNZww4Ikfok3ktSKuee5V S40pofe+AxZ1EsZh5BvDQnCUIkVpMj+T5GEsQ3PBHQd6blt1SiXiOHj8SLqNUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YPprW6n1Rz6y; Fri, 03 Jan 2025 16:27:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 503GRNKJ036371; Fri, 3 Jan 2025 16:27:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 503GRNJ8036368; Fri, 3 Jan 2025 16:27:23 GMT (envelope-from git) Date: Fri, 3 Jan 2025 16:27:23 GMT Message-Id: <202501031627.503GRNJ8036368@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 143dff0f9ce9 - main - pci: Only claim to support PCI ASPM on x86 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 143dff0f9ce9a6f03ae5701368c7144b30e2dc39 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=143dff0f9ce9a6f03ae5701368c7144b30e2dc39 commit 143dff0f9ce9a6f03ae5701368c7144b30e2dc39 Author: Andrew Turner AuthorDate: 2025-01-03 15:50:38 +0000 Commit: Andrew Turner CommitDate: 2025-01-03 16:10:41 +0000 pci: Only claim to support PCI ASPM on x86 We claim to support Active State Power Management, but don't appear to do anything different in the kernel when it's enabled other than tell the firmware we do. This breaks VMware Fusion on Apple Silicon when it's enabled as it expects the kernel to enable the ports. As it is reported to be needed on some x86 servers keep it enabled there, but disable on non-x86 architectures. Reported by: kp, tuexen Reviewed by: tuexen, mav, imp, jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D48303 --- sys/dev/pci/pci.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 251680590747..cf01115581e1 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -407,7 +407,15 @@ static int pci_enable_ari = 1; SYSCTL_INT(_hw_pci, OID_AUTO, enable_ari, CTLFLAG_RDTUN, &pci_enable_ari, 0, "Enable support for PCIe Alternative RID Interpretation"); +/* + * Some x86 firmware only enables PCIe hotplug if we claim to support aspm, + * however enabling it breaks some arm64 firmware as it powers off devices. + */ +#if defined(__i386__) || defined(__amd64__) int pci_enable_aspm = 1; +#else +int pci_enable_aspm = 0; +#endif SYSCTL_INT(_hw_pci, OID_AUTO, enable_aspm, CTLFLAG_RDTUN, &pci_enable_aspm, 0, "Enable support for PCIe Active State Power Management");