mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-18 21:30:00 +10:00
Merge branch 'main' into vault_2
This commit is contained in:
@@ -215,12 +215,13 @@ class BuildFirmware:
|
||||
# CSM check
|
||||
# For model support, check for GUID in firmware and as well as Bootcamp Assistant's Info.plist ('PreUEFIModels' key)
|
||||
# Ref: https://github.com/acidanthera/OpenCorePkg/blob/0.9.5/Platform/OpenLegacyBoot/OpenLegacyBoot.c#L19
|
||||
# if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.ivy_bridge.value and self.model != "MacPro6,1":
|
||||
# logging.info("- Enabling CSM support")
|
||||
# support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("OpenLegacyBoot.efi", "UEFI", "Drivers")["Enabled"] = True
|
||||
# else:
|
||||
# # Shipped alongside OpenCorePkg, so remove if unused
|
||||
# (self.constants.drivers_path / Path("OpenLegacyBoot.efi")).unlink()
|
||||
if Path(self.constants.drivers_path / Path("OpenLegacyBoot.efi")).exists():
|
||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.ivy_bridge.value and self.model != "MacPro6,1":
|
||||
logging.info("- Enabling CSM support")
|
||||
support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("OpenLegacyBoot.efi", "UEFI", "Drivers")["Enabled"] = True
|
||||
else:
|
||||
# Shipped alongside OpenCorePkg, so remove if unused
|
||||
(self.constants.drivers_path / Path("OpenLegacyBoot.efi")).unlink()
|
||||
|
||||
def _firmware_compatibility_handling(self) -> None:
|
||||
"""
|
||||
@@ -232,7 +233,7 @@ class BuildFirmware:
|
||||
# Patches IOPCIConfigurator.cpp's IOPCIIsHotplugPort to skip configRead16/32 calls
|
||||
# Credit to CaseySJ for original discovery:
|
||||
# - Patch: https://github.com/AMD-OSX/AMD_Vanilla/pull/196
|
||||
# - Source: https://github.com/apple-oss-distributions/IOPCIFamily/blob/main/IOPCIConfigurator.cpp#L968-L1022
|
||||
# - Source: https://github.com/apple-oss-distributions/IOPCIFamily/blob/IOPCIFamily-583.40.1/IOPCIConfigurator.cpp#L968-L1022
|
||||
#
|
||||
# Currently all pre-Sandy Bridge Macs lacking an iGPU benefit from this patch as well as MacPro6,1
|
||||
# Otherwise some graphics hardware will fail to wake, macOS will misreport hardware as ExpressCard-based,
|
||||
@@ -247,7 +248,7 @@ class BuildFirmware:
|
||||
logging.info("- Adding PCI Bus Enumeration Patch")
|
||||
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "CaseySJ - Fix PCI bus enumeration (Ventura)")["Enabled"] = True
|
||||
# Sonoma slightly adjusted this line specifically
|
||||
# - https://github.com/apple-oss-distributions/IOPCIFamily/blob/main/IOPCIConfigurator.cpp#L1009
|
||||
# - https://github.com/apple-oss-distributions/IOPCIFamily/blob/IOPCIFamily-583.40.1/IOPCIConfigurator.cpp#L1009
|
||||
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Fix PCI bus enumeration (Sonoma)")["Enabled"] = True
|
||||
|
||||
if self.constants.set_vmm_cpuid is True:
|
||||
|
||||
@@ -43,6 +43,7 @@ class BuildMiscellaneous:
|
||||
self._debug_handling()
|
||||
self._cpu_friend_handling()
|
||||
self._general_oc_handling()
|
||||
self._t1_handling()
|
||||
|
||||
|
||||
def _feature_unlock_handling(self) -> None:
|
||||
@@ -280,6 +281,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"]
|
||||
@@ -349,9 +356,8 @@ class BuildMiscellaneous:
|
||||
logging.info("- Enabling T1 Security Chip support")
|
||||
|
||||
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Block"], "Identifier", "com.apple.driver.AppleSSE")["Enabled"] = True
|
||||
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Block"], "Identifier", "com.apple.driver.AppleCredentialManager")["Enabled"] = True
|
||||
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Block"], "Identifier", "com.apple.driver.AppleKeyStore")["Enabled"] = True
|
||||
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("corecrypto_T1.kext", self.constants.t1_corecrypto_version, self.constants.t1_corecrypto_path)
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleSSE.kext", self.constants.t1_sse_version, self.constants.t1_sse_path)
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleCredentialManager.kext", self.constants.t1_credential_version, self.constants.t1_credential_path)
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleKeyStore.kext", self.constants.t1_key_store_version, self.constants.t1_key_store_path)
|
||||
@@ -77,6 +77,6 @@ class BuildSecurity:
|
||||
if self.constants.secure_status is False:
|
||||
logging.info("- Disabling SecureBootModel")
|
||||
self.config["Misc"]["Security"]["SecureBootModel"] = "Disabled"
|
||||
|
||||
|
||||
logging.info("- Enabling AMFIPass")
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AMFIPass.kext", self.constants.amfipass_version, self.constants.amfipass_path)
|
||||
|
||||
Reference in New Issue
Block a user