Jump to content

Haswell-E mach_kernel patch (5960X, 5830K and 5820K)


stinga11
 Share

35 posts in this topic

Recommended Posts

At this moment it is possible compile a XNU kernel with the necessary change for a Haswell-E works, it is easy all you need is to add CPUID_MODEL_HASWELL_SVR in cpuid.c. But the problem is, the open source XNU kernel doesn't have the same code that the vanilla kernel. They share most of the code but another part is replaced by open source code and other parts simply not are available such as XCPM. It seems that the code that performs the work of the iMessage and other things neither it is available. For this reason is better to use the vanilla kernel but the problem is that it does not yet support the Haswell-E and for that we need patch.

 

Here is a quick and dirty patch for the mach_kernel to let it run Haswell code on Haswell-E

 

1.

Patch the vanilla kernel using a Haswell code:

sudo perl -pi -e 's|\x74\x11\x83\xF8\x3C|\x74\x11\x83\xF8\x3F|g' /mach_kernel

This work would not have been possible without the patch of PikerAlpha for 10.8.4, I just used otool to find the new Haswell-E patch for 10.9.4

 

2.

If to boot you need to use the kernel flag (cpus=1) is necessary to use the VoodooTSCSync.kext, that you put in /System/Library/Extensions/ (Download VoodooTSCSync.kext)

Open the info.plist of the VoodooTSCSync.kext and edit the IOCPUNumber.

 

If you have a 5830K or 5820K(six core) use the number 11

			<key>IOPropertyMatch</key>
			<dict>
				<key>IOCPUNumber</key>
				<integer>11</integer>
			</dict>

If you have a 5960X (eight core) use the number 15

			<key>IOPropertyMatch</key>
			<dict>
				<key>IOCPUNumber</key>
				<integer>15</integer>
			</dict>

3.

Add npci=0x2000 -v -f to kernel flags.

 

4.

If you use the installer of 10.9.3, 10.9.4 or 10.9.5. You need use nv_disable=1

 

 

Speedstep

For Haswell it is impossible getting speedstep. The information necessary to work not exist on the XCPM because this information will not be available until receive official support from apple.
 
Solution:
 
You can use (NullCPUPowerManagement.kext) for get a little speedstep using state C1E. It can vary from two states to three states. The problem with this solution is that it can not use the turbo boost.

 

 

Sata (GenericAHCI):

I made a AHCI injector for X99 motherboard. To change the IOClass AppleAHCI into the IOClass AppleIntelPchSeriesAHCI(On the system profiler appears as X99 instead GenericAHCI)

 

AHCIPortInjector.kext.zip

 

 

Audio:

I suggested the idea to patch the audio to work with X99 boards on toleda's Mavericks Realtek ALC AppleHDA thread.

 

I post a patch with the x99 & series 9 chipset in the official voodoohda thread, Slice merged the patch with the voodoohda source.

voodoohda 2.8.7 thanks to Slice.

  • Like 5
Link to comment
Share on other sites

The boot process went much farther with the first patch with with npci=0x2000 PciRoot=1 cpus=1 flags.The second patch(on a fresh kernel) hung almost immediately. Booting with the first patch made it to the second “PCI configuration begin” message,then disk activity continued for a while and the video out shut down. I used cpus=1 when booting because I’m not sure how to install the Voodoo sync kext into the installer USB drive. My graphics card is a GTX-770, if thats any help.

Link to comment
Share on other sites

AppleACPIPS2Nub.kext  ApplePS2Controller.kext  FakeSMC.kext  lspcidrv.kext  NullCPUPowerManagement.kext  Patched_10.7_AppleRTC.kext  in the Extras folder

 

How would I install the VoodooTSCSync.kext onto my USB installer, every kext utility I know of will only install onto my boot drive ?

 

Thanks

Link to comment
Share on other sites

AppleACPIPS2Nub.kext  ApplePS2Controller.kext  FakeSMC.kext  lspcidrv.kext  NullCPUPowerManagement.kext  Patched_10.7_AppleRTC.kext  in the Extras folder

 

How would I install the VoodooTSCSync.kext onto my USB installer, every kext utility I know of will only install onto my boot drive ?

 

Thanks

Are you using a PS2 mouse and keyboard? If not, get rid of those for now. Also I would get rid of the 10.7 applertc. Also, check inside FakeSMC.kext and see if there's a plugins folder. if there is, delete the plugins for now as they aren't compatible with Haswell-E yet anyway.

 

For installing VoodooTSCSync, As long as you are using UseKernelCache=No, you should just be able to put it in Extra/Extensions. You only need kext utility if you want to install it in /System/Library/Extensions.

 

If you really do want to put it in /S/L/E on your USB drive, that folder is hidden, so just copy the kext through the terminal:

 

First log in as root:

sudo su

copy the kext:

cp -r VoodooTSCSync.kext /Volumes/NameOfYourUSBDrive/System/Library/Extensions/

then you have to set permissions and ownership:

chmod -R 755 /Volumes/NameOfYourUSBDrive/System/Library/Extensions/VoodooTSCSync.kext
chown -R root:wheel /Volumes/NameOfYourUSBDrive/System/Library/Extensions/VoodooTSCSync.kext

lastly, update the caches:

sudo kextcache -system-prelinked-kernel
sudo kextcache -system-caches

