Jump to content

Mavericks kernel testing on AMD (formerly Mountain Lion kernel testing on AMD)


theconnactic
 Share

6,414 posts in this topic

Recommended Posts

hi axmanA :)

 

don't know if this idea will help

 

we can compile vanilla code  of iopcifamily 

once with

kBaseMessagedInterruptVectors = 0x70,

and anther compile with

kBaseMessagedInterruptVectors = 0x90,

 

and after compiling  of this two kexts

take ipcifamily binary file 

and open them with hex edit and copy hex code of this binary to two separate text file

then compare them using file merge on Xcode 

this will show us diff when using 70 or 90 

then we use this diff trough fly patch on clover :)

 

hope this will work

can't test this as vanilla ipcifamily code doesn't compile  directly :/

 

Hi Mohamed,

 

I did as you suggested and the essence is this:

--- IOPCIFamily_0x70_hex	2014-07-14 07:08:41.000000000 +0000
+++ IOPCIFamily_0x90_hex	2014-07-14 07:08:53.000000000 +0000
@@ -1836,10 +1836,10 @@
 0074160      c789    8948    8045    a5e8    0254    4800    458b    4880
 0074200      4589    48a8    7d81    00a8    0000    0f00    3384    0000
-0074220      be00    008f    0000    70ba    0000    4800    7d8b    e8a8
+0074220      be00    006f    0000    90ba    0000    4800    7d8b    e8a8
 0074240      54ec    0002    01a8    850f    0018    0000    8b48    a845
 0074260      8948    48c1    008b    8948    ffcf    2850    c748    a845
 0074300      0000    0000    8148    a87d    0000    0000    840f    0048
-0074320      0000    0fbe    0000    ba00    0004    0000    8b48    a87d
-0074340      6be8    0267    be00    0060    0000    10ba    0000    2400
+0074320      0000    efbe    ffff    baff    0004    0000    8b48    a87d
+0074340      6be8    0267    be00    0040    0000    10ba    0000    2400
 0074360      8801    b745    8b48    a87d    53e8    0267    2400    0f01
 0074400      d0b6    458a    24b7    0f01    f0b6    d621    fe81    0000

but I cannot find these bytes in the original binary ;-|

May be you can use.

 

Regards

 

  • Like 1
Link to comment
Share on other sites

You didn't understand me, i've got the working kernels for 10.9.2 and above, but i don't have dmg files that work with myhack, it only says "Can't find system version on base.dmg" or something like that. And yeah, i checked for that file, it really is there.

See Here in the note.

Also I don't feel kernel testing on VMWare is of much help and if it at all requires a patched kernel and a bootloader to run OS X. 

  • Like 1
Link to comment
Share on other sites

I don't know if it's a problem of kernel or 10.9.4 update, but sometimes my hack is freezing. Not often, maybe 1 in 20 starts, just freeze everything, mouse, keyboard and I can only restart the computer. Any ideas? :)

P.S. And after 10.9.4 update sometimes the system won't boot (just KP), and on the next boot everything is normal and good :hysterical:

Edited by tragediana150
Link to comment
Share on other sites

Hi ! 

If problem freezing , maybe problem don't compatible driver USB or frequency voltage from USB . 

Thanks Bronya for your reply. But tell me how I suppose to fix it or change it? It is not a big problem for me, but if I knew what to do to fix it I would be do it :)

Link to comment
Share on other sites

Thanks Bronya for your reply. But tell me how I suppose to fix it or change it? It is not a big problem for me, but if I knew what to do to fix it I would be do it :)

Sorry , i dunno .  You try delete driver usb ))))))) , or disable all hardware from USB )

  • Like 1
Link to comment
Share on other sites

Hi Mohamed,

 

....

but I cannot find these bytes in the original binary ;-|

May be you can use.

 

Regards

Hi,

 

after realizing my stupidity I wrote a little perl for binpatching IOPCIFamily. It is used like this

./patchIOPCIFamily.pl IOPCIFamily

where IOPCIFamily is the binary in IOPCIFamily.kext. Result is a IOPCIFamily_modified that have to be renamed. Then set right permissions.

The modified Bytes are:

"\xBE\x8F\x00\x00\x00" => "\xBE\x6F\x00\x00\x00"
"\xBA\x70\x00\x00\x00" => "\xBA\x90\x00\x00\x00"

hope that helps

patchIOPCIFamily.zip

  • Like 2
Link to comment
Share on other sites

