Jump to content

Superior kext-patch based alternative for NullCPUPM


IOIIIO
 Share

11 posts in this topic

Recommended Posts

It took some messing around, but I have made a kext patch which can be used as a superior alternative for NullCPUPowerManagement.kext.

Since it still allows AICPM to load, we can now load X86PlatformPlugin and by extension AGPM on a system where CPU PM doesn't work. This is useful on for example AMD systems, where CPU PM cannot be enabled properly.

So far tested on Catalina and High Sierra, but should also work on other versions, and is reported to give very decent performance improvements when paired with an appropriate SSDT-PLUG SSDT and AGPM injector kext.

 

Does not work in combination with NullCPUPowerManagement.kext

 

From: D0 05 00 00 84 C0 74 46 E8
To: D0 05 00 00 84 C0 EB 46 E8
On: com.apple.driver.AppleIntelCPUPowerManagement

 

  • Like 7
  • Thanks 1
Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...

Hello IOIIIO, I removed NullCPUPowerManagement.kext and add this kext patch,

Name:  com.apple.driver.AppleIntelCPUPowerManagement
Find: D0050000 84C07446 E8
Replace: D0050000 84C0EB46 E8


I enabled HPET in biosand follow this guide https://github.com/khronokernel/Opencore-Vanilla-Desktop-Guide/blob/master/AMD/NullCPU-patch.md
But I had panic with problem :

"Anonymous UUID:       8D384879-C8F0-FBB3-006F-04F1F1B10076

Sun Jan 12 11:50:03 2020

*** Panic Report ***
panic(cpu 8 caller 0xffffff7f92eab5fc): Setting P-Limit is unsupported on this system
Backtrace (CPU 8), Frame : Return Address
0xffffff820849b7d0 : 0xffffff800f7b057d mach_kernel : _handle_debugger_trap + 0x47d
0xffffff820849b820 : 0xffffff800f8ec065 mach_kernel : _kdp_i386_trap + 0x155
0xffffff820849b860 : 0xffffff800f8dd79a mach_kernel : _kernel_trap + 0x50a
0xffffff820849b8d0 : 0xffffff800f75d9d0 mach_kernel : _return_from_trap + 0xe0
0xffffff820849b8f0 : 0xffffff800f7aff97 mach_kernel : _panic_trap_to_debugger + 0x197
0xffffff820849ba10 : 0xffffff800f7afde3 mach_kernel : _panic + 0x63
0xffffff820849ba80 : 0xffffff7f92eab5fc com.apple.driver.AppleIntelCPUPowerManagement : _i386_SetPStateLimit + 0x8f
0xffffff820849bab0 : 0xffffff7f92eb2256 com.apple.driver.AppleIntelCPUPowerManagement : _Internal_pmControl + 0x1a90
0xffffff820849bb20 : 0xffffff7f92eb07ad com.apple.driver.AppleIntelCPUPowerManagement : _i386_pmCPUControl + 0x65
0xffffff820849bb50 : 0xffffff7f92373f9a com.apple.driver.X86PlatformShim : __ZN15X86PlatformShim27sendPStateStepperTableAICPMEP9IOService + 0x200
0xffffff820849bba0 : 0xffffff800fe5a0d8 mach_kernel : __ZN13IOCommandGate9runActionEPFiP8OSObjectPvS2_S2_S2_ES2_S2_S2_S2_ + 0x138
0xffffff820849bc10 : 0xffffff7f923739b7 com.apple.driver.X86PlatformShim : __ZN15X86PlatformShim16initializePMInfoEv + 0xed
0xffffff820849bd50 : 0xffffff7f92374172 com.apple.driver.X86PlatformShim : __ZN15X86PlatformShim17aicpmNotificationEPvP9IOServiceP10IONotifier + 0x56
0xffffff820849bd90 : 0xffffff800fe2bc6a mach_kernel : __ZN9IOService14invokeNotifierEP18_IOServiceNotifier + 0xea
0xffffff820849bde0 : 0xffffff800fe3767b mach_kernel : __ZN9IOService23addMatchingNotificationEPK8OSSymbolP12OSDictionaryPFbPvS5_PS_P10IONotifierES5_S5_i + 0x4b
0xffffff820849be10 : 0xffffff7f923733f5 com.apple.driver.X86PlatformShim : __ZN15X86PlatformShim5startEP9IOService + 0x3ad
0xffffff820849be40 : 0xffffff800fe2f88b mach_kernel : __ZN9IOService14startCandidateEPS_ + 0x6b
0xffffff820849be80 : 0xffffff800fe2f545 mach_kernel : __ZN9IOService15probeCandidatesEP12OSOrderedSet + 0x8a5
0xffffff820849bf00 : 0xffffff800fe2eb07 mach_kernel : __ZN9IOService14doServiceMatchEj + 0x2d7
0xffffff820849bf50 : 0xffffff800fe305f6 mach_kernel : __ZN15_IOConfigThread4mainEPvi + 0x1a6
0xffffff820849bfa0 : 0xffffff800f75d0ce mach_kernel : _call_continuation + 0x2e
      Kernel Extensions in backtrace:
         com.apple.driver.AppleIntelCPUPowerManagement(220.0)[08A60750-1932-37EB-B013-D44CF9C7AA88]@0xffffff7f92ea5000->0xffffff7f92ed5fff
         com.apple.driver.X86PlatformShim(1.0)[5C294A2E-A3AC-3A73-A0E7-5E276254C04E]@0xffffff7f92372000->0xffffff7f9237afff
            dependency: com.apple.driver.IOPlatformPluginFamily(6.0.0d8)[5D809C02-FC83-309B-850B-7F5F2CB135DA]@0xffffff7f92324000
            dependency: com.apple.driver.X86PlatformPlugin(1.0.0)[3FE47AC9-96B1-3C82-8CDB-8CC2DFBCB3CD]@0xffffff7f92359000
            dependency: com.apple.driver.AppleSMC(3.1.9)[67217328-603A-35BB-85CA-CA5B4C807ECB]@0xffffff7f906d3000

