racerrehabman

Just some techie stuff

Archive for October 2014

Yosemite/Haswell Kernel Patch for Early Reboot

with 46 comments

Just a quick update as I’m quite busy at the moment.

This is an update for Yosemite for an issue which was described for Mavericks in a previous post: https://racerrehabman.wordpress.com/2013/11/25/maverickshaswell-kernel-patch-for-early-reboot/

Since Yosemite has been released, we need a new patch for the OS X kernel to avoid early reboot on computers with locked CPU MSR 0xE2. The kernel has now moved to /System/Library/Kernels/kernel.

The code has changed slightly and now it is only necessary to change the data tables such that any table writing to register 0xE2 is changed to 0x00. I’ll explain more if I find time.

Here are the new patches required for 10.10.x:


perl -pi -e 's|\xe2\x00\x00\x00\x02\x00\x00\x00|\x00\x00\x00\x00\x00\x00\x00\x00|g' kernel
perl -pi -e 's|\xe2\x00\x00\x00\x4c\x00\x00\x00|\x00\x00\x00\x00\x00\x00\x00\x00|g' kernel
perl -pi -e 's|\xe2\x00\x00\x00\x90\x01\x00\x00|\x00\x00\x00\x00\x00\x00\x00\x00|g' kernel

Those using Clover do not need to patch the kernel manually as this same patch is provided with the KernelAndKextPatches/KernelPm option in config.plist.

Update 2015-01-26

As pointed out by Zenith432 (thanks!), the original published patch would write to MSR 0x0 after the 0xE2 values were zeroed. Although this did not appear to cause any problems and I already knew about it, it is probably a good idea to avoid it. The patches have been updated to account for this based on the information provided by Zenith432.

Advertisements

Written by racerrehabman

2014/10/18 at 17:38

Posted in Computers

Tagged with , , ,