Hi,

 

after realizing my stupidity I wrote a little perl for binpatching IOPCIFamily. It is used like this

./patchIOPCIFamily.pl IOPCIFamily

where IOPCIFamily is the binary in IOPCIFamily.kext. Result is a IOPCIFamily_modified that have to be renamed. Then set right permissions.

The modified Bytes are:

"\xBE\x8F\x00\x00\x00" => "\xBE\x6F\x00\x00\x00"
"\xBA\x70\x00\x00\x00" => "\xBA\x90\x00\x00\x00"

hope that helps

wooow thanks axmanA

this bits also are in iopcifamaily of os x 10.10  :yes:

i will add this to my clover config file  :thumbsup_anim:

amazing work again 

thanks

Link to comment
Share on other sites

Hi,

 

after realizing my stupidity I wrote a little perl for binpatching IOPCIFamily. It is used like this

./patchIOPCIFamily.pl IOPCIFamily

where IOPCIFamily is the binary in IOPCIFamily.kext. Result is a IOPCIFamily_modified that have to be renamed. Then set right permissions.

The modified Bytes are:

"\xBE\x8F\x00\x00\x00" => "\xBE\x6F\x00\x00\x00"
"\xBA\x70\x00\x00\x00" => "\xBA\x90\x00\x00\x00"

hope that helps

tried to add it to clover

from

be8f0000 00ba7000

to 

be6f0000 00ba9000

 

but i got kernel panic from iopcifamaily kext . did you ?

Link to comment
Share on other sites

I am sorry for asking this but i really didn't know where to ask and decided to ask here as this was formerly mountain lion topic.

So, i can't find working kernel for my CPU (AMD Athlon II X2 245). I tried Bronyas kernel but it gives me panic after loading time machine. I tried using -x -f -v flags but it doesn't work. I also tried AnVs kernel which worked only for installation but doesn't work for OS.

Thanks in advance!

PS. I am using Chameleon 2.1

Link to comment
Share on other sites

Hmm... I really wonder did you actually replace the mach_kernel on the HDD after installation? Sounds like that to me. And hey, this topic is for discussing on how to improve the kernel, not for asking these newbies questions.

Link to comment
Share on other sites

Hi!

 

I'm preparing to install Mavericks 10.9.4 on an Asus M5A78M-L-USB3 / Phenom II x4 925 / Radeon HD5750 combo.

 

So far I got a more or less sorted out clover.plist with the proper DSDT patches, bronya's RC7 kernel reported to run 10.9.4 on a similar CPU, a 10.9.4-specific kext for my video card and the latest fixed IOPCIFamily.zip.

 

I would like to ask Andy, Bronya, Sinetek and the rest of the gurus a couple of stupid questions:

 

1. Several months ago Andy suggested merging his power management support into bronya's kernel and even submitted a diff patch; does this mean that bronya's RC7 kernel will hook up with the custom VoodooPStates.kext, System.kext and VoodooTSCSync.kext from this post: http://www.insanelymac.com/forum/topic/281450-mavericks-kernel-testing-on-amd-formerly-mountain-lion-kernel-testing-on-amd/?p=1965971

 

2. Do I ever need VoodooPStates.kext to get P-States working?

 

3. Will AppleIntelCPUPowerManagement.kext work for me? If so, should I retain both AICPM and VoodooPStates or pick either?

 

4. Will I be able to ditch NullCPU or whatever blocks AICPM? So far only one kernel ran for me without NullCPU on AMD but it had serious issues.

 

5. I have Asus Q-Fan, C1E State and AMD Cool'N'Quiet enabled in my test rig's BIOS. Booting to Linux, both CPU and chassis fans perfectly scale their RPMs according to current P-State / C-State / temperature / whatever. This is not the case with Mavericks and FakeSMC and HWSensors do not help much, but so far I only tried outdated (10.9.0-1.9.1) builds with somewhat lame kernels.

 

AMD Cool'N'Quiet has been reported to work years ago on 10.6.2 with an older version of VoodooPState.kext, and Asus Q-Fan reportedly scales with the CPU's current P-State without any need for OS-side apps or drivers at all (provided that the CPU state tables in ACPI namespace are properly generated and the kernel is aware of them)

 

Which option (VoodooPState vs. AICPM) should I pick to get at least some form of CPU fan scaling in Mavericks? I'm not asking for the same I'm getting on Linux, but CPU fan running at full speed is driving me crazy.

 