Unless a kext refuses to work from /Extra/Extensions (some will not, but I don't think VoodooTSC is one of them), obviously that's the easier way to do it.

 

If you still can't get into the installer, i would try removing all the nvidia kexts from /System/Library/Extensions on the USB drive. Remember to back them up first as you will need to install them again later.

Link to comment
Share on other sites

@mickg

 

I never use the MyHack installer, I create my installer manually using the disk utility and the terminal. I do not know what things added the MyHack installer. My recommendation is that use the minimal of things possible. for the installer I'll give a recommendation about the kext, you use only fakesmc.kext and VoodooTSCSync.kext You do not need anything else for the installer. You try to not use a ps2 keyboard or mouse for to avoid using kext for these.

 

About kernel flags, For you do not have a repair of permission you can boot with (-f) for your board it is possible that you need use (npci=0x2000) and for last If you use a 10.9.4 installer you need use (nv_disable=1). If you follow my recommendations I do not think that you have a problem.

 

Good luck

Link to comment
Share on other sites

Anyone have any recommendations for booting with clover 2890?  What are the minimum UEFI drivers I need to have installed?

 

Hitting an error with OSxAptioFixDrv.  If I remove that file from the 64-bit UEFI folder, then I see a few more lines at startup, but another error about unable to initialize.

 

The boot never really gets started with an ASUS X99 Deluxe.

 

 

It looks like a USB stick with Chameleon on it will work, but wanted Clover! ;)

Link to comment
Share on other sites

Anyone have any recommendations for booting with clover 2890? What are the minimum UEFI drivers I need to have installed?

 

Hitting an error with OSxAptioFixDrv. If I remove that file from the 64-bit UEFI folder, then I see a few more lines at startup, but another error about unable to initialize.

 

The boot never really gets started with an ASUS X99 Deluxe.

 

 

It looks like a USB stick with Chameleon on it will work, but wanted Clover! ;)

Did you try lowmemfix instead? And make sure those 2 aren't installed at once. If that still doesn't work I would try legacy clover.

Link to comment
Share on other sites

Did you try lowmemfix instead? And make sure those 2 aren't installed at once. If that still doesn't work I would try legacy clover.

 

Yep, tried lowmemfix instead (after removing aptiofix).

 

I can try legacy clover, but my X99 board will not boot a legacy hard drive--only a legacy USB stick.  I can already boot legacy with Chameleon USB no problems, but would like to move it all onto the disk.

Link to comment
Share on other sites

Yep, tried lowmemfix instead (after removing aptiofix).

 

I can try legacy clover, but my X99 board will not boot a legacy hard drive--only a legacy USB stick.  I can already boot legacy with Chameleon USB no problems, but would like to move it all onto the disk.

I see... Is that by design, meaning it doesn't have the ability to boot a legacy drive? Also I think Clover still creates a debug.log (if you have it enabled) or a preboot.log even when it won't start up. I would see if you can get one of those logs and report it as a bug.

Link to comment
Share on other sites

I see... Is that by design, meaning it doesn't have the ability to boot a legacy drive? Also I think Clover still creates a debug.log (if you have it enabled) or a preboot.log even when it won't start up. I would see if you can get one of those logs and report it as a bug.

 

Thanks for the preboot.log info.  That sounds like my best bet.

Link to comment
Share on other sites

Thanks for the preboot.log info.  That sounds like my best bet.

it might be the debug.log. I know it's one of the two.

 

EDIT:

 

 

Log

<key>Log</key>

<false/>

If you are unable to boot into the Clover you can use this setting to produces a debug output to /EFI/CLOVER/misc/debug.log. This log then can be assessed to find out what the problem is. !WARNING turning on this log will dramatically increase loading time as it has to write the log to the disk as it goes. So please be patient and give plenty of time before reseting your computer.

Link to comment
Share on other sites

Anyone have any recommendations for booting with clover 2890?  What are the minimum UEFI drivers I need to have installed?

 

Hitting an error with OSxAptioFixDrv.  If I remove that file from the 64-bit UEFI folder, then I see a few more lines at startup, but another error about unable to initialize.

 

The boot never really gets started with an ASUS X99 Deluxe.

 

 

It looks like a USB stick with Chameleon on it will work, but wanted Clover! ;)

Ok I insatalled a clover with the following UEFI driver:

post-408886-0-53555100-1410919801.png

 

It is very important that you use the boot arg (slide=0) if you use the APTIOFIX

Link to comment
Share on other sites

Don't update to 10.9.5 just yet, the kernel patch will need to be changed.

I just updated my system and the first thing I did was check the patch with hexfiend and is the same patch.

Link to comment
Share on other sites

I wouldn't be surprised if there's a specific blacklisting somewhere of the haswell-e CPU id. Apple did something similar once we figured out the 2011 mbp could use the newer WiFi cards by simply hacking the board id check in the kext. I still haven't figured out what exactly they did that was different.

 

Edit: never mind, that wouldn't make any sense because the kernel was built before haswell-e was released.

Link to comment
Share on other sites

I wouldn't be surprised if there's a specific blacklisting somewhere of the haswell-e CPU id. Apple did something similar once we figured out the 2011 mbp could use the newer WiFi cards by simply hacking the board id check in the kext. I still haven't figured out what exactly they did that was different.

Edit: never mind, that wouldn't make any sense because the kernel was built befIore haswell-e was released.

I would like help a little more but I do not have a haswell-e processor for me everything's looking good maybe someonex86 should try again because it is possible his kernel don't patch at the first try.
Link to comment
Share on other sites

I feel like you-know-who did something wrong with the patch... If the kernel is trying to run Ivy Bridge and Haswell code at the same time I'm honestly surprised it doesn't kernel panic.

 

maleorderbride did you ever get your computer to boot with Clover?

Link to comment
Share on other sites

I feel like you-know-who did something wrong with the patch... If the kernel is trying to run Ivy Bridge and Haswell code at the same time I'm honestly surprised it doesn't kernel panic.

 

maleorderbride did you ever get your computer to boot with Clover?

 

Nope, no luck with Clover.  Still booting from a USB stick with chameleon.

Link to comment
Share on other sites

 Share

×
×
  • Create New...