mirror of
https://github.com/outbackdingo/OpCore-Simplify.git
synced 2026-01-27 10:19:49 +00:00
Add support for Intel Nehalem and Westmere architectures
This commit is contained in:
@@ -2008,7 +2008,7 @@ DefinitionBlock ("", "SSDT", 2, "ZPSS", "DNVMe", 0x00000000)
|
||||
|
||||
integrated_gpu = list(self.hardware_report.get("GPU").items())[-1][-1]
|
||||
uid_value = 19
|
||||
if integrated_gpu.get("Codename") in ("Sandy Bridge", "Ivy Bridge"):
|
||||
if integrated_gpu.get("Codename") in ("Iron Lake", "Sandy Bridge", "Ivy Bridge"):
|
||||
uid_value = 14
|
||||
elif integrated_gpu.get("Codename") in ("Haswell", "Broadwell"):
|
||||
uid_value = 15
|
||||
@@ -2397,9 +2397,9 @@ DefinitionBlock("", "SSDT", 2, "ZPSS", "RMNE", 0x00001000)
|
||||
]
|
||||
}
|
||||
|
||||
def is_intel_hedt_cpu(self, cpu_codename):
|
||||
return not self.utils.contains_any(cpu_data.IntelCPUGenerations, cpu_codename, start=22) is None and cpu_codename.endswith(("-X", "-P", "-W", "-E", "-EP", "-EX"))
|
||||
|
||||
def is_intel_hedt_cpu(self, processor_name, cpu_codename):
|
||||
return cpu_codename in cpu_data.IntelCPUGenerations[22:] and (cpu_codename.endswith(("-X", "-P", "-W", "-E", "-EP", "-EX")) or not (cpu_codename in ("Arrandale", "Clarksfield", "Lynnfield", "Clarkdale") and "Xeon" not in processor_name))
|
||||
|
||||
def fix_system_clock_hedt(self):
|
||||
awac_device = self.acpi.get_device_paths_with_hid("ACPI000E", self.dsdt)
|
||||
try:
|
||||
@@ -3035,7 +3035,7 @@ DefinitionBlock ("", "SSDT", 2, "ZPSS", "UsbReset", 0x00001000)
|
||||
selected_patches.append("ALS")
|
||||
selected_patches.append("PNLF")
|
||||
|
||||
if self.is_intel_hedt_cpu(hardware_report.get("CPU").get("Codename")):
|
||||
if self.is_intel_hedt_cpu(hardware_report.get("CPU").get("Processor Name"), hardware_report.get("CPU").get("Codename")):
|
||||
selected_patches.append("APIC")
|
||||
|
||||
if "Intel" in hardware_report.get("CPU").get("Manufacturer"):
|
||||
|
||||
@@ -75,8 +75,10 @@ class CompatibilityChecker:
|
||||
ocl_patched_max_version = max_version
|
||||
ocl_patched_min_version = "20.0.0"
|
||||
|
||||
if "Intel" in gpu_manufacturer:
|
||||
if device_id.startswith("01") and not device_id[-2] in ("5", "6") and not device_id in ("0102", "0106", "010A"):
|
||||
if "Intel" in gpu_manufacturer:
|
||||
if device_id.startswith(("0042", "0046")) and self.hardware_report.get("Motherboard").get("Platform") != "Desktop":
|
||||
max_version = "17.99.99"
|
||||
elif device_id.startswith("01") and not device_id[-2] in ("5", "6") and not device_id in ("0102", "0106", "010A"):
|
||||
max_version = "17.99.99"
|
||||
elif device_id.startswith("01") and not device_id in ("0152", "0156"):
|
||||
max_version = "20.99.99"
|
||||
|
||||
@@ -69,7 +69,10 @@ class ConfigProdigy:
|
||||
|
||||
device_id = integrated_gpu[1].get("Device ID")[5:]
|
||||
|
||||
if device_id.startswith("01") and not device_id[-2] in ("5", "6"):
|
||||
if device_id.startswith(("0042", "0046")):
|
||||
igpu_properties["framebuffer-patch-enable"] = "01000000"
|
||||
igpu_properties["framebuffer-singlelink"] = "01000000"
|
||||
elif device_id.startswith("01") and not device_id[-2] in ("5", "6"):
|
||||
native_supported_ids = ("0106", "1106", "1601", "0116", "0126", "0102")
|
||||
if not device_id in native_supported_ids:
|
||||
igpu_properties["device-id"] = "26010000"
|
||||
@@ -356,15 +359,15 @@ class ConfigProdigy:
|
||||
def is_low_end_haswell_plus(self, processor_name, cpu_codename):
|
||||
return self.is_low_end_intel_cpu(processor_name) and cpu_codename in cpu_data.IntelCPUGenerations[:39]
|
||||
|
||||
def is_intel_hedt_cpu(self, cpu_codename):
|
||||
return cpu_codename in cpu_data.IntelCPUGenerations[22:] and cpu_codename.endswith(("-X", "-P", "-W", "-E", "-EP", "-EX"))
|
||||
def is_intel_hedt_cpu(self, processor_name, cpu_codename):
|
||||
return cpu_codename in cpu_data.IntelCPUGenerations[22:] and (cpu_codename.endswith(("-X", "-P", "-W", "-E", "-EP", "-EX")) or not (cpu_codename in ("Arrandale", "Clarksfield", "Lynnfield", "Clarkdale") and "Xeon" not in processor_name))
|
||||
|
||||
def spoof_cpuid(self, processor_name, cpu_codename, macos_version):
|
||||
if self.is_low_end_haswell_plus(processor_name, cpu_codename):
|
||||
return self.cpuids.get("Ivy Bridge")
|
||||
elif "Haswell" in cpu_codename and self.is_intel_hedt_cpu(cpu_codename):
|
||||
elif "Haswell" in cpu_codename and self.is_intel_hedt_cpu(processor_name, cpu_codename):
|
||||
return self.cpuids.get("Haswell")
|
||||
elif "Broadwell" in cpu_codename and self.is_intel_hedt_cpu(cpu_codename):
|
||||
elif "Broadwell" in cpu_codename and self.is_intel_hedt_cpu(processor_name, cpu_codename):
|
||||
return self.cpuids.get("Broadwell")
|
||||
elif "Ice Lake" not in cpu_codename and self.utils.contains_any(cpu_data.IntelCPUGenerations, cpu_codename, end=11):
|
||||
if not "Comet Lake" in cpu_codename:
|
||||
@@ -435,7 +438,7 @@ class ConfigProdigy:
|
||||
"keepsyms=1"
|
||||
]
|
||||
|
||||
if not resize_bar and ("AMD" in hardware_report.get("CPU").get("Manufacturer") or self.is_intel_hedt_cpu(hardware_report.get("CPU").get("Codename"))):
|
||||
if not resize_bar and ("AMD" in hardware_report.get("CPU").get("Manufacturer") or self.is_intel_hedt_cpu(hardware_report.get("CPU").get("Processor Name"), hardware_report.get("CPU").get("Codename"))):
|
||||
boot_args.append("npci=0x2000")
|
||||
|
||||
for kext in kexts:
|
||||
@@ -521,16 +524,20 @@ class ConfigProdigy:
|
||||
else:
|
||||
return "FF030000"
|
||||
|
||||
def load_drivers(self):
|
||||
def load_drivers(self, firmware_type, cpu_codename):
|
||||
uefi_drivers = []
|
||||
required_drivers = ["HfsPlus.efi" if not cpu_codename in cpu_data.IntelCPUGenerations[41:] else "HfsPlusLegacy.efi", "OpenCanopy.efi", "OpenRuntime.efi", "ResetNvramEntry.efi"]
|
||||
|
||||
if firmware_type == "Legacy":
|
||||
required_drivers.append("OpenUsbKbDxe.efi")
|
||||
|
||||
for driver_path in ("HfsPlus.efi", "OpenCanopy.efi", "OpenRuntime.efi", "ResetNvramEntry.efi"):
|
||||
for driver in required_drivers:
|
||||
uefi_drivers.append({
|
||||
"Arguments": "",
|
||||
"Comment": "",
|
||||
"Enabled": True,
|
||||
"LoadEarly": False,
|
||||
"Path": driver_path
|
||||
"Path": driver
|
||||
})
|
||||
|
||||
return uefi_drivers
|
||||
@@ -543,17 +550,21 @@ class ConfigProdigy:
|
||||
|
||||
config["Booter"]["MmioWhitelist"] = self.mmio_whitelist(hardware_report.get("Motherboard").get("Chipset"))
|
||||
config["Booter"]["Patch"] = self.add_booter_patch(smbios_model, macos_version)
|
||||
config["Booter"]["Quirks"]["AvoidRuntimeDefrag"] = not (hardware_report.get("BIOS").get("Firmware Type") == "Legacy" and self.utils.parse_darwin_version(macos_version) != self.utils.parse_darwin_version("20.0.0"))
|
||||
config["Booter"]["Quirks"]["DevirtualiseMmio"] = len(config["Booter"]["MmioWhitelist"]) != 0 or \
|
||||
hardware_report.get("Motherboard").get("Chipset") in chipset_data.IntelChipsets[101:] + chipset_data.IntelChipsets[79:89] or \
|
||||
hardware_report.get("Motherboard").get("Chipset") in chipset_data.IntelChipsets[93:101] and ("Desktop" in hardware_report.get("Motherboard").get("Platform") or not "-8" in hardware_report.get("CPU").get("Processor Name")) or \
|
||||
hardware_report.get("Motherboard").get("Chipset") == chipset_data.AMDChipsets[16]
|
||||
config["Booter"]["Quirks"]["EnableWriteUnprotector"] = not ("AMD" in hardware_report.get("CPU").get("Manufacturer") or hardware_report.get("Motherboard").get("Chipset") in chipset_data.IntelChipsets[79:89] + chipset_data.IntelChipsets[101:])
|
||||
config["Booter"]["Quirks"]["EnableSafeModeSlide"] = hardware_report.get("BIOS").get("Firmware Type") == "UEFI"
|
||||
config["Booter"]["Quirks"]["EnableWriteUnprotector"] = not (hardware_report.get("BIOS").get("Firmware Type") == "Legacy" or "AMD" in hardware_report.get("CPU").get("Manufacturer") or hardware_report.get("Motherboard").get("Chipset") in chipset_data.IntelChipsets[79:89] + chipset_data.IntelChipsets[101:])
|
||||
config["Booter"]["Quirks"]["ProtectMemoryRegions"] = "GOOGLE" in hardware_report.get("Motherboard").get("Name") or any(device_props.get("Device ID") in pci_data.ChromebookIDs and device_props.get("Subsystem ID") in pci_data.ChromebookIDs[device_props.get("Device ID")] for device_props in hardware_report.get("System Devices", {}).values())
|
||||
config["Booter"]["Quirks"]["FixupAppleEfiImages"] = not (hardware_report.get("BIOS").get("Firmware Type") == "Legacy" and self.utils.parse_darwin_version("17.0.0") < self.utils.parse_darwin_version(macos_version))
|
||||
config["Booter"]["Quirks"]["ProtectUefiServices"] = hardware_report.get("Motherboard").get("Chipset") in chipset_data.IntelChipsets[101:] or \
|
||||
hardware_report.get("Motherboard").get("Chipset") in chipset_data.IntelChipsets[93:101] and (not "-8" in hardware_report.get("CPU").get("Processor Name") or hardware_report.get("Motherboard").get("Chipset") == chipset_data.IntelChipsets[98])
|
||||
config["Booter"]["Quirks"]["RebuildAppleMemoryMap"] = not config["Booter"]["Quirks"]["EnableWriteUnprotector"]
|
||||
config["Booter"]["Quirks"]["ProvideCustomSlide"] = hardware_report.get("BIOS").get("Firmware Type") == "UEFI"
|
||||
config["Booter"]["Quirks"]["RebuildAppleMemoryMap"] = not config["Booter"]["Quirks"]["EnableWriteUnprotector"] if hardware_report.get("CPU").get("Codename") not in cpu_data.IntelCPUGenerations[-11:] else self.utils.parse_darwin_version(macos_version) < self.utils.parse_darwin_version("10.0.0")
|
||||
config["Booter"]["Quirks"]["ResizeAppleGpuBars"] = 0 if any(gpu_props.get("Resizable BAR", "Disabled") == "Enabled" for gpu_name, gpu_props in hardware_report.get("GPU", {}).items()) else -1
|
||||
config["Booter"]["Quirks"]["SetupVirtualMap"] = not hardware_report.get("Motherboard").get("Chipset") in chipset_data.AMDChipsets[11:17] + chipset_data.IntelChipsets[79:89]
|
||||
config["Booter"]["Quirks"]["SetupVirtualMap"] = hardware_report.get("BIOS").get("Firmware Type") == "UEFI" and not hardware_report.get("Motherboard").get("Chipset") in chipset_data.AMDChipsets[11:17] + chipset_data.IntelChipsets[79:89]
|
||||
config["Booter"]["Quirks"]["SyncRuntimePermissions"] = "AMD" in hardware_report.get("CPU").get("Manufacturer") or hardware_report.get("Motherboard").get("Chipset") in chipset_data.IntelChipsets[79:89] + chipset_data.IntelChipsets[93:]
|
||||
|
||||
config["DeviceProperties"]["Add"] = self.deviceproperties(hardware_report, unsupported_devices, macos_version, kexts)
|
||||
@@ -579,9 +590,9 @@ class ConfigProdigy:
|
||||
hardware_report.get("Network", {}),
|
||||
kexts
|
||||
)
|
||||
config["Kernel"]["Quirks"]["AppleCpuPmCfgLock"] = bool(self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), start=39))
|
||||
config["Kernel"]["Quirks"]["AppleCpuPmCfgLock"] = hardware_report.get("CPU").get("Codename") in cpu_data.IntelCPUGenerations[39:]
|
||||
config["Kernel"]["Quirks"]["AppleXcpmCfgLock"] = False if "AMD" in hardware_report.get("CPU").get("Manufacturer") else not config["Kernel"]["Quirks"]["AppleCpuPmCfgLock"]
|
||||
config["Kernel"]["Quirks"]["AppleXcpmExtraMsrs"] = "-E" in hardware_report.get("CPU").get("Codename") and hardware_report.get("CPU").get("Codename") in cpu_data.IntelCPUGenerations[27:]
|
||||
config["Kernel"]["Quirks"]["AppleXcpmExtraMsrs"] = self.is_intel_hedt_cpu(hardware_report.get("CPU").get("Processor Name"), hardware_report.get("CPU").get("Codename")) and hardware_report.get("CPU").get("Codename") in cpu_data.IntelCPUGenerations[27:]
|
||||
config["Kernel"]["Quirks"]["AppleXcpmForceBoost"] = hardware_report.get("CPU").get("Codename") in cpu_data.IntelCPUGenerations[:1]
|
||||
config["Kernel"]["Quirks"]["CustomSMBIOSGuid"] = True
|
||||
config["Kernel"]["Quirks"]["DisableIoMapper"] = not "AMD" in hardware_report.get("CPU").get("Manufacturer")
|
||||
@@ -615,7 +626,8 @@ class ConfigProdigy:
|
||||
config["PlatformInfo"]["UpdateSMBIOSMode"] = "Custom"
|
||||
|
||||
config["UEFI"]["APFS"]["MinDate"] = config["UEFI"]["APFS"]["MinVersion"] = -1
|
||||
config["UEFI"]["Drivers"] = self.load_drivers()
|
||||
config["UEFI"]["Drivers"] = self.load_drivers(hardware_report.get("BIOS").get("Firmware Type"), hardware_report.get("CPU").get("Codename"))
|
||||
config["UEFI"]["Input"]["KeySupport"] = hardware_report.get("BIOS").get("Firmware Type") == "UEFI"
|
||||
config["UEFI"]["Quirks"]["ForceOcWriteFlash"] = any(device_props.get("Device ID") in pci_data.ThinkPadTWX30IDs and device_props.get("Subsystem ID") in pci_data.ThinkPadTWX30IDs[device_props.get("Device ID")] for device_props in hardware_report.get("System Devices", {}).values())
|
||||
config["UEFI"]["Quirks"]["EnableVectorAcceleration"] = not hardware_report.get("CPU").get("Codename") in cpu_data.IntelCPUGenerations[:3]
|
||||
config["UEFI"]["Quirks"]["IgnoreInvalidFlexRatio"] = hardware_report.get("CPU").get("Codename") in cpu_data.IntelCPUGenerations[27:]
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
IntelChipsets = [
|
||||
"X58",
|
||||
"NM10",
|
||||
"P55",
|
||||
"PM55",
|
||||
"H55",
|
||||
"QM57",
|
||||
"H57",
|
||||
"HM55",
|
||||
"Q57",
|
||||
"HM57",
|
||||
"QS57",
|
||||
"Cougar Point",
|
||||
"Z68",
|
||||
"P67",
|
||||
|
||||
@@ -75,5 +75,16 @@ IntelCPUGenerations = [
|
||||
"Ivy Bridge",
|
||||
"Ivy Bridge-E",
|
||||
"Sandy Bridge",
|
||||
"Sandy Bridge-E"
|
||||
"Sandy Bridge-E",
|
||||
"Beckton",
|
||||
"Westmere-EX",
|
||||
"Gulftown",
|
||||
"Westmere-EP",
|
||||
"Clarkdale",
|
||||
"Arrandale",
|
||||
"Lynnfield",
|
||||
"Jasper Forest",
|
||||
"Clarksfield",
|
||||
"Gainestown",
|
||||
"Bloomfield"
|
||||
]
|
||||
@@ -11,6 +11,9 @@ class MacDevice:
|
||||
|
||||
mac_devices = [
|
||||
# iMac Models
|
||||
MacDevice("iMac11,1", "i7-860", "Lynnfield", "ATI Radeon HD 4850", "10.2.0", "17.99.99"),
|
||||
MacDevice("iMac11,2", "i5-680", "Clarkdale", "ATI Radeon HD 4670", "10.3.0", "17.99.99"),
|
||||
MacDevice("iMac11,3", "i7-870", "Clarkdale", "ATI Radeon HD 5670", "10.3.0", "17.99.99"),
|
||||
MacDevice("iMac12,1", "i5-2400S", "Sandy Bridge", "AMD Radeon HD 6750M", "10.6.0", "17.99.99"),
|
||||
MacDevice("iMac12,2", "i7-2600", "Sandy Bridge", "AMD Radeon HD 6770M", "10.6.0", "17.99.99"),
|
||||
MacDevice("iMac13,1", "i7-3770S", "Ivy Bridge", "NVIDIA GeForce GT 640M", "12.2.0", "19.99.99"),
|
||||
@@ -48,6 +51,8 @@ mac_devices = [
|
||||
MacDevice("MacBookAir8,2", "i5-8210Y", "Amber Lake", None, "18.6.0"),
|
||||
MacDevice("MacBookAir9,1", "i3-1000NG4", "Ice Lake", None, "19.4.0"),
|
||||
# MacBookPro Models
|
||||
MacDevice("MacBookPro6,1", "i7-640M", "Arrandale", "NVIDIA GeForce GT 330M", "10.3.0", "17.99.99"),
|
||||
MacDevice("MacBookPro6,2", "i7-640M", "Arrandale", "NVIDIA GeForce GT 330M", "10.3.0", "17.99.99"),
|
||||
MacDevice("MacBookPro8,1", "i5-2415M", "Sandy Bridge", None, "10.6.0", "17.99.99"),
|
||||
MacDevice("MacBookPro8,2", "i7-2675QM", "Sandy Bridge", "AMD Radeon HD 6490M", "10.6.0", "17.99.99"),
|
||||
MacDevice("MacBookPro8,3", "i7-2820QM", "Sandy Bridge", "AMD Radeon HD 6750M", "10.6.0", "17.99.99"),
|
||||
@@ -86,7 +91,8 @@ mac_devices = [
|
||||
# iMacPro Models
|
||||
MacDevice("iMacPro1,1", "W-2140B", "Skylake-W", "AMD Radeon RX Vega 56", "17.3.0"),
|
||||
# MacPro Models
|
||||
MacDevice("MacPro6,1", "E5-1620 v2", "Ivy Bridge EP", "AMD FirePro D300", "10.9.1", "21.99.99"),
|
||||
MacDevice("MacPro5,1", "X5675 x2", "Nehalem/Westmere", "ATI Radeon HD 5770", "10.4.0", "18.99.99"),
|
||||
MacDevice("MacPro6,1", "E5-1620 v2", "Ivy Bridge EP", "AMD FirePro D300", "13.0.0", "21.99.99"),
|
||||
MacDevice("MacPro7,1", "W-3245M", "Cascade Lake-W", "AMD Radeon Pro 580X", "19.0.0")
|
||||
]
|
||||
|
||||
|
||||
@@ -69,8 +69,8 @@ class KextMaestro:
|
||||
|
||||
return pci_ids
|
||||
|
||||
def is_intel_hedt_cpu(self, cpu_codename):
|
||||
return not self.utils.contains_any(cpu_data.IntelCPUGenerations, cpu_codename, start=22) is None and cpu_codename.endswith(("-X", "-P", "-W", "-E", "-EP", "-EX"))
|
||||
def is_intel_hedt_cpu(self, processor_name, cpu_codename):
|
||||
return cpu_codename in cpu_data.IntelCPUGenerations[22:] and (cpu_codename.endswith(("-X", "-P", "-W", "-E", "-EP", "-EX")) or not (cpu_codename in ("Arrandale", "Clarksfield", "Lynnfield", "Clarkdale") and "Xeon" not in processor_name))
|
||||
|
||||
def get_kext_index(self, name):
|
||||
for index, kext in enumerate(self.kexts):
|
||||
@@ -144,7 +144,7 @@ class KextMaestro:
|
||||
if "Laptop" in hardware_report.get("Motherboard").get("Platform") and ("ASUS" in hardware_report.get("Motherboard").get("Name") or "NootedRed" in selected_kexts):
|
||||
selected_kexts.append("ForgedInvariant")
|
||||
|
||||
if self.is_intel_hedt_cpu(hardware_report.get("CPU").get("Codename")):
|
||||
if self.is_intel_hedt_cpu(hardware_report.get("CPU").get("Processor Name"), hardware_report.get("CPU").get("Codename")):
|
||||
selected_kexts.append("CpuTscSync")
|
||||
|
||||
if needs_oclp:
|
||||
|
||||
@@ -81,13 +81,19 @@ class SMBIOS:
|
||||
|
||||
smbios_model = "MacBookPro16,3" if "Laptop" in platform else "iMacPro1,1"
|
||||
|
||||
if ("Sandy Bridge" in codename or "Ivy Bridge" in codename) and self.utils.parse_darwin_version(macos_version) < self.utils.parse_darwin_version("22.0.0"):
|
||||
if codename in ("Lynnfield", "Clarkdale") and "Xeon" not in hardware_report.get("CPU").get("Processor Name") and self.utils.parse_darwin_version(macos_version) < self.utils.parse_darwin_version("19.0.0"):
|
||||
smbios_model = "iMac11,1" if codename in "Lynnfield" else "iMac11,2"
|
||||
elif codename in ("Beckton", "Westmere-EX", "Gulftown", "Westmere-EP", "Clarkdale", "Lynnfield", "Jasper Forest", "Gainestown", "Bloomfield"):
|
||||
smbios_model = "MacPro5,1" if self.utils.parse_darwin_version(macos_version) < self.utils.parse_darwin_version("19.0.0") else "MacPro6,1"
|
||||
elif ("Sandy Bridge" in codename or "Ivy Bridge" in codename) and self.utils.parse_darwin_version(macos_version) < self.utils.parse_darwin_version("22.0.0"):
|
||||
smbios_model = "MacPro6,1"
|
||||
|
||||
if platform != "Laptop" and list(hardware_report.get("GPU").items())[-1][-1].get("Device Type") != "Integrated GPU":
|
||||
return smbios_model
|
||||
|
||||
if "Sandy Bridge" in codename:
|
||||
|
||||
if codename in ("Arrandale", "Clarksfield"):
|
||||
smbios_model = "MacBookPro6,1"
|
||||
elif "Sandy Bridge" in codename:
|
||||
if "Desktop" in platform:
|
||||
smbios_model = "iMac12,2"
|
||||
elif "NUC" in platform:
|
||||
|
||||
Reference in New Issue
Block a user