Panamamax Posted October 13, 2016 Share Posted October 13, 2016 Good day everybody... After using more or less successfully one E5-2698V4 20 Core Cpu (Engineering sample QHUZ 2,3ghz all core max.) with a Supermicro X10SRA-F motherboard i went nuts and decided to try a 2x CPU configuration using 2 of the QHUZ CPU´s running in a Asus Z10PE D8 WS motherboard. I have found some successful user builds with Xeon V4´s on that particular Motherboard... However it has been reported there that the current max. Core value for OSX 10.12 is 64 cores... https://pikeralpha.wordpress.com/2016/07/26/xcpm-for-unsupported-processor/ You are looking for the “3f” there i.e. 63 decimal. You take three lines of hex byte code and convert it like in my example. The one you showed here with “48 83 f9 3f” would be the second line. Don’t forget to remove the spaces. (PikeRAlpha) im not totally clear what the above mentioned and where i should have to make what changes in order to have a 80 core system running... I will receive my Hardware next week and maybe until then you could help me out to make things a little more clear Thank you for your assistance and help ...Max Link to comment Share on other sites More sharing options...
klahjn Posted October 17, 2016 Share Posted October 17, 2016 1.) otool -tVj /S*/L*/Kernels/kernel > kernel-disassembled.txt2.) open kernel-disassembled.txt3.) Search for: “_ml_init_max_cpus:”4.) Look for: “cmp rcx, 0x3f” Tip: You can convert the hex byte code with help of:echo -n '488d4fff4883f93f7712'|xxd -r -p|base64 5.) Replace the 3f with anything that you want. Link to comment Share on other sites More sharing options...
Panamamax Posted October 26, 2016 Author Share Posted October 26, 2016 Good day & thank you for your instructions... all of the blow i did on my original mac book pro for testing purpose... not yet on my hackintosh... i have installier xtools and runned otool -tVj /S*/L*/Kernels/kernel in terminal. i exported the txt file to the desktop and renamed it kernel-disassembled.txt. i have looked for _ml_init_max_cpus: and found this: _ml_init_max_cpus: ffffff80003c89f0 55 pushq %rbp ffffff80003c89f1 48 89 e5 movq %rsp, %rbp ffffff80003c89f4 53 pushq %rbx ffffff80003c89f5 50 pushq %rax ffffff80003c89f6 9c pushfq ffffff80003c89f7 5b popq %rbx ffffff80003c89f8 48 81 e3 00 02 00 00 andq $0x200, %rbx ffffff80003c89ff 74 01 je 0xffffff80003c8a02 ffffff80003c8a01 fa cli ffffff80003c8a02 8b 05 b8 d8 6f 00 movl 0x6fd8b8(%rip), %eax ffffff80003c8a08 83 f8 01 cmpl $0x1, %eax ffffff80003c8a0b 74 3b je 0xffffff80003c8a48 ffffff80003c8a0d 48 8d 4f ff leaq -0x1(%rdi), %rcx ffffff80003c8a11 48 83 f9 3f cmpq $0x3f, %rcx ffffff80003c8a15 77 12 ja 0xffffff80003c8a29 ffffff80003c8a17 8b 0d d7 46 66 00 movl _max_ncpus(%rip), %ecx ffffff80003c8a1d 48 39 f9 cmpq %rdi, %rcx ffffff80003c8a20 0f 46 f9 cmovbel %ecx, %edi ffffff80003c8a23 89 3d 07 81 71 00 movl %edi, 0x718107(%rip) ffffff80003c8a29 83 f8 02 cmpl $0x2, %eax ffffff80003c8a2c 75 10 jne 0xffffff80003c8a3e ffffff80003c8a2e 48 8d 3d 8b d8 6f 00 leaq 0x6fd88b(%rip), %rdi ffffff80003c8a35 31 f6 xorl %esi, %esi ffffff80003c8a37 31 d2 xorl %edx, %edx ffffff80003c8a39 e8 92 72 f2 ff callq _thread_wakeup_prim ffffff80003c8a3e c7 05 78 d8 6f 00 01 00 00 00 movl $0x1, 0x6fd878(%rip) ffffff80003c8a48 9c pushfq ffffff80003c8a49 58 popq %rax ffffff80003c8a4a 48 85 db testq %rbx, %rbx ffffff80003c8a4d 75 08 jne 0xffffff80003c8a57 ffffff80003c8a4f f6 c4 02 testb $0x2, %ah ffffff80003c8a52 74 21 je 0xffffff80003c8a75 ffffff80003c8a54 fa cli ffffff80003c8a55 eb 1e jmp 0xffffff80003c8a75 ffffff80003c8a57 fb sti ffffff80003c8a58 90 nop ffffff80003c8a59 65 83 3c 25 18 00 00 00 00 cmpl $0x0, %gs:0x18 ffffff80003c8a62 75 11 jne 0xffffff80003c8a75 ffffff80003c8a64 65 48 8b 04 25 00 00 00 00 movq %gs:0x0, %rax ffffff80003c8a6d f6 40 58 04 testb $0x4, 0x58(%rax) ffffff80003c8a71 74 02 je 0xffffff80003c8a75 ffffff80003c8a73 cd ff int $0xff ffffff80003c8a75 48 83 c4 08 addq $0x8, %rsp ffffff80003c8a79 5b popq %rbx ffffff80003c8a7a 5d popq %rbp ffffff80003c8a7b c3 retq ffffff80003c8a7c 0f 1f 40 00 nopl (%rax) The only line i have found with 0x3f was this: ffffff80003c8a11 48 83 f9 3f cmpq $0x3f, %rcx according to the comments on the blog of piker alpha "Pike, Thank you very much, after playing with different values for the cores 8f did the trick." the 3f needs to be replaced by 8f.... Now if i replace the 3f by 8f.. how do i come from the kernel-disassembled.txt to the updated kernel that i need to replace? Thank you for your assistance! ...Max Link to comment Share on other sites More sharing options...
SammlerG Posted October 26, 2016 Share Posted October 26, 2016 You must patch your kernel, placed in S/L/Kernel with a Hex-Editor, or better use Clover -> KernelToPatch with the HEX strings. EDID: Test Find 4fff4883f93f7712 Replace 4fff4885393f7712 Link to comment Share on other sites More sharing options...
Panamamax Posted October 26, 2016 Author Share Posted October 26, 2016 Danke Sammler! Just to be clear... this is all i have to do as in the screenshot attached? Grüße! Max Link to comment Share on other sites More sharing options...
Panamamax Posted October 26, 2016 Author Share Posted October 26, 2016 thanks fabio for your comments... i agree... my question was if by applying this patch as in the screenshot the cpu count problem is solved? Link to comment Share on other sites More sharing options...
Panamamax Posted October 28, 2016 Author Share Posted October 28, 2016 Good day Fabio, i found the 8f information as a comment from balamut on the site of pike... didn't further ask why 8f or whatever, just copied the info from over there... Balamut Pike,Thank you very much, after playing with different values for the cores 8f did the trick. Now back to the drawing board on the new kernel panic Link to comment Share on other sites More sharing options...
Balamut Posted October 28, 2016 Share Posted October 28, 2016 Because for some odd reason sierra thinks I have 141 cores when it reads dsdt, ssdt and apic from my motherboard. Fixing dsdt and ssdt have 0 effect, thats why I end up pushing the limit that high. The problem is that after the patch something somewhere gets broken. It's ether more patches needed to be applied to the kernel to make system bypass the core limit or something in the appleacpi or osplatform is hard coded. I personally don't understand why would they limit the cores in the system. Link to comment Share on other sites More sharing options...
Balamut Posted October 28, 2016 Share Posted October 28, 2016 today I did a try to put a different value on my setup (single cpu) a value less than 44.. Kp at boot apple acpi related... Similar to this?( 8f ) Or this? ( 3f ) Link to comment Share on other sites More sharing options...
Balamut Posted October 28, 2016 Share Posted October 28, 2016 Ok means something in the system freaks out when it doesn't see 64 cores. That's why I hate hard coded values. Can you guys do me a favor( I'm out of town right now) And see how many 48 83 f9 3f records are in the kernel? Maybe patch overrides things it shouldn't. Link to comment Share on other sites More sharing options...
Panamamax Posted October 29, 2016 Author Share Posted October 29, 2016 Good day Together... gave it a try yesterday and this is how far i got... https://www.dropbox.com/s/t21jd6ytxhj0uaq/2016-10-28 22.24.48.mov?dl=0 looks like we are all pretty much stuck in the same place? Link to comment Share on other sites More sharing options...
FascistPotato Posted March 6, 2017 Share Posted March 6, 2017 necrobump Has anyone been able to get more than 12 cores/24 threads working with a hackintosh of any sort? I want to build a nice workstation, preferrably with a hackintosh partition, 12 cores would be OK but if I could use more that would be much better... This is especially going to be interesting once Naples comes out, assuming people get it to work. Link to comment Share on other sites More sharing options...
PippoX0 Posted March 6, 2017 Share Posted March 6, 2017 Very interesting ! Good Luck ! Link to comment Share on other sites More sharing options...
TECH_ATTACK Posted May 20, 2017 Share Posted May 20, 2017 News related to Threadlimitation? Kernelpatching possible to support more than 64 threads? Link to comment Share on other sites More sharing options...
Balamut Posted May 23, 2017 Share Posted May 23, 2017 News related to Threadlimitation? Kernelpatching possible to support more than 64 threads? Nothing that I know of ..... maybe with the new OS Link to comment Share on other sites More sharing options...
rotoyouoio Posted July 15, 2018 Share Posted July 15, 2018 (edited) any news on what the limit is with mojave/high sierra? edit: to answer my own question - it's still 64 threads Edited July 15, 2018 by rotoyouoio Link to comment Share on other sites More sharing options...
Gen_ Posted October 13, 2018 Share Posted October 13, 2018 (edited) On 10/28/2016 at 7:18 AM, fabiosun said: Hi Max I am intersted also in this, I am not understanding why 8f parameter (it means 143 in decimal conversion, original 3f means 63 instead) so for 80 cores you should have 79 (4f) Maybe Balamut could help to solve this, he is trying with a dual 44 cores rig :-) You don't want a max count that isn't base 2, simply because reasons like the original being base 2 and the possibility that code reliant on it may have recursive functions (which could expect that number to be divisible by 2 down to 1 and make the function faster by limiting code width - not because Apple plan a 64 core Mac) so I would recommend 127 + 0 core or 7F. Remember that having higher than the max cores you physically have available is standard behavior for everyone else because we don't patch this kernel value, even through voodooTSCsync. Also think that there may be 'dummy' or virtual cores used by the kernel that we don't see, as there isn't a precisely 64 core build I've heard of (only a 32 and 40). There might have been a typo in why the 8f figure was used, or said poster has deeper knowledge and MacOS uses lots of fake cores for other stuff like uncore on-die DSP. Finally, a word to anyone else that is patching this in case it doesn't work alone: 64 is the highest representation of a binary word and the patch may overflow other kernel elements because it turns the port count into dword element in binary. Follow the pointers and make sure they can use asm dword elements or recompile from source with the limit changes and the compiler should take care of it. Edited October 13, 2018 by Gen_ Link to comment Share on other sites More sharing options...
php75 Posted February 18, 2019 Share Posted February 18, 2019 On 10/13/2018 at 12:55 PM, Gen_ said: You don't want a max count that isn't base 2, simply because reasons like the original being base 2 and the possibility that code reliant on it may have recursive functions (which could expect that number to be divisible by 2 down to 1 and make the function faster by limiting code width - not because Apple plan a 64 core Mac) so I would recommend 127 + 0 core or 7F. Remember that having higher than the max cores you physically have available is standard behavior for everyone else because we don't patch this kernel value, even through voodooTSCsync. Also think that there may be 'dummy' or virtual cores used by the kernel that we don't see, as there isn't a precisely 64 core build I've heard of (only a 32 and 40). There might have been a typo in why the 8f figure was used, or said poster has deeper knowledge and MacOS uses lots of fake cores for other stuff like uncore on-die DSP. Finally, a word to anyone else that is patching this in case it doesn't work alone: 64 is the highest representation of a binary word and the patch may overflow other kernel elements because it turns the port count into dword element in binary. Follow the pointers and make sure they can use asm dword elements or recompile from source with the limit changes and the compiler should take care of it. Hi, do you mean with this value it would possible to have 88 cores actived? I tried a lot of patches on Kernel following this post a year ago, it was able to boot with patches but not with all adores actived... I trier to compile kernel with an other limit number than 64; but you loose powermanagement and still crashing with more than 64 core activated Link to comment Share on other sites More sharing options...
FaqApple Posted July 19, 2020 Share Posted July 19, 2020 On 2/19/2019 at 5:57 AM, php75 said: Hi, do you mean with this value it would possible to have 88 cores actived? I tried a lot of patches on Kernel following this post a year ago, it was able to boot with patches but not with all adores actived... I trier to compile kernel with an other limit number than 64; but you loose powermanagement and still crashing with more than 64 core activated Hello! May I ask how did you compile the kernel? I personally have a 112t system which always get kp when macos is booting Link to comment Share on other sites More sharing options...
Recommended Posts