Kernel Patch for Haswell CPU(Kernel XCPM)
Since version 10.8.5 a new kernel was implemented on OSX, he called XNU kernel
(XNU
CPU
Power
Management
(xcpm)).
This kernel has the power management moved down into it, in past we used AppleIntelCPUPowermanagement kext to control power management and some Bios were lockeds, in others words, were not allowed to write information on it, so the patch was created for kext AICPUPM to solve this problem (see above how to patch the kext AICPUPM).
But with the power management moved down into the kernel
(XNU kernel) AICPUPM the kext isn't loaded and so the same mistake that we were having in the past with AICPUPM kext
(Kernel Panic)are having now with the XNU kernel in some models CPU haswell(mainly in portable models, some Desktop models doesn't need patch)
To solve this problem it is necessary
to patch the kernel.
For
10.10 you need Open the terminal and type:
cd /Volumes/Name of your HDD/System/Library/Kernels/ Note that
in 10.10 kernel directory was changed. Copy this perl code
is for 10.10 version, put line by line
sudo perl -pi -e 's|\xe2\x00\x00\x00\x02\x00\x00\x00|\x00\x00\x00\x00\x02\x00\x00\x00|g' kernel
sudo perl -pi -e 's|\xe2\x00\x00\x00\x4c\x00\x00\x00|\x00\x00\x00\x00\x4c\x00\x00\x00|g' kernel
sudo perl -pi -e 's|\xe2\x00\x00\x00\x90\x01\x00\x00|\x00\x00\x00\x00\x90\x01\x00\x00|g' kernel For
10.9.x and
10.8.5 you need run this command in terminal:
cd /Volumes/Name of your HDD/ Now copy this perl code
if you use version 10.9.x
sudo perl -pi -e 's|\x74\x6c(\x48\x83\xc7\x28\x90\x8b\x05..\x5e\x00\x85\x47\xdc)\x74\x54(\x8b\x4f\xd8\x45\x85\xc0\x74\x08\x44\x39\xc1\x44\x89\xc1)\x75\x44(\x0f\x32\x89\xc0\x48\xc1\xe2\x20\x48\x09\xc2\x48\x89\x57\xf8\x48\x8b\x47\xe8\x48\x85\xc0\x74\x06\x48\xf7\xd0\x48\x21\xc2\x48\x0b\x57\xf0\x49\x89\xd1\x49\xc1\xe9\x20\x89\xd0\x8b\x4f\xd8\x4c\x89\xca)(\x0f\x30\x8b\x4f\xd8\x0f\x32\x89\xc0\x48\xc1\xe2\x20\x48\x09\xc2\x48\x89\x17\x48\x83\xc7\x30\xff\xce)\x75\x99(\x5d\xc3)\x90{7}|\x74\x73${1}\x74\x5b${2}\x75\x4b${3}\x66\x81\xf9\xe2\x00\x74\x02${4}\x75\x92${5}|g' mach_kernel or that other perl code
if you use version 10.8.5
sudo perl -pi -e 's|\x74\x69(\x48\x83\xc7\x28\x90\x8b\x05\xfe\xce\x5f\x00\x85\x47\xdc)\x74\x51(\x8b\x4f\xd8\x45\x85\xc0\x74\x05\x44\x39\xc1)\x75\x44(\x0f\x32\x89\xc0\x48\xc1\xe2\x20\x48\x09\xc2\x48\x89\x57\xf8\x48\x8b\x47\xe8\x48\x85\xc0\x74\x06\x48\xf7\xd0\x48\x21\xc2\x48\x0b\x57\xf0\x49\x89\xd1\x49\xc1\xe9\x20\x89\xd0\x8b\x4f\xd8\x4c\x89\xca)(\x0f\x30\x8b\x4f\xd8\x0f\x32\x89\xc0\x48\xc1\xe2\x20\x48\x09\xc2\x48\x89\x17\x48\x83\xc7\x30\xff\xce)\x75\x9c(\x5d\xc3)\x90{7}(\x90{3})|\x74\x70${1}\x74\x58${2}\x75\x4b${3}\x66\x81\xf9\xe2\x00\x74\x02${4}\x75\x95${5}${6}|g' mach_kernel Finally update the cache
sudo touch /System/Library/Extensions Ready! XCPM patched kernel and is working perfectly on your CPU haswell
Note1: XCPM only works in Ivy Bridge and Haswell CPUs, and the CPUs Ivy Bridger use by default the power management given by AICPUPM kext, to use the power management provided by the kernel XCPM you must enable this flag
(Chameleon)/argument
(Clover):
-xcpm
Haswell CPUs use XCPM management by default and doesn't change.
The management XCPM not support CPUs Sandy Bridger, so who uses SB can stay quiet about it.
Note2: Even Patching the kernel XCPM, you will need to patch the kext AICPUPM if your BIOS is locked for writing.
Note3: If you have no problem with KP, it isn't necessary to patch the kernel, but in some cases,
helped to patch the kernel to add some energy states.
Note4: Clover bootloader already has this patched built-in, you just need edit config.plist to enableir it
<key>KernelAndKextPatches</key>
<dict>
<key>KernelPm</key>
<true/>
</dict> So,
if you enable it in Clover isn't necessary patch kernel, because Clover will make this for you