From 52766d2f03d7c75fde1045785e381ed86925b4a5 Mon Sep 17 00:00:00 2001 From: Hoang Hong Quan Date: Wed, 12 Feb 2025 19:18:03 +0700 Subject: [PATCH] Add support for Intel Core Ultra Series 2 processors --- README.md | 2 +- Scripts/acpi_guru.py | 27 ++++++++++++++++++++++----- Scripts/config_prodigy.py | 18 ++++++++++-------- Scripts/datasets/acpi_patch_data.py | 5 +++++ Scripts/datasets/chipset_data.py | 9 ++++++++- Scripts/datasets/cpu_data.py | 1 + Scripts/kext_maestro.py | 6 +++--- 7 files changed, 50 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 84ca2a2..a6f1042 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ | **Component** | **Supported** | |----------------|-----------------------------------------------------------------------------------------------------| - | **CPU** | Intel: Sandy Bridge (2nd Gen) → Raptor Lake (14th Gen)
AMD: Ryzen and Threadripper with [AMD Vanilla](https://github.com/AMD-OSX/AMD_Vanilla) | + | **CPU** | Intel: Sandy Bridge (2nd Gen) → Arrow Lake (15th Gen/Core Ultra Series 2)
AMD: Ryzen and Threadripper with [AMD Vanilla](https://github.com/AMD-OSX/AMD_Vanilla) | | **GPU** | Intel iGPU: Sandy Bridge (2nd Gen) → Ice Lake (10th Gen)
AMD APU: The entire Vega Raven ASIC family (Ryzen 1xxx → 5xxx, 7x30 series)
AMD dGPU: Navi 23, Navi 22, Navi 21 generations, and older series
NVIDIA: Kepler, Pascal, Maxwell, Fermi, Tesla generations | | **macOS** | macOS High Sierra → macOS Sequoia | diff --git a/Scripts/acpi_guru.py b/Scripts/acpi_guru.py index 774a735..330b40e 100644 --- a/Scripts/acpi_guru.py +++ b/Scripts/acpi_guru.py @@ -1566,7 +1566,7 @@ DefinitionBlock ("", "SSDT", 2, "ZPSS", "MCHC", 0) return try: - smbus_device_name = self.acpi.get_device_paths_with_hid("0x001F0003" if self.utils.contains_any(cpu_data.IntelCPUGenerations, self.hardware_report.get("CPU").get("Codename"), start=26) else "0x001F0004", self.dsdt)[0][0].split(".")[-1] + smbus_device_name = self.acpi.get_device_paths_with_hid("0x001F0003" if self.utils.contains_any(cpu_data.IntelCPUGenerations, self.hardware_report.get("CPU").get("Codename"), start=27) else "0x001F0004", self.dsdt)[0][0].split(".")[-1] except: smbus_device_name = "SBUS" @@ -2297,6 +2297,20 @@ DefinitionBlock ("", "SSDT", 2, "ACDT", "PMCR", 0x00001000) } ], } + + def remove_conditional_scope(self): + return { + "Patch": [ + { + "Comment": "Remove conditional ACPI scope declaration", + "Find": "A000000092935043484100", + "Replace": "A3A3A3A3A3A3A3A3A3A3A3", + "Mask": "FF000000FFFFFFFFFFFFFF", + "Count": 1, + "TableSignature": "44534454" + } + ] + } def fix_hp_005_post_error(self): if binascii.unhexlify("4701700070000108") in self.dsdt.get("raw"): @@ -2384,7 +2398,7 @@ 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=21) is None and cpu_codename.endswith(("-X", "-P", "-W", "-E", "-EP", "-EX")) + 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 fix_system_clock_hedt(self): awac_device = self.acpi.get_device_paths_with_hid("ACPI000E", self.dsdt) @@ -2917,7 +2931,7 @@ DefinitionBlock ("", "SSDT", 2, "ZPSS", "SURFACE", 0x00001000) return { "Add": [ { - "Comment": "Avoid kernel panic by pointing the first CPU entry to an active CPU on HEDT systems", + "Comment": "APIC.aml", "Enabled": self.write_ssdt("APIC", new_apic), "Path": "APIC.aml" } @@ -3036,7 +3050,10 @@ DefinitionBlock ("", "SSDT", 2, "ZPSS", "UsbReset", 0x00001000) if "HP " in hardware_report.get("Motherboard").get("Name"): selected_patches.append("CMOS") - if "Laptop" in hardware_report.get("Motherboard").get("Platform") and self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), start=26): + if hardware_report.get("Motherboard").get("Chipset") in chipset_data.IntelChipsets[-7:]: + selected_patches.append("RCSP") + + if "Laptop" in hardware_report.get("Motherboard").get("Platform") and self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), start=27): selected_patches.append("FixHPET") if hardware_report.get("Intel MEI"): @@ -3058,7 +3075,7 @@ DefinitionBlock ("", "SSDT", 2, "ZPSS", "UsbReset", 0x00001000) if hardware_report.get("Motherboard").get("Chipset") in ("C610/X99", "Wellsburg", "X299"): selected_patches.append("RTC0") - if "AMD" in hardware_report.get("CPU").get("Manufacturer") or self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), end=16): + if "AMD" in hardware_report.get("CPU").get("Manufacturer") or self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), end=17): selected_patches.append("RTCAWAC") if "SURFACE" in hardware_report.get("Motherboard").get("Name"): diff --git a/Scripts/config_prodigy.py b/Scripts/config_prodigy.py index a6d5fdc..4b5a10c 100644 --- a/Scripts/config_prodigy.py +++ b/Scripts/config_prodigy.py @@ -354,10 +354,10 @@ class ConfigProdigy: return kernel_block 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[:38] + 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[21:] and cpu_codename.endswith(("-X", "-P", "-W", "-E", "-EP", "-EX")) + return cpu_codename in cpu_data.IntelCPUGenerations[22:] and cpu_codename.endswith(("-X", "-P", "-W", "-E", "-EP", "-EX")) def spoof_cpuid(self, processor_name, cpu_codename, macos_version): if self.is_low_end_haswell_plus(processor_name, cpu_codename): @@ -366,7 +366,7 @@ class ConfigProdigy: return self.cpuids.get("Haswell") elif "Broadwell" in cpu_codename and self.is_intel_hedt_cpu(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=10): + 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: return self.cpuids.get("Comet Lake") if self.utils.parse_darwin_version(macos_version) < self.utils.parse_darwin_version("19.0.0"): @@ -579,16 +579,17 @@ 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=38)) + config["Kernel"]["Quirks"]["AppleCpuPmCfgLock"] = bool(self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), start=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[26:] + 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"]["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") config["Kernel"]["Quirks"]["DisableRtcChecksum"] = "ASUS" in hardware_report.get("Motherboard").get("Name") or "HP " in hardware_report.get("Motherboard").get("Name") config["Kernel"]["Quirks"]["ForceAquantiaEthernet"] = any(network_props.get("Device ID") in pci_data.NetworkIDs[263:280] for network_props in hardware_report.get("Network", {}).values()) config["Kernel"]["Quirks"]["LapicKernelPanic"] = "HP " in hardware_report.get("Motherboard").get("Name") config["Kernel"]["Quirks"]["PanicNoKextDump"] = config["Kernel"]["Quirks"]["PowerTimeoutKernelPanic"] = True - config["Kernel"]["Quirks"]["ProvideCurrentCpuInfo"] = "AMD" in hardware_report.get("CPU").get("Manufacturer") or hardware_report.get("CPU").get("Codename") in cpu_data.IntelCPUGenerations[:2] + config["Kernel"]["Quirks"]["ProvideCurrentCpuInfo"] = "AMD" in hardware_report.get("CPU").get("Manufacturer") or hardware_report.get("CPU").get("Codename") in cpu_data.IntelCPUGenerations[1:3] config["Misc"]["BlessOverride"] = [] config["Misc"]["Boot"]["HideAuxiliary"] = False @@ -617,7 +618,8 @@ class ConfigProdigy: config["UEFI"]["APFS"]["MinDate"] = config["UEFI"]["APFS"]["MinVersion"] = -1 config["UEFI"]["Drivers"] = self.load_drivers() 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"]["IgnoreInvalidFlexRatio"] = hardware_report.get("CPU").get("Codename") in cpu_data.IntelCPUGenerations[26:] + 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:] config["UEFI"]["Quirks"]["ReleaseUsbOwnership"] = True config["UEFI"]["Quirks"]["UnblockFsConnect"] = "HP " in hardware_report.get("Motherboard").get("Name") config["UEFI"]["ReservedMemory"] = [] @@ -634,7 +636,7 @@ class ConfigProdigy: len(config["Booter"]["Patch"]) and self.utils.parse_darwin_version(macos_version) > self.utils.parse_darwin_version("20.4.0"): revpatch.append("sbvmm") if not (" Core" in hardware_report.get("CPU").get("Processor Name") and \ - self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), start=4)): + self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), start=5)): config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["revcpu"] = 1 config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["revcpuname"] = hardware_report.get("CPU").get("Processor Name") if self.utils.parse_darwin_version(macos_version) > self.utils.parse_darwin_version("23.0.0"): diff --git a/Scripts/datasets/acpi_patch_data.py b/Scripts/datasets/acpi_patch_data.py index 801eb3c..5448b4d 100644 --- a/Scripts/datasets/acpi_patch_data.py +++ b/Scripts/datasets/acpi_patch_data.py @@ -36,6 +36,11 @@ patches = [ description = "OS-Aware Fake EC (by CorpNewt)", function_name = "fake_embedded_controller" ), + PatchInfo( + name = "RCSP", + description = "Remove conditional ACPI scope declaration", + function_name = "remove_conditional_scope" + ), PatchInfo( name = "CMOS", description = "Fix HP Real-Time Clock Power Loss (005) Post Error", diff --git a/Scripts/datasets/chipset_data.py b/Scripts/datasets/chipset_data.py index e67effd..cd8ea0a 100644 --- a/Scripts/datasets/chipset_data.py +++ b/Scripts/datasets/chipset_data.py @@ -157,7 +157,14 @@ IntelChipsets = [ "C262", "W790", "Meteor Lake-P", - "Lunar Lake-M" + "Lunar Lake-M", + "Q870", + "Z890", + "B860", + "H810", + "W880", + "HM870", + "WM880" ] AMDChipsets = [ diff --git a/Scripts/datasets/cpu_data.py b/Scripts/datasets/cpu_data.py index aa2c964..08df135 100644 --- a/Scripts/datasets/cpu_data.py +++ b/Scripts/datasets/cpu_data.py @@ -33,6 +33,7 @@ AMDCPUGenerations = [ ] IntelCPUGenerations = [ + "Arrow Lake-S", "Raptor Lake-S", "Alder Lake-S", "Rocket Lake-S", diff --git a/Scripts/kext_maestro.py b/Scripts/kext_maestro.py index 2d94b7a..56849b4 100644 --- a/Scripts/kext_maestro.py +++ b/Scripts/kext_maestro.py @@ -70,7 +70,7 @@ 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=21) is None and cpu_codename.endswith(("-X", "-P", "-W", "-E", "-EP", "-EX")) + 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 get_kext_index(self, name): for index, kext in enumerate(self.kexts): @@ -115,7 +115,7 @@ class KextMaestro: selected_kexts.append("SMCLightSensor") if not (" Core" in hardware_report.get("CPU").get("Processor Name") and \ - self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), start=4)) or \ + self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), start=5)) or \ self.utils.parse_darwin_version(macos_version) >= self.utils.parse_darwin_version("23.0.0"): selected_kexts.append("RestrictEvents") @@ -130,7 +130,7 @@ class KextMaestro: if self.utils.parse_darwin_version(macos_version) >= self.utils.parse_darwin_version("22.0.0") and not "AVX2" in hardware_report.get("CPU").get("SIMD Features"): selected_kexts.append("CryptexFixup") - if self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), end=2) and \ + if self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), end=3) and \ int(hardware_report.get("CPU").get("Core Count")) > 6: selected_kexts.append("CpuTopologyRebuild")