From af575965599043e59b713f266f61ddb194a0e57c Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Sat, 14 Oct 2023 20:35:17 -0600 Subject: [PATCH] sys_patch: Add OHCI/UHCI downgrade --- CHANGELOG.md | 3 ++- data/sys_patch_dict.py | 22 ++++++++++++++++++++++ payloads/Config/config.plist | 8 ++++---- resources/build/misc.py | 6 ++++++ resources/constants.py | 2 +- resources/sys_patch/sys_patch_generate.py | 1 + 6 files changed, 36 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbaafcb69..04fd4c387 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,9 @@ - Resolve unresponsive Weather app - Resolve full screen menubar covering the app toolbar - Resolve unfocused password windows +- Resolve USB 1.1 kernel panics on macOS 14.1 - Increment Binaries: - - PatcherSupportPkg 1.3.5 - release + - PatcherSupportPkg 1.3.6 - release - AirportBrcmFixup 2.1.8 - release - BlueToolFixup 2.6.8 - release - RestrictEvents 1.1.3 - release diff --git a/data/sys_patch_dict.py b/data/sys_patch_dict.py index e29d26be7..0100f4a1f 100644 --- a/data/sys_patch_dict.py +++ b/data/sys_patch_dict.py @@ -1265,6 +1265,28 @@ class SystemPatchDictionary(): }, }, }, + # Injection of UHCI/OHCI causes a panic on 14.1+ + "Legacy USB 1.1 Extended": { + "Display Name": "", + "OS Support": { + "Minimum OS Support": { + "OS Major": os_data.os_data.sonoma, + "OS Minor": 1 # macOS 14.1 (XNU 23.1) + }, + "Maximum OS Support": { + "OS Major": os_data.os_data.max_os, + "OS Minor": 99 + }, + }, + "Install": { + "/System/Library/Extensions/IOUSBHostFamily.kext/Contents/PlugIns": { + "AppleUSBOHCI.kext": "12.6.2-USB", + "AppleUSBOHCIPCI.kext": "12.6.2-USB", + "AppleUSBUHCI.kext": "12.6.2-USB", + "AppleUSBUHCIPCI.kext": "12.6.2-USB", + }, + }, + }, "PCIe FaceTime Camera": { "Display Name": "Miscellaneous: PCIe FaceTime Camera", "OS Support": { diff --git a/payloads/Config/config.plist b/payloads/Config/config.plist index 2aa72e344..6d586da00 100644 --- a/payloads/Config/config.plist +++ b/payloads/Config/config.plist @@ -1377,7 +1377,7 @@ ExecutablePath Contents/MacOS/AppleUSBOHCI MaxKernel - + 23.0.0 MinKernel 22.0.0 PlistPath @@ -1395,7 +1395,7 @@ ExecutablePath Contents/MacOS/AppleUSBOHCIPCI MaxKernel - + 23.0.0 MinKernel 22.0.0 PlistPath @@ -1413,7 +1413,7 @@ ExecutablePath Contents/MacOS/AppleUSBUHCI MaxKernel - + 23.0.0 MinKernel 22.0.0 PlistPath @@ -1431,7 +1431,7 @@ ExecutablePath Contents/MacOS/AppleUSBUHCIPCI MaxKernel - + 23.0.0 MinKernel 22.0.0 PlistPath diff --git a/resources/build/misc.py b/resources/build/misc.py index 25d5c4c69..7f7f49c41 100644 --- a/resources/build/misc.py +++ b/resources/build/misc.py @@ -280,6 +280,12 @@ class BuildMiscellaneous: # - Ref: https://techcommunity.microsoft.com/t5/microsoft-usb-blog/reasons-to-avoid-companion-controllers/ba-p/270710 # # To be paired for sys_patch_dict.py's 'Legacy USB 1.1' patchset + # + # Note: With macOS 14.1, injection of these kexts causes a panic. + # To avoid this, a MaxKernel is configured with XNU 23.0.0 (macOS 14.0). + # Additionally sys_patch.py stack will now patches the bins onto disk for 14.1+. + # Reason for keeping the dual logic is due to potential conflicts of in-cache vs injection if we start + # patching pre-14.1 hosts. if ( smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.penryn.value or \ self.model in ["MacPro4,1", "MacPro5,1", "Xserve3,1"] diff --git a/resources/constants.py b/resources/constants.py index 0dd3e2ebb..a29cf92a9 100644 --- a/resources/constants.py +++ b/resources/constants.py @@ -14,7 +14,7 @@ class Constants: def __init__(self) -> None: # Patcher Versioning self.patcher_version: str = "1.1.0" # OpenCore-Legacy-Patcher - self.patcher_support_pkg_version: str = "1.3.5" # PatcherSupportPkg + self.patcher_support_pkg_version: str = "1.3.6" # PatcherSupportPkg self.copyright_date: str = "Copyright © 2020-2023 Dortania" self.patcher_name: str = "OpenCore Legacy Patcher" diff --git a/resources/sys_patch/sys_patch_generate.py b/resources/sys_patch/sys_patch_generate.py index e97418c09..699d5301c 100644 --- a/resources/sys_patch/sys_patch_generate.py +++ b/resources/sys_patch/sys_patch_generate.py @@ -176,6 +176,7 @@ class GenerateRootPatchSets: if self.hardware_details["Miscellaneous: Legacy USB 1.1"] is True: required_patches.update({"Legacy USB 1.1": all_hardware_patchset["Miscellaneous"]["Legacy USB 1.1"]}) + required_patches.update({"Legacy USB 1.1 Extended": all_hardware_patchset["Miscellaneous"]["Legacy USB 1.1 Extended"]}) if self.hardware_details["Miscellaneous: PCIe FaceTime Camera"] is True: required_patches.update({"PCIe FaceTime Camera": all_hardware_patchset["Miscellaneous"]["PCIe FaceTime Camera"]})