diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a3ff25c6..cb93894ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ - Fix Wifi Password prompt in Monterey on legacy wifi - Applicable for Atheros, BCM94328, BCM94322 - Fix OpenCL Acceleration on Ivy Bridge and Kepler +- Add Apple RAID Card support ## 0.3.1 - Increment Binaries: diff --git a/payloads/Config/config.plist b/payloads/Config/config.plist index 7fe207dc9..73c3e8a9d 100644 --- a/payloads/Config/config.plist +++ b/payloads/Config/config.plist @@ -1119,7 +1119,7 @@ BundlePath LegacyUSBVideoSupport.kext Comment - Legayc iSight support + Legacy iSight support Enabled ExecutablePath @@ -1131,6 +1131,24 @@ PlistPath Contents/Info.plist + + Arch + x86_64 + BundlePath + AppleRAIDCard.kext + Comment + RAID Card Support + Enabled + + ExecutablePath + Contents/MacOS/AppleRAIDCard + MaxKernel + + MinKernel + 19.0.0 + PlistPath + Contents/Info.plist + Block diff --git a/payloads/Kexts/Misc/AppleRAIDCard-v1.0.0.zip b/payloads/Kexts/Misc/AppleRAIDCard-v1.0.0.zip new file mode 100644 index 000000000..1559cef56 Binary files /dev/null and b/payloads/Kexts/Misc/AppleRAIDCard-v1.0.0.zip differ diff --git a/resources/build.py b/resources/build.py index f6f63c0fd..c0798e1c1 100644 --- a/resources/build.py +++ b/resources/build.py @@ -718,6 +718,19 @@ class BuildOpenCore: print("- Adding SATA Hibernation Patch") self.config["Kernel"]["Quirks"]["ThirdPartyDrives"] = True break + + # Apple RAID Card check + if not self.constants.custom_model: + if self.computer.storage: + for storage_controller in self.computer.storage: + if storage_controller.vendor_id == 0x106b and storage_controller.device_id == 0x008A: + # AppleRAIDCard.kext only supports pci106b,8a + self.enable_kext("AppleRAIDCard.kext", self.constants.apple_raid_version, self.constants.apple_raid_path) + break + elif self.model.startswith("XServe"): + # For XServes, assume RAID is present + # Namely due to Xserve2,1 being limited to 10.7, thus no hardware detection + self.enable_kext("AppleRAIDCard.kext", self.constants.apple_raid_version, self.constants.apple_raid_path) # DEBUG Settings if self.constants.verbose_debug is True: diff --git a/resources/constants.py b/resources/constants.py index 6b73b4332..1ec7827ee 100644 --- a/resources/constants.py +++ b/resources/constants.py @@ -47,7 +47,8 @@ class Constants: self.piixata_version = "1.0.1" # AppleIntelPIIXATA self.fw_kext = "1.0.1" # IOFireWireFamily self.apple_trackpad = "1.0.1" # AppleUSBTrackpad - self.apple_isight_version = "1.0.0" # AppleISight + self.apple_isight_version = "1.0.0" # AppleiSight + self.apple_raid_version = "1.0.0" # AppleRAIDCard ## Apple - Dortania Modified self.bcm570_version = "1.0.2" # CatalinaBCM5701Ethernet @@ -349,6 +350,10 @@ class Constants: @property def apple_isight_path(self): return self.payload_kexts_path / Path(f"Misc/LegacyUSBVideoSupport-v{self.apple_isight_version}.zip") + + @property + def apple_raid_path(self): + return self.payload_kexts_path / Path(f"Misc/AppleRAIDCard-v{self.apple_raid_version}.zip") @property def plist_folder_path(self): diff --git a/resources/device_probe.py b/resources/device_probe.py index f3b0ed84f..ced93f8b1 100644 --- a/resources/device_probe.py +++ b/resources/device_probe.py @@ -154,6 +154,10 @@ class NVMeController(PCIDevice): class SATAController(PCIDevice): CLASS_CODE: ClassVar[int] = 0x010601 +@dataclass +class SASController(PCIDevice): + CLASS_CODE: ClassVar[int] = 0x010400 + @dataclass class NVIDIA(GPU): @@ -417,6 +421,14 @@ class Computer: None, )[1] ) + sas_controllers = ioreg.ioiterator_to_list( + ioreg.IOServiceGetMatchingServices( + ioreg.kIOMasterPortDefault, + {"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex(utilities.hexswap(hex(SASController.CLASS_CODE)[2:].zfill(8)))}]}, + None, + )[1] + ) + nvme_controllers = ioreg.ioiterator_to_list( ioreg.IOServiceGetMatchingServices( ioreg.kIOMasterPortDefault, {"IOProviderClass": "IONVMeController", "IOParentMatch": {"IOProviderClass": "IOPCIDevice"}, "IOPropertyMatch": {"IOClass": "IONVMeController"}}, None @@ -425,6 +437,11 @@ class Computer: for device in sata_controllers: self.storage.append(SATAController.from_ioregistry(device)) ioreg.IOObjectRelease(device) + + for device in sas_controllers: + self.storage.append(SASController.from_ioregistry(device)) + ioreg.IOObjectRelease(device) + for device in nvme_controllers: parent = ioreg.IORegistryEntryGetParentEntry(device, "IOService".encode(), None)[1] ioreg.IOObjectRelease(device)