Resolve NVMe Patching on 2016-2017 MacBook Pros

Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/794
This commit is contained in:
Mykola Grymalyuk
2021-12-13 10:51:10 -07:00
parent 6e20a51d8f
commit 5c9a0c74d4
2 changed files with 14 additions and 1 deletions

View File

@@ -30,6 +30,7 @@
- Add Apple RAID Card support
- Add Legacy GCN build support off model for MXM iMacs
- Resolve 5k Display Output support on 5k iMacs and iMac Pro
- Resolve NVMe Patching on 2016-2017 MacBook Pros
## 0.3.1
- Increment Binaries:

View File

@@ -453,7 +453,19 @@ class Computer:
controller = NVMeController.from_ioregistry(parent)
controller.aspm = aspm
if controller.vendor_id != 0x106B:
if (
# Handle Apple Vendor ID
controller.vendor_id != 0x106B
and (
# Handle soldered Samsung SSDs
controller.vendor_id != 0x144D and controller.device_id != 0xA804
)
):
# Avoid patching when a native Apple NVMe drive is present
# Note on 2016-2017 MacBook Pros, 15" devices used a stock Samsung SSD with IONVMeController
# Technically this should be patched based on NVMeFix.kext logic,
# however Apple deemed the SSD unsupported for usage with AppleNVMeController class
# https://github.com/acidanthera/NVMeFix/blob/1.0.9/NVMeFix/NVMeFix.cpp#L220-L225
self.storage.append(controller)
ioreg.IOObjectRelease(parent)