BSD process name corresponding to current thread: kernel_task
Boot args: shikigva=128 -v keepsyms=1 npci=0x2000 debug=0x100 alcid=1 

Mac OS version:
18G2022

Kernel version:
Darwin Kernel Version 18.7.0: Sun Dec  1 18:59:03 PST 2019; root:xnu-4903.278.19~1/RELEASE_X86_64
Kernel UUID: BC166F11-DD33-32AF-AF67-DE0B2C985AA8
Kernel slide:     0x000000000f400000
Kernel text base: 0xffffff800f600000
__HIB  text base: 0xffffff800f500000
System model name: iMacPro1,1 (Mac-7BA5B2D9E42DDD94)

System uptime in nanoseconds: 6741706956

EOF
Model: iMacPro1,1, BootROM 1037.40.124.0.0, 6 processors, Intel Core i5, 3.4 GHz, 16 GB, SMC 
Graphics: Radeon RX 580, Radeon RX 580, spdisplays_pcie_device, 8 GB
Memory Module: P0 CHANNEL A/DIMM 1, 8 GB, DDR4, 2666 MHz, Unknown, F4-2666C19-8GIS
Memory Module: P0 CHANNEL B/DIMM 1, 8 GB, DDR4, 2666 MHz, Unknown, F4-2666C19-8GIS
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x117), Broadcom BCM43xx 1.0 (7.77.61.3 AirPortDriverBrcmNIC-1305.9)
Bluetooth: Version 6.0.14d3, 3 services, 27 devices, 1 incoming serial ports
Network Service: Ethernet, Ethernet, en0
Network Service: Wi-Fi, AirPort, en1
Serial ATA Device: TOSHIBA MQ01ABD100, 1 TB
Serial ATA Device: GIGABYTE GP-GSTFS31120GNTD, 120.03 GB
USB Device: USB 3.0 Bus
USB Device: Gaming Keyboard
USB Device: Logicool G430 Gaming Headset
USB Device: G102 Prodigy Gaming Mouse
USB Device: USB 3.1 Bus
USB Device: DataTraveler 2.0
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: 

