mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-24 03:50:14 +10:00
Disable L0 for NVMe drives
This commit is contained in:
@@ -169,9 +169,9 @@ B. Exit
|
||||
f"Target OS: macOS {self.constants.os_support}",
|
||||
]
|
||||
|
||||
if (self.constants.custom_model or self.current_model) not in ModelArray.SupportedSMBIOS:
|
||||
if (self.constants.custom_model or self.current_model) not in ModelArray.SupportedSMBIOS and self.constants.allow_oc_everywhere is False:
|
||||
in_between = [
|
||||
'Your model is not supported by this patcher!',
|
||||
'Your model is not supported by this patcher for running unsupported OSes!',
|
||||
'',
|
||||
'If you plan to create the USB for another machine, please select the "Change Model" option in the menu.'
|
||||
]
|
||||
|
||||
@@ -144,9 +144,8 @@ class BuildOpenCore:
|
||||
nvme_vendor = self.hexswap(binascii.hexlify(i["vendor-id"]).decode()[:4])
|
||||
nvme_device = self.hexswap(binascii.hexlify(i["device-id"]).decode()[:4])
|
||||
nvme_aspm = i["pci-aspm-default"]
|
||||
# Check if 0x2 is already present. If not, append
|
||||
if not nvme_aspm & 2:
|
||||
nvme_aspm |= 2
|
||||
# Disable Bit 1 (L0), enable Bit 2 (L1)
|
||||
nvme_aspm = (nvme_aspm & (~3)) | 2
|
||||
|
||||
print(f'- Found 3rd Party NVMe SSD ({x}): {nvme_vendor}:{nvme_device}')
|
||||
self.config["#Revision"][f"Hardware-NVMe-{x}"] = f'{nvme_vendor}:{nvme_device}'
|
||||
|
||||
@@ -153,7 +153,7 @@ class PatchSysVolume:
|
||||
print("- Merging legacy Nvidia Kepler Kexts and Bundles")
|
||||
self.add_new_binaries(ModelArray.AddNvidiaKeplerAccel11, self.constants.legacy_nvidia_kepler_path)
|
||||
else:
|
||||
print("- Merging legacy Nvidia Telsa and Fermi Kexts and Bundles")
|
||||
print("- Merging legacy Nvidia Tesla and Fermi Kexts and Bundles")
|
||||
self.delete_old_binaries(ModelArray.DeleteNvidiaAccel11)
|
||||
self.add_new_binaries(ModelArray.AddNvidiaAccel11, self.constants.legacy_nvidia_path)
|
||||
elif self.dgpu_vendor == self.constants.pci_amd_ati:
|
||||
@@ -338,7 +338,7 @@ class PatchSysVolume:
|
||||
print("Root Patching must be done on target machine!")
|
||||
elif self.model in ModelArray.NoRootPatch11 and self.constants.assume_legacy is False:
|
||||
print("Root Patching not required for this machine!")
|
||||
elif self.model not in ModelArray.SupportedSMBIOS11:
|
||||
elif self.model not in ModelArray.SupportedSMBIOS11 and self.constants.assume_legacy is False:
|
||||
print("Cannot run on this machine, model is unsupported!")
|
||||
elif self.constants.detected_os < self.constants.big_sur:
|
||||
print(f"Cannot run on this OS, requires macOS 11!")
|
||||
|
||||
Reference in New Issue
Block a user