From dad8d1224a92e81672eeca7b4c32a0d684c1ad1f Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Tue, 26 Sep 2023 07:32:08 -0600 Subject: [PATCH] Add basic support for 3rd party Broadcom chipsets Not officially supported as never shipped in any official Mac, however adding to simplify non-standard hardware support (ex. Hackintoshes) --- data/pci_data.py | 33 +++++++++++++++---------- resources/device_probe.py | 3 +++ resources/sys_patch/sys_patch_detect.py | 7 +++++- 3 files changed, 29 insertions(+), 14 deletions(-) diff --git a/data/pci_data.py b/data/pci_data.py index c137882f7..53a81e979 100644 --- a/data/pci_data.py +++ b/data/pci_data.py @@ -418,17 +418,17 @@ class nvidia_ids: 0x1186, # GK104 [GTX 660 Ti] 0x1187, # GK104 [GTX 760] 0x1188, # GK104 [GTX 690] - 0x1189, # GK104 [GTX 670] - 0x118a, # GK104GL [GRID K520] - 0x118b, # GK104GL [GRID K2 GeForce USM] - 0x118c, # GK104 [GRID K2 NVS USM] + 0x1189, # GK104 [GTX 670] + 0x118a, # GK104GL [GRID K520] + 0x118b, # GK104GL [GRID K2 GeForce USM] + 0x118c, # GK104 [GRID K2 NVS USM] 0x118d, # GK104GL [GRID K200 vGPU] 0x118E, # GK104 [GTX 760 OEM] 0x118F, # GK104GL [Tesla K10] - 0x1191, # GK104 [GTX 760 Rev. 2] - 0x1193, # GK104 [GTX 760 Ti OEM] - 0x1194, # GK104GL [Tesla K8] - 0x1195, # GK104 [GTX 660 Rev. 2] + 0x1191, # GK104 [GTX 760 Rev. 2] + 0x1193, # GK104 [GTX 760 Ti OEM] + 0x1194, # GK104GL [Tesla K8] + 0x1195, # GK104 [GTX 660 Rev. 2] 0x1198, # GK104M [GTX 880M] 0x1199, # GK104M [GTX 870M] 0x119A, # GK104M [GTX 860M] @@ -458,8 +458,8 @@ class nvidia_ids: # GK106 0x11C0, # GK106 [GTX 660] 0x11C2, # GK106 [GTX 650 Ti BOOST] - 0x11c3, # GK106 [GTX 650 Ti OEM] - 0x11c4, # GK106 [GTX 645 OEM] + 0x11c3, # GK106 [GTX 650 Ti OEM] + 0x11c4, # GK106 [GTX 645 OEM] 0x11c5, # GK106 [GT 740] 0x11C6, # GK106 [GTX 650 Ti] 0x11C7, # GK106 [GTX 750 Ti] @@ -627,10 +627,10 @@ class nvidia_ids: 0x17c2, # GM200 [GTX TITAN X] 0x17c8, # GM200 [GTX 980 Ti] - 0x17f0, # GM200GL [Quadro M6000] - 0x17f1, # GM200GL [Quadro M6000 24GB] + 0x17f0, # GM200GL [Quadro M6000] + 0x17f1, # GM200GL [Quadro M6000 24GB] 0x17fd, # GM200GL [Tesla M40] - + 0x13c0, # GM204 [GTX 980] 0x13c1, # GM204 0x13c2, # GM204 [GTX 970] @@ -1171,6 +1171,13 @@ class broadcom_ids: 0x43A0, # BCM4360 ] + # Not natively supported, but supported by AirportBrcmFixup + AirPortBrcmNICThirdParty = [ + 0x4357, # BCM43225 + 0x43B1, # BCM4352 + 0x43B2, # BCM4352 (2.4 GHz) + ] + AirPortBrcm4360 = [ # AirPortBrcm4360 IDs (removed duplicates for 4360 class cards) 0x4331, # BCM94331 diff --git a/resources/device_probe.py b/resources/device_probe.py index 95b598b4d..6d2573186 100644 --- a/resources/device_probe.py +++ b/resources/device_probe.py @@ -498,6 +498,7 @@ class Broadcom(WirelessCard): # pylint: disable=invalid-name AppleBCMWLANBusInterfacePCIe = "AppleBCMWLANBusInterfacePCIe supported" AirportBrcmNIC = "AirportBrcmNIC supported" + AirPortBrcmNICThirdParty = "AirPortBrcmNICThirdParty supported" AirPortBrcm4360 = "AirPortBrcm4360 supported" AirPortBrcm4331 = "AirPortBrcm4331 supported" AirPortBrcm43224 = "AppleAirPortBrcm43224 supported" @@ -510,6 +511,8 @@ class Broadcom(WirelessCard): self.chipset = Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe elif self.device_id in pci_data.broadcom_ids.AirPortBrcmNIC: self.chipset = Broadcom.Chipsets.AirportBrcmNIC + elif self.device_id in pci_data.broadcom_ids.AirPortBrcmNICThirdParty: + self.chipset = Broadcom.Chipsets.AirPortBrcmNICThirdParty elif self.device_id in pci_data.broadcom_ids.AirPortBrcm4360: self.chipset = Broadcom.Chipsets.AirPortBrcm4360 elif self.device_id in pci_data.broadcom_ids.AirPortBrcm4331: diff --git a/resources/sys_patch/sys_patch_detect.py b/resources/sys_patch/sys_patch_detect.py index 87df614a1..be8fc2cf4 100644 --- a/resources/sys_patch/sys_patch_detect.py +++ b/resources/sys_patch/sys_patch_detect.py @@ -568,7 +568,12 @@ class DetectRootPatch: if ( isinstance(self.constants.computer.wifi, device_probe.Broadcom) - and self.constants.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirPortBrcm4360, device_probe.Broadcom.Chipsets.AirportBrcmNIC]): + and self.constants.computer.wifi.chipset in [ + device_probe.Broadcom.Chipsets.AirPortBrcm4360, + device_probe.Broadcom.Chipsets.AirportBrcmNIC, + # We don't officially support this chipset, however we'll throw a bone to hackintosh users + device_probe.Broadcom.Chipsets.AirPortBrcmNICThirdParty, + ]): if self.constants.detected_os > os_data.os_data.ventura: self.modern_wifi = True self.amfi_shim_bins = True