Can you help me? Thank you very much.

Link to comment
Share on other sites

3 hours ago, bondpham said:

Hello IOIIIO, I removed NullCPUPowerManagement.kext and add this kext patch,


Name:  com.apple.driver.AppleIntelCPUPowerManagement
Find: D0050000 84C07446 E8
Replace: D0050000 84C0EB46 E8


I enabled HPET in biosand follow this guide https://github.com/khronokernel/Opencore-Vanilla-Desktop-Guide/blob/master/AMD/NullCPU-patch.md
But I had panic with problem :


"Anonymous UUID:       8D384879-C8F0-FBB3-006F-04F1F1B10076

Sun Jan 12 11:50:03 2020

*** Panic Report ***
panic(cpu 8 caller 0xffffff7f92eab5fc): Setting P-Limit is unsupported on this system
Backtrace (CPU 8), Frame : Return Address
0xffffff820849b7d0 : 0xffffff800f7b057d mach_kernel : _handle_debugger_trap + 0x47d
0xffffff820849b820 : 0xffffff800f8ec065 mach_kernel : _kdp_i386_trap + 0x155
0xffffff820849b860 : 0xffffff800f8dd79a mach_kernel : _kernel_trap + 0x50a
0xffffff820849b8d0 : 0xffffff800f75d9d0 mach_kernel : _return_from_trap + 0xe0
0xffffff820849b8f0 : 0xffffff800f7aff97 mach_kernel : _panic_trap_to_debugger + 0x197
0xffffff820849ba10 : 0xffffff800f7afde3 mach_kernel : _panic + 0x63
0xffffff820849ba80 : 0xffffff7f92eab5fc com.apple.driver.AppleIntelCPUPowerManagement : _i386_SetPStateLimit + 0x8f
0xffffff820849bab0 : 0xffffff7f92eb2256 com.apple.driver.AppleIntelCPUPowerManagement : _Internal_pmControl + 0x1a90
0xffffff820849bb20 : 0xffffff7f92eb07ad com.apple.driver.AppleIntelCPUPowerManagement : _i386_pmCPUControl + 0x65
0xffffff820849bb50 : 0xffffff7f92373f9a com.apple.driver.X86PlatformShim : __ZN15X86PlatformShim27sendPStateStepperTableAICPMEP9IOService + 0x200
0xffffff820849bba0 : 0xffffff800fe5a0d8 mach_kernel : __ZN13IOCommandGate9runActionEPFiP8OSObjectPvS2_S2_S2_ES2_S2_S2_S2_ + 0x138
0xffffff820849bc10 : 0xffffff7f923739b7 com.apple.driver.X86PlatformShim : __ZN15X86PlatformShim16initializePMInfoEv + 0xed
0xffffff820849bd50 : 0xffffff7f92374172 com.apple.driver.X86PlatformShim : __ZN15X86PlatformShim17aicpmNotificationEPvP9IOServiceP10IONotifier + 0x56
0xffffff820849bd90 : 0xffffff800fe2bc6a mach_kernel : __ZN9IOService14invokeNotifierEP18_IOServiceNotifier + 0xea
0xffffff820849bde0 : 0xffffff800fe3767b mach_kernel : __ZN9IOService23addMatchingNotificationEPK8OSSymbolP12OSDictionaryPFbPvS5_PS_P10IONotifierES5_S5_i + 0x4b
0xffffff820849be10 : 0xffffff7f923733f5 com.apple.driver.X86PlatformShim : __ZN15X86PlatformShim5startEP9IOService + 0x3ad
0xffffff820849be40 : 0xffffff800fe2f88b mach_kernel : __ZN9IOService14startCandidateEPS_ + 0x6b
0xffffff820849be80 : 0xffffff800fe2f545 mach_kernel : __ZN9IOService15probeCandidatesEP12OSOrderedSet + 0x8a5
0xffffff820849bf00 : 0xffffff800fe2eb07 mach_kernel : __ZN9IOService14doServiceMatchEj + 0x2d7
0xffffff820849bf50 : 0xffffff800fe305f6 mach_kernel : __ZN15_IOConfigThread4mainEPvi + 0x1a6
0xffffff820849bfa0 : 0xffffff800f75d0ce mach_kernel : _call_continuation + 0x2e
      Kernel Extensions in backtrace:
         com.apple.driver.AppleIntelCPUPowerManagement(220.0)[08A60750-1932-37EB-B013-D44CF9C7AA88]@0xffffff7f92ea5000->0xffffff7f92ed5fff
         com.apple.driver.X86PlatformShim(1.0)[5C294A2E-A3AC-3A73-A0E7-5E276254C04E]@0xffffff7f92372000->0xffffff7f9237afff
            dependency: com.apple.driver.IOPlatformPluginFamily(6.0.0d8)[5D809C02-FC83-309B-850B-7F5F2CB135DA]@0xffffff7f92324000
            dependency: com.apple.driver.X86PlatformPlugin(1.0.0)[3FE47AC9-96B1-3C82-8CDB-8CC2DFBCB3CD]@0xffffff7f92359000
            dependency: com.apple.driver.AppleSMC(3.1.9)[67217328-603A-35BB-85CA-CA5B4C807ECB]@0xffffff7f906d3000

