mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 06:10:00 +10:00
cpu_data.py: Adjust enums
This commit is contained in:
+17
-20
@@ -1,24 +1,21 @@
|
|||||||
import enum
|
import enum
|
||||||
|
|
||||||
|
|
||||||
class cpu_data(enum.IntEnum):
|
class CPUGen(enum.IntEnum):
|
||||||
pentium_4 = 0
|
pentium_4 = 0
|
||||||
yonah = 1
|
yonah = 1
|
||||||
conroe = 2
|
conroe = 2
|
||||||
penryn = 3
|
penryn = 3
|
||||||
nehalem = 4 # (Westmere included)
|
nehalem = 4 # (Westmere included)
|
||||||
sandy_bridge = 5 # 2000
|
sandy_bridge = 5 # 2000
|
||||||
ivy_bridge = 6 # 3000
|
ivy_bridge = 6 # 3000
|
||||||
haswell = 7 # 4000
|
haswell = 7 # 4000
|
||||||
broadwell = 8 # 5000
|
broadwell = 8 # 5000
|
||||||
skylake = 9 # 6000
|
skylake = 9 # 6000
|
||||||
kaby_lake = 10 # 7000
|
kaby_lake = 10 # 7000
|
||||||
coffee_lake = 11 # 8000
|
coffee_lake = 11 # 8000/9000
|
||||||
comet_lake = 12 # 9000
|
comet_lake = 12 # 10000
|
||||||
ice_lake = 13 # 10000
|
ice_lake = 13 # 10000
|
||||||
|
|
||||||
apple_dtk = 112 # A12
|
apple_dtk = 100 # A12
|
||||||
apple_m1 = 114 # A14
|
apple_silicon = 101 # A14 and newer (not tracked beyond this point)
|
||||||
apple_m1_pro = 115
|
|
||||||
apple_m1_max = 116
|
|
||||||
apple_m1_ultra = 117
|
|
||||||
+238
-161
File diff suppressed because it is too large
Load Diff
+14
-14
@@ -50,7 +50,7 @@ class BuildFirmware:
|
|||||||
if not "CPU Generation" in smbios_data.smbios_dictionary[self.model]:
|
if not "CPU Generation" in smbios_data.smbios_dictionary[self.model]:
|
||||||
return
|
return
|
||||||
|
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.ivy_bridge.value:
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.ivy_bridge.value:
|
||||||
# In macOS Ventura, Apple dropped AppleIntelCPUPowerManagement* kexts as they're unused on Haswell+
|
# In macOS Ventura, Apple dropped AppleIntelCPUPowerManagement* kexts as they're unused on Haswell+
|
||||||
# However re-injecting the AICPUPM kexts is not enough, as Ventura changed how 'intel_cpupm_matching' is set:
|
# However re-injecting the AICPUPM kexts is not enough, as Ventura changed how 'intel_cpupm_matching' is set:
|
||||||
# macOS 12.5: https://github.com/apple-oss-distributions/xnu/blob/xnu-8020.140.41/osfmk/i386/pal_routines.h#L153-L163
|
# macOS 12.5: https://github.com/apple-oss-distributions/xnu/blob/xnu-8020.140.41/osfmk/i386/pal_routines.h#L153-L163
|
||||||
@@ -73,7 +73,7 @@ class BuildFirmware:
|
|||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleIntelCPUPowerManagement.kext", self.constants.aicpupm_version, self.constants.aicpupm_path)
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleIntelCPUPowerManagement.kext", self.constants.aicpupm_version, self.constants.aicpupm_path)
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleIntelCPUPowerManagementClient.kext", self.constants.aicpupm_version, self.constants.aicpupm_client_path)
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleIntelCPUPowerManagementClient.kext", self.constants.aicpupm_version, self.constants.aicpupm_client_path)
|
||||||
|
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.sandy_bridge.value or self.constants.disable_fw_throttle is True:
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.sandy_bridge.value or self.constants.disable_fw_throttle is True:
|
||||||
# With macOS 12.3 Beta 1, Apple dropped the 'plugin-type' check within X86PlatformPlugin
|
# With macOS 12.3 Beta 1, Apple dropped the 'plugin-type' check within X86PlatformPlugin
|
||||||
# Because of this, X86PP will match onto the CPU instead of ACPI_SMC_PlatformPlugin
|
# Because of this, X86PP will match onto the CPU instead of ACPI_SMC_PlatformPlugin
|
||||||
# This causes power management to break on pre-Ivy Bridge CPUs as they don't have correct
|
# This causes power management to break on pre-Ivy Bridge CPUs as they don't have correct
|
||||||
@@ -85,7 +85,7 @@ class BuildFirmware:
|
|||||||
# Only inject on older OSes if user requests
|
# Only inject on older OSes if user requests
|
||||||
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Add"], "BundlePath", "ASPP-Override.kext")["MinKernel"] = ""
|
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Add"], "BundlePath", "ASPP-Override.kext")["MinKernel"] = ""
|
||||||
|
|
||||||
if self.constants.disable_fw_throttle is True and smbios_data.smbios_dictionary[self.model]["CPU Generation"] >= cpu_data.cpu_data.nehalem.value:
|
if self.constants.disable_fw_throttle is True and smbios_data.smbios_dictionary[self.model]["CPU Generation"] >= cpu_data.CPUGen.nehalem.value:
|
||||||
logging.info("- Disabling Firmware Throttling")
|
logging.info("- Disabling Firmware Throttling")
|
||||||
# Nehalem and newer systems force firmware throttling via MSR_POWER_CTL
|
# Nehalem and newer systems force firmware throttling via MSR_POWER_CTL
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("SimpleMSR.kext", self.constants.simplemsr_version, self.constants.simplemsr_path)
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("SimpleMSR.kext", self.constants.simplemsr_version, self.constants.simplemsr_path)
|
||||||
@@ -104,12 +104,12 @@ class BuildFirmware:
|
|||||||
# Resolves Big Sur support for consumer Nehalem
|
# Resolves Big Sur support for consumer Nehalem
|
||||||
# CPBG device in ACPI is a Co-Processor Bridge Device, which is not actually physically present
|
# CPBG device in ACPI is a Co-Processor Bridge Device, which is not actually physically present
|
||||||
# IOPCIFamily will error when enumerating this device, thus we'll power it off via _STA (has no effect in older OSes)
|
# IOPCIFamily will error when enumerating this device, thus we'll power it off via _STA (has no effect in older OSes)
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] == cpu_data.cpu_data.nehalem.value and not (self.model.startswith("MacPro") or self.model.startswith("Xserve")):
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] == cpu_data.CPUGen.nehalem.value and not (self.model.startswith("MacPro") or self.model.startswith("Xserve")):
|
||||||
logging.info("- Adding SSDT-CPBG.aml")
|
logging.info("- Adding SSDT-CPBG.aml")
|
||||||
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["ACPI"]["Add"], "Path", "SSDT-CPBG.aml")["Enabled"] = True
|
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["ACPI"]["Add"], "Path", "SSDT-CPBG.aml")["Enabled"] = True
|
||||||
shutil.copy(self.constants.pci_ssdt_path, self.constants.acpi_path)
|
shutil.copy(self.constants.pci_ssdt_path, self.constants.acpi_path)
|
||||||
|
|
||||||
if cpu_data.cpu_data.sandy_bridge <= smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.ivy_bridge.value and self.model != "MacPro6,1":
|
if cpu_data.CPUGen.sandy_bridge <= smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.ivy_bridge.value and self.model != "MacPro6,1":
|
||||||
# Based on: https://egpu.io/forums/pc-setup/fix-dsdt-override-to-correct-error-12/
|
# Based on: https://egpu.io/forums/pc-setup/fix-dsdt-override-to-correct-error-12/
|
||||||
# Applicable for Sandy and Ivy Bridge Macs
|
# Applicable for Sandy and Ivy Bridge Macs
|
||||||
logging.info("- Enabling Windows 10 UEFI Audio support")
|
logging.info("- Enabling Windows 10 UEFI Audio support")
|
||||||
@@ -130,20 +130,20 @@ class BuildFirmware:
|
|||||||
|
|
||||||
# SSE4,1 support (ie. Penryn)
|
# SSE4,1 support (ie. Penryn)
|
||||||
# Required for macOS Mojave and newer
|
# Required for macOS Mojave and newer
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn.value:
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.penryn.value:
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AAAMouSSE.kext", self.constants.mousse_version, self.constants.mousse_path)
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AAAMouSSE.kext", self.constants.mousse_version, self.constants.mousse_path)
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("telemetrap.kext", self.constants.telemetrap_version, self.constants.telemetrap_path)
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("telemetrap.kext", self.constants.telemetrap_version, self.constants.telemetrap_path)
|
||||||
|
|
||||||
# Force Rosetta Cryptex installation in macOS Ventura
|
# Force Rosetta Cryptex installation in macOS Ventura
|
||||||
# Restores support for CPUs lacking AVX2.0 support
|
# Restores support for CPUs lacking AVX2.0 support
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.ivy_bridge.value:
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.ivy_bridge.value:
|
||||||
logging.info("- Enabling Rosetta Cryptex support in Ventura")
|
logging.info("- Enabling Rosetta Cryptex support in Ventura")
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("CryptexFixup.kext", self.constants.cryptexfixup_version, self.constants.cryptexfixup_path)
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("CryptexFixup.kext", self.constants.cryptexfixup_version, self.constants.cryptexfixup_path)
|
||||||
|
|
||||||
# i3 Ivy Bridge iMacs don't support RDRAND
|
# i3 Ivy Bridge iMacs don't support RDRAND
|
||||||
# However for prebuilt, assume they do
|
# However for prebuilt, assume they do
|
||||||
if (not self.constants.custom_model and "RDRAND" not in self.computer.cpu.flags) or \
|
if (not self.constants.custom_model and "RDRAND" not in self.computer.cpu.flags) or \
|
||||||
(smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.sandy_bridge.value):
|
(smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.sandy_bridge.value):
|
||||||
# Ref: https://github.com/reenigneorcim/SurPlus
|
# Ref: https://github.com/reenigneorcim/SurPlus
|
||||||
# Enable for all systems missing RDRAND support
|
# Enable for all systems missing RDRAND support
|
||||||
logging.info("- Adding SurPlus Patch for Race Condition")
|
logging.info("- Adding SurPlus Patch for Race Condition")
|
||||||
@@ -164,12 +164,12 @@ class BuildFirmware:
|
|||||||
# https://forums.macrumors.com/threads/monterand-probably-the-start-of-an-ongoing-saga.2320479/post-31123553
|
# https://forums.macrumors.com/threads/monterand-probably-the-start-of-an-ongoing-saga.2320479/post-31123553
|
||||||
|
|
||||||
# To verify the non-AVX kext is used, check IOService for 'com_apple_AppleFSCompression_NoAVXCompressionTypeZlib'
|
# To verify the non-AVX kext is used, check IOService for 'com_apple_AppleFSCompression_NoAVXCompressionTypeZlib'
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.sandy_bridge.value:
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.CPUGen.sandy_bridge.value:
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("NoAVXFSCompressionTypeZlib.kext", self.constants.apfs_zlib_version, self.constants.apfs_zlib_path)
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("NoAVXFSCompressionTypeZlib.kext", self.constants.apfs_zlib_version, self.constants.apfs_zlib_path)
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("NoAVXFSCompressionTypeZlib-AVXpel.kext", self.constants.apfs_zlib_v2_version, self.constants.apfs_zlib_v2_path)
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("NoAVXFSCompressionTypeZlib-AVXpel.kext", self.constants.apfs_zlib_v2_version, self.constants.apfs_zlib_v2_path)
|
||||||
|
|
||||||
# HID patches
|
# HID patches
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn.value:
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.penryn.value:
|
||||||
logging.info("- Adding IOHIDFamily patch")
|
logging.info("- Adding IOHIDFamily patch")
|
||||||
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.iokit.IOHIDFamily")["Enabled"] = True
|
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.iokit.IOHIDFamily")["Enabled"] = True
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ class BuildFirmware:
|
|||||||
return
|
return
|
||||||
|
|
||||||
# Exfat check
|
# Exfat check
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.sandy_bridge.value:
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.CPUGen.sandy_bridge.value:
|
||||||
# Sandy Bridge and newer Macs natively support ExFat
|
# Sandy Bridge and newer Macs natively support ExFat
|
||||||
logging.info("- Adding ExFatDxeLegacy.efi")
|
logging.info("- Adding ExFatDxeLegacy.efi")
|
||||||
shutil.copy(self.constants.exfat_legacy_driver_path, self.constants.drivers_path)
|
shutil.copy(self.constants.exfat_legacy_driver_path, self.constants.drivers_path)
|
||||||
@@ -231,7 +231,7 @@ class BuildFirmware:
|
|||||||
if (
|
if (
|
||||||
self.model in ["MacPro6,1", "MacBookPro4,1"] or
|
self.model in ["MacPro6,1", "MacBookPro4,1"] or
|
||||||
(
|
(
|
||||||
smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.sandy_bridge.value and \
|
smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.CPUGen.sandy_bridge.value and \
|
||||||
not self.model.startswith("MacBook")
|
not self.model.startswith("MacBook")
|
||||||
)
|
)
|
||||||
):
|
):
|
||||||
@@ -246,8 +246,8 @@ class BuildFirmware:
|
|||||||
if (
|
if (
|
||||||
self.model.startswith("MacBook")
|
self.model.startswith("MacBook")
|
||||||
and (
|
and (
|
||||||
smbios_data.smbios_dictionary[self.model]["CPU Generation"] == cpu_data.cpu_data.haswell.value or
|
smbios_data.smbios_dictionary[self.model]["CPU Generation"] == cpu_data.CPUGen.haswell.value or
|
||||||
smbios_data.smbios_dictionary[self.model]["CPU Generation"] == cpu_data.cpu_data.broadwell.value
|
smbios_data.smbios_dictionary[self.model]["CPU Generation"] == cpu_data.CPUGen.broadwell.value
|
||||||
)
|
)
|
||||||
):
|
):
|
||||||
# Fix Virtual Machine support for non-macOS OSes
|
# Fix Virtual Machine support for non-macOS OSes
|
||||||
|
|||||||
@@ -546,7 +546,7 @@ class BuildGraphicsAudio:
|
|||||||
]:
|
]:
|
||||||
if (
|
if (
|
||||||
self.model == "MacBookPro13,3" or
|
self.model == "MacBookPro13,3" or
|
||||||
smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.ivy_bridge.value
|
smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.ivy_bridge.value
|
||||||
):
|
):
|
||||||
# MacBookPro13,3 has AVX2.0 however the GPU has an unsupported framebuffer
|
# MacBookPro13,3 has AVX2.0 however the GPU has an unsupported framebuffer
|
||||||
has_kdk_gpu = True
|
has_kdk_gpu = True
|
||||||
@@ -558,7 +558,7 @@ class BuildGraphicsAudio:
|
|||||||
|
|
||||||
# KDKlessWorkaround supports disabling native AMD stack on Ventura for pre-AVX2.0 CPUs
|
# KDKlessWorkaround supports disabling native AMD stack on Ventura for pre-AVX2.0 CPUs
|
||||||
# Applicable for Polaris, Vega, Navi GPUs
|
# Applicable for Polaris, Vega, Navi GPUs
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] > cpu_data.cpu_data.ivy_bridge.value:
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] > cpu_data.CPUGen.ivy_bridge.value:
|
||||||
return
|
return
|
||||||
for gpu in gpu_dict:
|
for gpu in gpu_dict:
|
||||||
if not self.constants.custom_model:
|
if not self.constants.custom_model:
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ class BuildMiscellaneous:
|
|||||||
|
|
||||||
# Resolve CoreGraphics.framework crashing on Ivy Bridge in macOS 13.3+
|
# Resolve CoreGraphics.framework crashing on Ivy Bridge in macOS 13.3+
|
||||||
# Ref: https://github.com/acidanthera/RestrictEvents/pull/12
|
# Ref: https://github.com/acidanthera/RestrictEvents/pull/12
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] == cpu_data.cpu_data.ivy_bridge.value:
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] == cpu_data.CPUGen.ivy_bridge.value:
|
||||||
logging.info("- Fixing CoreGraphics support on Ivy Bridge")
|
logging.info("- Fixing CoreGraphics support on Ivy Bridge")
|
||||||
re_patch_args.append("f16c")
|
re_patch_args.append("f16c")
|
||||||
|
|
||||||
@@ -176,7 +176,7 @@ class BuildMiscellaneous:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# Pre-Force Touch trackpad & keyboard support for macOS Ventura
|
# Pre-Force Touch trackpad & keyboard support for macOS Ventura
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.skylake.value:
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.CPUGen.skylake.value:
|
||||||
if self.model.startswith("MacBook"):
|
if self.model.startswith("MacBook"):
|
||||||
# These units got force touch & the new keyboard mapping early, so ignore them
|
# These units got force touch & the new keyboard mapping early, so ignore them
|
||||||
if self.model not in ["MacBookPro11,4", "MacBookPro11,5", "MacBookPro12,1", "MacBook8,1"]:
|
if self.model not in ["MacBookPro11,4", "MacBookPro11,5", "MacBookPro12,1", "MacBook8,1"]:
|
||||||
@@ -248,7 +248,7 @@ class BuildMiscellaneous:
|
|||||||
#
|
#
|
||||||
# To be paired for sys_patch_dict.py's 'Legacy USB 1.1' patchset
|
# To be paired for sys_patch_dict.py's 'Legacy USB 1.1' patchset
|
||||||
if (
|
if (
|
||||||
smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn.value or \
|
smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.penryn.value or \
|
||||||
self.model in ["MacPro4,1", "MacPro5,1"]
|
self.model in ["MacPro4,1", "MacPro5,1"]
|
||||||
):
|
):
|
||||||
logging.info("- Adding UHCI/OHCI USB support")
|
logging.info("- Adding UHCI/OHCI USB support")
|
||||||
|
|||||||
@@ -43,14 +43,14 @@ class BuildWiredNetworking:
|
|||||||
if isinstance(controller, device_probe.BroadcomEthernet) and controller.chipset == device_probe.BroadcomEthernet.Chipsets.AppleBCM5701Ethernet:
|
if isinstance(controller, device_probe.BroadcomEthernet) and controller.chipset == device_probe.BroadcomEthernet.Chipsets.AppleBCM5701Ethernet:
|
||||||
if not self.model in smbios_data.smbios_dictionary:
|
if not self.model in smbios_data.smbios_dictionary:
|
||||||
continue
|
continue
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.ivy_bridge.value:
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.CPUGen.ivy_bridge.value:
|
||||||
# Required due to Big Sur's BCM5701 requiring VT-D support
|
# Required due to Big Sur's BCM5701 requiring VT-D support
|
||||||
# Applicable for pre-Ivy Bridge models
|
# Applicable for pre-Ivy Bridge models
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("CatalinaBCM5701Ethernet.kext", self.constants.bcm570_version, self.constants.bcm570_path)
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("CatalinaBCM5701Ethernet.kext", self.constants.bcm570_version, self.constants.bcm570_path)
|
||||||
elif isinstance(controller, device_probe.IntelEthernet):
|
elif isinstance(controller, device_probe.IntelEthernet):
|
||||||
if not self.model in smbios_data.smbios_dictionary:
|
if not self.model in smbios_data.smbios_dictionary:
|
||||||
continue
|
continue
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.ivy_bridge.value:
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.CPUGen.ivy_bridge.value:
|
||||||
# Apple's IOSkywalkFamily in DriverKit requires VT-D support
|
# Apple's IOSkywalkFamily in DriverKit requires VT-D support
|
||||||
# Applicable for pre-Ivy Bridge models
|
# Applicable for pre-Ivy Bridge models
|
||||||
if controller.chipset == device_probe.IntelEthernet.Chipsets.AppleIntelI210Ethernet:
|
if controller.chipset == device_probe.IntelEthernet.Chipsets.AppleIntelI210Ethernet:
|
||||||
@@ -76,7 +76,7 @@ class BuildWiredNetworking:
|
|||||||
return
|
return
|
||||||
|
|
||||||
if smbios_data.smbios_dictionary[self.model]["Ethernet Chipset"] == "Broadcom":
|
if smbios_data.smbios_dictionary[self.model]["Ethernet Chipset"] == "Broadcom":
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.ivy_bridge.value:
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.CPUGen.ivy_bridge.value:
|
||||||
# Required due to Big Sur's BCM5701 requiring VT-D support
|
# Required due to Big Sur's BCM5701 requiring VT-D support
|
||||||
# Applicable for pre-Ivy Bridge models
|
# Applicable for pre-Ivy Bridge models
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("CatalinaBCM5701Ethernet.kext", self.constants.bcm570_version, self.constants.bcm570_path)
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("CatalinaBCM5701Ethernet.kext", self.constants.bcm570_version, self.constants.bcm570_path)
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ class BuildSMBIOS:
|
|||||||
|
|
||||||
# Note 1: Only apply if system is UEFI 1.2, this is generally Ivy Bridge and older
|
# Note 1: Only apply if system is UEFI 1.2, this is generally Ivy Bridge and older
|
||||||
# Note 2: Flipping 'UEFI -> ProtocolOverrides -> DataHub' will break hibernation
|
# Note 2: Flipping 'UEFI -> ProtocolOverrides -> DataHub' will break hibernation
|
||||||
if (smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.ivy_bridge.value and self.model):
|
if (smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.ivy_bridge.value and self.model):
|
||||||
logging.info("- Detected UEFI 1.2 or older Mac, updating BoardProduct")
|
logging.info("- Detected UEFI 1.2 or older Mac, updating BoardProduct")
|
||||||
self.config["PlatformInfo"]["DataHub"]["BoardProduct"] = self.spoofed_board
|
self.config["PlatformInfo"]["DataHub"]["BoardProduct"] = self.spoofed_board
|
||||||
self.config["PlatformInfo"]["UpdateDataHub"] = True
|
self.config["PlatformInfo"]["UpdateDataHub"] = True
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ class BuildStorage:
|
|||||||
|
|
||||||
# With macOS Monterey, Apple's SDXC driver requires the system to support VT-D
|
# With macOS Monterey, Apple's SDXC driver requires the system to support VT-D
|
||||||
# However pre-Ivy Bridge don't support this feature
|
# However pre-Ivy Bridge don't support this feature
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.sandy_bridge.value:
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.sandy_bridge.value:
|
||||||
if (self.constants.computer.sdxc_controller and not self.constants.custom_model) or (self.model.startswith("MacBookPro8") or self.model.startswith("Macmini5")):
|
if (self.constants.computer.sdxc_controller and not self.constants.custom_model) or (self.model.startswith("MacBookPro8") or self.model.startswith("Macmini5")):
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("BigSurSDXC.kext", self.constants.bigsursdxc_version, self.constants.bigsursdxc_path)
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("BigSurSDXC.kext", self.constants.bigsursdxc_version, self.constants.bigsursdxc_path)
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ class GenerateDefaults:
|
|||||||
self.constants.disable_cat_colorsync = False
|
self.constants.disable_cat_colorsync = False
|
||||||
|
|
||||||
if self.model in smbios_data.smbios_dictionary:
|
if self.model in smbios_data.smbios_dictionary:
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] >= cpu_data.cpu_data.skylake.value:
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] >= cpu_data.CPUGen.skylake.value:
|
||||||
# On 2016-2017 MacBook Pros, 15" devices used a stock Samsung SSD with IONVMeController
|
# On 2016-2017 MacBook Pros, 15" devices used a stock Samsung SSD with IONVMeController
|
||||||
# Technically this should be patched based on NVMeFix.kext logic,
|
# Technically this should be patched based on NVMeFix.kext logic,
|
||||||
# however Apple deemed the SSD unsupported for enhanced performance
|
# however Apple deemed the SSD unsupported for enhanced performance
|
||||||
@@ -204,7 +204,7 @@ class GenerateDefaults:
|
|||||||
if self.host_is_target:
|
if self.host_is_target:
|
||||||
if self.constants.computer.usb_controllers:
|
if self.constants.computer.usb_controllers:
|
||||||
if self.model in smbios_data.smbios_dictionary:
|
if self.model in smbios_data.smbios_dictionary:
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.ivy_bridge.value:
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.CPUGen.ivy_bridge.value:
|
||||||
# Pre-Ivy do not natively support XHCI boot support
|
# Pre-Ivy do not natively support XHCI boot support
|
||||||
# If we detect XHCI on older model, enable
|
# If we detect XHCI on older model, enable
|
||||||
for controller in self.constants.computer.usb_controllers:
|
for controller in self.constants.computer.usb_controllers:
|
||||||
@@ -286,7 +286,7 @@ class GenerateDefaults:
|
|||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
if self.model in smbios_data.smbios_dictionary:
|
if self.model in smbios_data.smbios_dictionary:
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] >= cpu_data.cpu_data.haswell.value:
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] >= cpu_data.CPUGen.haswell.value:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
self.constants.sip_status = False
|
self.constants.sip_status = False
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ def check_firewire(model):
|
|||||||
if model.startswith("MacBookPro"):
|
if model.startswith("MacBookPro"):
|
||||||
return True
|
return True
|
||||||
elif model.startswith("MacBookAir"):
|
elif model.startswith("MacBookAir"):
|
||||||
if smbios_data.smbios_dictionary[model]["CPU Generation"] < cpu_data.cpu_data.sandy_bridge.value:
|
if smbios_data.smbios_dictionary[model]["CPU Generation"] < cpu_data.CPUGen.sandy_bridge.value:
|
||||||
return False
|
return False
|
||||||
elif model.startswith("MacBook"):
|
elif model.startswith("MacBook"):
|
||||||
return False
|
return False
|
||||||
|
|||||||
@@ -494,7 +494,7 @@ class DetectRootPatch:
|
|||||||
# This is due to Apple implementing an internal USB hub on post-Penryn (excluding MacPro4,1 and MacPro5,1)
|
# This is due to Apple implementing an internal USB hub on post-Penryn (excluding MacPro4,1 and MacPro5,1)
|
||||||
# Ref: https://techcommunity.microsoft.com/t5/microsoft-usb-blog/reasons-to-avoid-companion-controllers/ba-p/270710
|
# Ref: https://techcommunity.microsoft.com/t5/microsoft-usb-blog/reasons-to-avoid-companion-controllers/ba-p/270710
|
||||||
if (
|
if (
|
||||||
smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn.value or \
|
smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.penryn.value or \
|
||||||
self.model in ["MacPro4,1", "MacPro5,1"]
|
self.model in ["MacPro4,1", "MacPro5,1"]
|
||||||
):
|
):
|
||||||
return True
|
return True
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ class macOSInstallerDownloadFrame(wx.Frame):
|
|||||||
model = self.constants.custom_model or self.constants.computer.real_model
|
model = self.constants.custom_model or self.constants.computer.real_model
|
||||||
if model in smbios_data.smbios_dictionary:
|
if model in smbios_data.smbios_dictionary:
|
||||||
if app["OS"] >= os_data.os_data.ventura:
|
if app["OS"] >= os_data.os_data.ventura:
|
||||||
if smbios_data.smbios_dictionary[model]["CPU Generation"] <= cpu_data.cpu_data.penryn or model in ["MacPro4,1", "MacPro5,1", "Xserve3,1"]:
|
if smbios_data.smbios_dictionary[model]["CPU Generation"] <= cpu_data.CPUGen.penryn or model in ["MacPro4,1", "MacPro5,1", "Xserve3,1"]:
|
||||||
if model.startswith("MacBook"):
|
if model.startswith("MacBook"):
|
||||||
problems.append("Lack of internal Keyboard/Trackpad in macOS installer.")
|
problems.append("Lack of internal Keyboard/Trackpad in macOS installer.")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ class SettingsFrame(wx.Frame):
|
|||||||
"USB 3.0 expansion cards on systems",
|
"USB 3.0 expansion cards on systems",
|
||||||
"without native support.",
|
"without native support.",
|
||||||
],
|
],
|
||||||
"condition": not gui_support.CheckProperties(self.constants).host_has_cpu_gen(cpu_data.cpu_data.ivy_bridge) # Sandy Bridge and older do not natively support XHCI booting
|
"condition": not gui_support.CheckProperties(self.constants).host_has_cpu_gen(cpu_data.CPUGen.ivy_bridge) # Sandy Bridge and older do not natively support XHCI booting
|
||||||
},
|
},
|
||||||
"NVMe Booting": {
|
"NVMe Booting": {
|
||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
@@ -270,7 +270,7 @@ class SettingsFrame(wx.Frame):
|
|||||||
"Note: Requires Firmware support",
|
"Note: Requires Firmware support",
|
||||||
"for OpenCore to load from NVMe.",
|
"for OpenCore to load from NVMe.",
|
||||||
],
|
],
|
||||||
"condition": not gui_support.CheckProperties(self.constants).host_has_cpu_gen(cpu_data.cpu_data.ivy_bridge) # Sandy Bridge and older do not natively support NVMe booting
|
"condition": not gui_support.CheckProperties(self.constants).host_has_cpu_gen(cpu_data.CPUGen.ivy_bridge) # Sandy Bridge and older do not natively support NVMe booting
|
||||||
},
|
},
|
||||||
"wrap_around 2": {
|
"wrap_around 2": {
|
||||||
"type": "wrap_around",
|
"type": "wrap_around",
|
||||||
|
|||||||
Reference in New Issue
Block a user