diff --git a/CPUFriend.xcodeproj/project.pbxproj b/CPUFriend.xcodeproj/project.pbxproj index 33c7350..da0bd09 100755 --- a/CPUFriend.xcodeproj/project.pbxproj +++ b/CPUFriend.xcodeproj/project.pbxproj @@ -171,7 +171,7 @@ 1C748C1E1C21952C0024EED2 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1100; + LastUpgradeCheck = 1120; ORGANIZATIONNAME = Vanilla; TargetAttributes = { 1C748C261C21952C0024EED2 = { @@ -342,7 +342,7 @@ MODULE_NAME = org.vanilla.driver.CPUFriend; MODULE_START = "$(PRODUCT_NAME)_kern_start"; MODULE_STOP = "$(PRODUCT_NAME)_kern_stop"; - MODULE_VERSION = 1.1.9; + MODULE_VERSION = 1.2.0; OTHER_CFLAGS = ( "-mmmx", "-msse", @@ -388,7 +388,7 @@ MODULE_NAME = org.vanilla.driver.CPUFriend; MODULE_START = "$(PRODUCT_NAME)_kern_start"; MODULE_STOP = "$(PRODUCT_NAME)_kern_stop"; - MODULE_VERSION = 1.1.9; + MODULE_VERSION = 1.2.0; OTHER_CFLAGS = ( "-mmmx", "-msse", diff --git a/CPUFriend/CPUFriend.cpp b/CPUFriend/CPUFriend.cpp index c68cb89..a6c8989 100755 --- a/CPUFriend/CPUFriend.cpp +++ b/CPUFriend/CPUFriend.cpp @@ -11,18 +11,15 @@ static const char *kextACPISMC[] { "/System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/MacOS/ACPI_SMC_PlatformPlugin" }; static const char *kextX86PP[] { "/System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/X86PlatformPlugin.kext/Contents/MacOS/X86PlatformPlugin" }; -static const char *kextMCEReporter[] { "/System/Library/Extensions/AppleIntelMCEReporter.kext/Contents/MacOS/AppleIntelMCEReporter" }; enum : size_t { KextACPISMC, KextX86PP, - KextMCEReporter }; static KernelPatcher::KextInfo kextList[] { { "com.apple.driver.ACPI_SMC_PlatformPlugin", kextACPISMC, arrsize(kextACPISMC), {}, {}, KernelPatcher::KextInfo::Unloaded }, { "com.apple.driver.X86PlatformPlugin", kextX86PP, arrsize(kextX86PP), {}, {}, KernelPatcher::KextInfo::Unloaded }, - { "com.apple.driver.AppleIntelMCEReporter", kextMCEReporter, arrsize(kextMCEReporter), {}, {}, KernelPatcher::KextInfo::Unloaded } }; static constexpr size_t kextListSize = arrsize(kextList); @@ -116,14 +113,6 @@ void CPUFriendPlugin::myX86PPConfigResourceCallback(uint32_t requestTag, kern_re FunctionCast(myX86PPConfigResourceCallback, callbackCpuf->orgX86PPConfigLoadCallback)(requestTag, result, resourceData, resourceDataLength, context); } -IOService *CPUFriendPlugin::myAppleIntelMCEReporterProbe(IOService *, IOService *, SInt32 *) -{ - DBGLOG("cpuf", "killing AppleIntelMCEReporter"); - - // always return nullptr for prevention of AppleIntelMCEReporter. - return nullptr; -} - void CPUFriendPlugin::processKext(KernelPatcher &patcher, size_t index, mach_vm_address_t address, size_t size) { if (kextList[KextACPISMC].loadIndex == index) { @@ -143,14 +132,4 @@ void CPUFriendPlugin::processKext(KernelPatcher &patcher, size_t index, mach_vm_ ); patcher.routeMultiple(index, &request, 1, address, size); } - - if (kextList[KextMCEReporter].loadIndex == index) { - DBGLOG("cpuf", "patching AppleIntelMCEReporter"); - KernelPatcher::RouteRequest request( - "__ZN21AppleIntelMCEReporter5probeEP9IOServicePi", - myAppleIntelMCEReporterProbe - ); - patcher.routeMultiple(index, &request, 1, address, size); - } - } diff --git a/CPUFriend/CPUFriend.hpp b/CPUFriend/CPUFriend.hpp index 382731e..3685b6a 100755 --- a/CPUFriend/CPUFriend.hpp +++ b/CPUFriend/CPUFriend.hpp @@ -52,7 +52,6 @@ class CPUFriendPlugin { */ static void myACPISMCConfigResourceCallback(uint32_t requestTag, kern_return_t result, const void *resourceData, uint32_t resourceDataLength, void *context); static void myX86PPConfigResourceCallback(uint32_t requestTag, kern_return_t result, const void *resourceData, uint32_t resourceDataLength, void *context); - static IOService *myAppleIntelMCEReporterProbe(IOService *, IOService *, SInt32 *); /** * Patch kext if needed and prepare other patches diff --git a/Changelog.md b/Changelog.md index 8c41193..ed63d74 100755 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,8 @@ CPUFriend Changelog =================== +#### v1.2.0 +- Dropped broken AppleIntelMCEReporter prevention support + #### v1.1.9 - Unified release archive names - Added support for prevention of AppleIntelMCEReporter, details can be found [here](https://github.com/acidanthera/bugtracker/issues/424#issuecomment-512596034) diff --git a/Instructions.md b/Instructions.md index 02f6d5b..e0dc612 100755 --- a/Instructions.md +++ b/Instructions.md @@ -17,7 +17,6 @@ Add `-cpufbeta` to enable CPUFriend on unsupported OS versions. #### Technical background - Function `configResourceCallback()` from `ACPI_SMC_PlatformPlugin` or `X86PlatformPlugin` is hooked for CPU power management data customization, nothing will be handled without data received from user. -- Function `AppleIntelMCEReporter::probe()` is hooked for prevention of AppleIntelMCEReporter, enabled mandatorily at the moment. #### Configuration Use `Tools/ResourceConverter.sh` to generate a working copy of either `CPUFriendDataProvider.kext` (Convenience preferred) or `ssdt_data.dsl` (Performance preferred). @@ -32,7 +31,7 @@ Where there is another SSDT generated by [ssdtPRGen.sh](https://github.com/Piker NOTE: - The created kext/ssdt is located in the current working directory that can be revealed with `pwd`. -- `file` should be a ***complete plist*** from `Recources` inside `ACPI_SMC_PlatformPlugin` or `X86PlatformPlugin` ***with certain modifications*** (Otherwise why is CPUFriend even required other than the prevention of AppleIntelMCEReporter?) instead of something like a raw `FrequencyVectors` entry. +- `file` should be a ***complete plist*** from `Recources` inside `ACPI_SMC_PlatformPlugin` or `X86PlatformPlugin` ***with certain modifications*** (Otherwise why is CPUFriend even required?) instead of something like a raw `FrequencyVectors` entry. #### Data Combination 1. Generate a correct copy of `ssdt_data.dsl` with `./ResourceConverter.sh --acpi /path/to/file`. diff --git a/README.md b/README.md index 01c5ae4..c2b1681 100755 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ CPUFriend [![Build Status](https://travis-ci.com/acidanthera/CPUFriend.svg?branch=master)](https://travis-ci.com/acidanthera/CPUFriend) [![Scan Status](https://scan.coverity.com/projects/16841/badge.svg?flat=1)](https://scan.coverity.com/projects/16841) -A [Lilu](https://github.com/vit9696/Lilu) plug-in for dynamic power management data injection and prevention of AppleIntelMCEReporter, details can be found [here](https://github.com/acidanthera/bugtracker/issues/424#issuecomment-512596034). +A [Lilu](https://github.com/vit9696/Lilu) plug-in for dynamic power management data injection. #### Notes This repository should be compiled with latest [Lilu](https://github.com/vit9696/Lilu), otherwise the compilation will fail!