BSD process name corresponding to current thread: kernel_task
Boot args: shikigva=128 -v keepsyms=1 npci=0x2000 debug=0x100 alcid=1 

Mac OS version:
18G2022

Kernel version:
Darwin Kernel Version 18.7.0: Sun Dec  1 18:59:03 PST 2019; root:xnu-4903.278.19~1/RELEASE_X86_64
Kernel UUID: BC166F11-DD33-32AF-AF67-DE0B2C985AA8
Kernel slide:     0x000000000f400000
Kernel text base: 0xffffff800f600000
__HIB  text base: 0xffffff800f500000
System model name: iMacPro1,1 (Mac-7BA5B2D9E42DDD94)

System uptime in nanoseconds: 6741706956

EOF
Model: iMacPro1,1, BootROM 1037.40.124.0.0, 6 processors, Intel Core i5, 3.4 GHz, 16 GB, SMC 
Graphics: Radeon RX 580, Radeon RX 580, spdisplays_pcie_device, 8 GB
Memory Module: P0 CHANNEL A/DIMM 1, 8 GB, DDR4, 2666 MHz, Unknown, F4-2666C19-8GIS
Memory Module: P0 CHANNEL B/DIMM 1, 8 GB, DDR4, 2666 MHz, Unknown, F4-2666C19-8GIS
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x117), Broadcom BCM43xx 1.0 (7.77.61.3 AirPortDriverBrcmNIC-1305.9)
Bluetooth: Version 6.0.14d3, 3 services, 27 devices, 1 incoming serial ports
Network Service: Ethernet, Ethernet, en0
Network Service: Wi-Fi, AirPort, en1
Serial ATA Device: TOSHIBA MQ01ABD100, 1 TB
Serial ATA Device: GIGABYTE GP-GSTFS31120GNTD, 120.03 GB
USB Device: USB 3.0 Bus
USB Device: Gaming Keyboard
USB Device: Logicool G430 Gaming Headset
USB Device: G102 Prodigy Gaming Mouse
USB Device: USB 3.1 Bus
USB Device: DataTraveler 2.0
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: 

Can you help me? Thank you very much.

 

Disable Plugin Type

Link to comment
Share on other sites

  • 2 months later...
 Share

×
×
  • Create New...