Clover devs suggested that certain Macs like MacPro mostly rely on P-States for power management while iMacs use C-states, and Hackintoshes behave depending on their SMBios model ID. Suggestions were made like totally disabling either P- or C- state generation in Clover to see if that helps get native power management working as supposed. But all this was said regarding Intel CPUs... I'm totally confused. I spent hours on the web but was never able to find any technical explanations regarding AMD Cool'n'Quiet and Asus Q-Fan, I can't even say for sure which value either is supposed to scale according to!

 

Am I right to suggest that Cool'N'Quiet is what actually throttles down the CPU and Q-Fan is what should scale the fans' RPM accordingly whenever a CPU throttle-up or throttle-down is detected? And C1E is simply another (and not universally supported) CPU C-State just to save a tad more power should the OS kernel know how to properly handle it?


tried to add it to clover

from

be8f0000 00ba7000

to 

be6f0000 00ba9000

 

but i got kernel panic from iopcifamaily kext . did you ?

 

I second that question!  :) But could it be "from be8f0000 to be6f0000" then "00ba7000 to 00ba9000" like two consequent patches, and not a single one? If I correctly understand there are two unrelated blocks of bytes to patch, either should be looked up and replaced individually. I also saw guys mostly use BASE64 when specifying kext patch binary data in Clover.plist, are you sure your current Clover build won't misinterpret plain hex? Clover is notorious for often getting tiny undocumented changes with huge consequences. The most current Clover manual from Slice is somewhere around 2706, and the current Clover itself is 2770-something.

 

Just for giggles, try two separate patches for IOPCIFamily noted as below:

 

replace vo8AAAA= with vm8AAAA=

replace unAAAAA= with upAAAAA=
  • Like 1
Link to comment
Share on other sites

tried to add it to clover

from

be8f0000 00ba7000

to 

be6f0000 00ba9000

 

but i got kernel panic from iopcifamaily kext . did you ?

 

Hi Mohamed,

 

i do not use clover and will test with resulting kext from the perl script.

 

regards

  • Like 1
Link to comment
Share on other sites

this bits are beside each other so patching it on one command no problem on it

also when got this panic i patched the binary directly using hexedit but the same panic

Hi Mohamed,

 

you are right. My rig didn't boot either. The panic is resolved by patching additional bytes.

Known before:

"\xBE\x8F\x00\x00\x00" => "\xBE\x6F\x00\x00\x00"
"\xBA\x70\x00\x00\x00" => "\xBA\x90\x00\x00\x00"

additional bytes:

"\xBE\x60\x00\x00\x00\xBA\x10\x00\x00\x00" => "\xBE\x40\x00\x00\x00\xBA\x10\x00\x00\x00"

With this change my rig boots up fine.

This time there is a gap between the offsets. So boot time patching with clover becomes more difficult.

 

The whole sequence in original is (IOPCIFamily of 10.9.4):

be 6f 00 00 00          mov    $0x6f,%esi
ba 90 00 00 00          mov    $0x90,%edx
e8 23 36 01 00          callq  17bc2 <__ZN32IOPCIMessagedInterruptController4initEjj>
84 c0                   test   %al,%al
74 65                   je     4608 <__ZN11IOPCIBridge8configOpEP9IOServicemPvS2_+0x256>
48 89 df                mov    %rbx,%rdi
be 0f 00 00 00          mov    $0xf,%esi
ba 04 00 00 00          mov    $0x4,%edx
e8 bf 3e 01 00          callq  18474 <__ZN32IOPCIMessagedInterruptController14reserveVectorsEjj>
41 88 c6                mov    %al,%r14b
48 89 df                mov    %rbx,%rdi
be 60 00 00 00          mov    $0x60,%esi
ba 10 00 00 00          mov    $0x10,%edx
  • Like 1
Link to comment
Share on other sites

 

Hi Mohamed,

 

you are right. My rig didn't boot either. The panic is resolved by patching additional bytes.

Known before:

"\xBE\x8F\x00\x00\x00" => "\xBE\x6F\x00\x00\x00"
"\xBA\x70\x00\x00\x00" => "\xBA\x90\x00\x00\x00"

additional bytes:

"\xBE\x60\x00\x00\x00\xBA\x10\x00\x00\x00" => "\xBE\x40\x00\x00\x00\xBA\x10\x00\x00\x00"

With this change my rig boots up fine.

