mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-14 04:38:20 +10:00
build: Expand KDKLWA usage to pre-AVX2 with native AMD
This commit is contained in:
@@ -14,8 +14,12 @@
|
||||
- Avoids usage of patch when host lacks affected drive (ex. MacBookAir6,x with upgraded SSD)
|
||||
- Prompt with auto patcher when booted OpenCore is out of date to root patcher
|
||||
- ex. Booted OCLP is 0.5.2, root patcher is 0.5.3
|
||||
- Disable native AMD Graphics on pre-Haswell Macs in Ventura
|
||||
- Allows for easy root patching, dropping reliance on Safe Mode to boot
|
||||
- Primarily applicable for Mac Pros with AMD Polaris and Vega GPUs
|
||||
- Increment Binaries:
|
||||
- PatcherSupportPkg 0.7.3 - release
|
||||
- KDKlessWorkaround 1.0.0 - rolling (4924276)
|
||||
|
||||
## 0.5.3
|
||||
- Integrate FixPCIeLinkrate.efi v0.1.0
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -26,6 +26,7 @@ class build_graphics_audio:
|
||||
self.firmware_handling()
|
||||
self.spoof_handling()
|
||||
self.imac_mxm_patching()
|
||||
self.ioaccel_workaround()
|
||||
|
||||
|
||||
def graphics_handling(self):
|
||||
@@ -368,4 +369,44 @@ class build_graphics_audio:
|
||||
self.amd_mxm_patch(self.gfx0_path)
|
||||
elif self.computer.dgpu.arch == device_probe.NVIDIA.Archs.Kepler:
|
||||
self.backlight_path_detection()
|
||||
self.nvidia_mxm_patch(self.gfx0_path)
|
||||
self.nvidia_mxm_patch(self.gfx0_path)
|
||||
|
||||
def ioaccel_workaround(self):
|
||||
# Handle misc IOAccelerator issues
|
||||
|
||||
# When MTL bundles are missing from disk, WindowServer will repeatedly crash
|
||||
# This primarily occurs when installing an RSR update, where root is cleaned but AuxKC is not
|
||||
gpu_dict = []
|
||||
if not self.constants.custom_model:
|
||||
gpu_dict = self.constants.computer.gpus
|
||||
else:
|
||||
if not self.model in smbios_data.smbios_dictionary:
|
||||
return
|
||||
gpu_dict = smbios_data.smbios_dictionary[self.model]["Stock GPUs"]
|
||||
for gpu in gpu_dict:
|
||||
if not self.constants.custom_model:
|
||||
gpu = gpu.arch
|
||||
if gpu in [
|
||||
device_probe.Intel.Archs.Ivy_Bridge,
|
||||
device_probe.Intel.Archs.Haswell,
|
||||
device_probe.Intel.Archs.Broadwell,
|
||||
device_probe.Intel.Archs.Skylake,
|
||||
device_probe.NVIDIA.Archs.Kepler,
|
||||
]:
|
||||
support.build_support(self.model, self.constants, self.config).enable_kext("KDKlessWorkaround.kext", self.constants.kdkless_version, self.constants.kdkless_path)
|
||||
return
|
||||
|
||||
# KDKlessWorkaround supports disabling native AMD stack on Ventura for pre-AVX2.0 CPUs
|
||||
# Applicable for Polaris, Vega, Navi GPUs
|
||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] > cpu_data.cpu_data.ivy_bridge.value:
|
||||
return
|
||||
for gpu in gpu_dict:
|
||||
if not self.constants.custom_model:
|
||||
gpu = gpu.arch
|
||||
if gpu in [
|
||||
device_probe.AMD.Archs.Polaris,
|
||||
device_probe.AMD.Archs.Vega,
|
||||
device_probe.AMD.Archs.Navi,
|
||||
]:
|
||||
support.build_support(self.model, self.constants, self.config).enable_kext("KDKlessWorkaround.kext", self.constants.kdkless_version, self.constants.kdkless_path)
|
||||
return
|
||||
@@ -33,7 +33,6 @@ class build_misc:
|
||||
self.debug_handling()
|
||||
self.cpu_friend_handling()
|
||||
self.general_oc_handling()
|
||||
self.aux_kc_workaround()
|
||||
|
||||
def feature_unlock_handling(self):
|
||||
if self.constants.fu_status is True:
|
||||
@@ -247,24 +246,4 @@ class build_misc:
|
||||
if self.constants.vault is True and utilities.check_command_line_tools() is True:
|
||||
print("- Setting Vault configuration")
|
||||
self.config["Misc"]["Security"]["Vault"] = "Secure"
|
||||
support.build_support(self.model, self.constants, self.config).get_efi_binary_by_path("OpenShell.efi", "Misc", "Tools")["Enabled"] = False
|
||||
|
||||
def aux_kc_workaround(self):
|
||||
gpu_dict = []
|
||||
if not self.constants.custom_model:
|
||||
gpu_dict = self.constants.computer.gpus
|
||||
else:
|
||||
if self.model in smbios_data.smbios_dictionary:
|
||||
gpu_dict = smbios_data.smbios_dictionary[self.model]["Stock GPUs"]
|
||||
for gpu in gpu_dict:
|
||||
if not self.constants.custom_model:
|
||||
gpu = gpu.arch
|
||||
if gpu in [
|
||||
device_probe.Intel.Archs.Ivy_Bridge,
|
||||
device_probe.Intel.Archs.Haswell,
|
||||
device_probe.Intel.Archs.Broadwell,
|
||||
device_probe.Intel.Archs.Skylake,
|
||||
device_probe.NVIDIA.Archs.Kepler,
|
||||
]:
|
||||
support.build_support(self.model, self.constants, self.config).enable_kext("KDKlessWorkaround.kext", self.constants.kdkless_version, self.constants.kdkless_path)
|
||||
break
|
||||
support.build_support(self.model, self.constants, self.config).get_efi_binary_by_path("OpenShell.efi", "Misc", "Tools")["Enabled"] = False
|
||||
Reference in New Issue
Block a user