git: 423362c3d8d6 - stable/14 - pci: Only claim to support PCI ASPM on x86
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 01 Apr 2025 17:46:16 UTC
The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=423362c3d8d6a236c49e7f9d667032c05d5c170d commit 423362c3d8d6a236c49e7f9d667032c05d5c170d Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2025-01-03 15:50:38 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2025-04-01 17:43:58 +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 (cherry picked from commit 143dff0f9ce9a6f03ae5701368c7144b30e2dc39) --- 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 b40a352a4818..102027123976 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -409,7 +409,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");