This time there is a gap between the offsets. So boot time patching with clover becomes more difficult.

 

The whole sequence in original is (IOPCIFamily of 10.9.4):

be 6f 00 00 00          mov    $0x6f,%esi
ba 90 00 00 00          mov    $0x90,%edx
e8 23 36 01 00          callq  17bc2 <__ZN32IOPCIMessagedInterruptController4initEjj>
84 c0                   test   %al,%al
74 65                   je     4608 <__ZN11IOPCIBridge8configOpEP9IOServicemPvS2_+0x256>
48 89 df                mov    %rbx,%rdi
be 0f 00 00 00          mov    $0xf,%esi
ba 04 00 00 00          mov    $0x4,%edx
e8 bf 3e 01 00          callq  18474 <__ZN32IOPCIMessagedInterruptController14reserveVectorsEjj>
41 88 c6                mov    %al,%r14b
48 89 df                mov    %rbx,%rdi
be 60 00 00 00          mov    $0x60,%esi
ba 10 00 00 00          mov    $0x10,%edx

:thumbsup_anim:    :wub:

thanks  :)

yesterday tried to search on it for the 60 bit to be converted to 40 but failed to reach to it 

Link to comment
Share on other sites

this is the clover patch now to works as it should to be

<key>KextsToPatch</key>
		<array>
			<dict>
				<key>Comment</key>
				<string>First area</string>
				<key>Name</key>
				<string>IOPCIFamily</string>
				<key>Find</key>
				<data>vo8AAAC6cAA=</data>
				<key>Replace</key>
				<data>vm8AAAC6kAA=</data>
			</dict>
			<dict>
				<key>Comment</key>
				<string>Second area</string>
				<key>Name</key>
				<string>IOPCIFamily</string>
				<key>Find</key>
				<data>vmAAAAC6EAA=</data>
				<key>Replace</key>
				<data>vkAAAAC6EAA=</data>
			</dict>
		</array>

congratulations  :D

  • Like 1
Link to comment
Share on other sites

Hmm... I really wonder did you actually replace the mach_kernel on the HDD after installation? Sounds like that to me. And hey, this topic is for discussing on how to improve the kernel, not for asking these newbies questions.

Why don't you point me to the topic where i can ask these questions? Also i did replace mach_kernel on HDD multiple times trying out various kernels i found and it still doesn't work, but nevermind, i will sort it out somehow.

Link to comment
Share on other sites

Why don't you point me to the topic where i can ask these questions? Also i did replace mach_kernel on HDD multiple times trying out various kernels i found and it still doesn't work, but nevermind, i will sort it out somehow.

Ask here http://www.insanelymac.com/forum/forum/405-amd/ or here http://www.insanelymac.com/forum/forum/411-amd/

Sounds like you don't read the whole instructions "how to install osx on pc", so use some tutorial on the web (there is a lot of these stuff) and try to copy everything you see on the screen to your installation method. There is working kernel for ML on AMD and it's working great. You need to try a lot of flags, not only -f -v -s -x, maybe npci=0x2000, npci=0x3000, PCIRootUID=1, maybe GraphicsEnalber=Yes/No.

Good Luck :)

  • Like 1
Link to comment
Share on other sites

Ask here http://www.insanelymac.com/forum/forum/405-amd/ or here http://www.insanelymac.com/forum/forum/411-amd/

Sounds like you don't read the whole instructions "how to install osx on pc", so use some tutorial on the web (there is a lot of these stuff) and try to copy everything you see on the screen to your installation method. There is working kernel for ML on AMD and it's working great. You need to try a lot of flags, not only -f -v -s -x, maybe npci=0x2000, npci=0x3000, PCIRootUID=1, maybe GraphicsEbalber=Yes/No.

Good Luck :)

Thank you very much! :) I didn't try out npci settings only and i will try it out, sorry everyone for going off topic.  :worried_anim:

Link to comment
Share on other sites

Wow!

I patched original kernel for 10.8.5 for AMD FX !

And test iCloud and etc - working !

But don't work iMessage . Then i copy file FileNVRAM.dylib in folder /Extra/modules on active partition hdd . And reboot , then check iMessage - yes working !

=)))

 

I do not give out it is kernel , because it is test kernel .

  • Like 13
Link to comment
Share on other sites

Броня, Apple придется предложить вам! ЕЕМ Иов  :)

 

Bronya, Apple should offer you a job !

Link to comment
Share on other sites

 Share

×
×
  • Create New...