ydeng Posted October 8, 2017 Share Posted October 8, 2017 I've tested all my emulations with intrinsics. They all work. Well, maybe movntdqa does not have correct side effect. Now I am trying to test them with opemu. I need to manually generate opcode and keep xmm registers consistent. Anybody knows a test suit for this? gcc tests? Otherwise I have to dig throw compiled intrinsics tests and fish for instruction binaries. 1 Link to comment Share on other sites More sharing options...
ydeng Posted October 9, 2017 Share Posted October 9, 2017 I've tested all my emulations with intrinsics. They all work. Well, maybe movntdqa does not have correct side effect. Now I am trying to test them with opemu. I need to manually generate opcode and keep xmm registers consistent. Anybody knows a test suit for this? gcc tests? Otherwise I have to dig throw compiled intrinsics tests and fish for instruction binaries. Found an online assembler to generate opcode and use _load_xmm from opemu to load data to registers. Finally extractps to gives correct result. Need to test pextrb, pextrw, pextrd and pextrw. These things have general register or memory address as dest, different from the xmm dest in existing code. After that, things are down hill. Almost there! 6 Link to comment Share on other sites More sharing options...
jsl Posted October 9, 2017 Share Posted October 9, 2017 Found an online assembler to generate opcode and use _load_xmm from opemu to load data to registers. Finally extractps to gives correct result. Need to test pextrb, pextrw, pextrd and pextrw. These things have general register or memory address as dest, different from the xmm dest in existing code. After that, things are down hill. Almost there! Good news ! Waiting for your testing kernel as soon as possible ! Link to comment Share on other sites More sharing options...
ydeng Posted October 11, 2017 Share Posted October 11, 2017 Fixed a bug in udis86 decoding insertps... 3 Link to comment Share on other sites More sharing options...
ydeng Posted October 14, 2017 Share Posted October 14, 2017 Please test this. I don't have the hardware. But this kernel runs on FX. 2 Link to comment Share on other sites More sharing options...
XLNC Posted October 14, 2017 Share Posted October 14, 2017 Please test this. I don't have the hardware. But this kernel runs on FX. Thanks ydeng ! For the kernel may i know what is the difference between this kernel and bronya kernel ? and is there any associated System.kext with this kernel ? EDIT : works on FX CPU - usb works - sound works - ethernet works Link to comment Share on other sites More sharing options...
AXAXAXAXAXAX Posted October 14, 2017 Share Posted October 14, 2017 Please test this. I don't have the hardware. But this kernel runs on FX. AMD Athlon X2 4050 1 Link to comment Share on other sites More sharing options...
ydeng Posted October 14, 2017 Share Posted October 14, 2017 Thanks ydeng ! For the kernel may i know what is the difference between this kernel and bronya kernel ? and is there any associated System.kext with this kernel ? EDIT : works on FX CPU - usb works - sound works - ethernet works This is https://github.com/Shaneee92/SierraAMD-XNU+ plus sse4.1 emulation. You have FX cpu, don't need this one. Thanks for testing. AMD Athlon X2 4050 IMG_1712.JPG Where does this happen? Did it boot at all? 1 Link to comment Share on other sites More sharing options...
ydeng Posted October 14, 2017 Share Posted October 14, 2017 AMD Athlon X2 4050 IMG_1712.JPG Forgot to turn sse4.1 emulation on in kernel trap. Please try this one. AMD Athlon X2 4050 IMG_1712.JPG This one comes from here https://github.com/Shaneee92/SierraAMD-XNU/blob/master/osfmk/i386/trap.c#L802. The memory address pointed to by instruction counter does not exist! 5 Link to comment Share on other sites More sharing options...
jsl Posted October 14, 2017 Share Posted October 14, 2017 Forgot to turn sse4.1 emulation on in kernel trap. Please try this one. This one comes from here https://github.com/Shaneee92/SierraAMD-XNU/blob/master/osfmk/i386/trap.c#L802. The memory address pointed to by instruction counter does not exist! Thanks for this testing kernel which got the same error as Post#82 here in my FX-6300 hackintosh. I'll test it later in Phenom II x6 hackintosh later. Link to comment Share on other sites More sharing options...
ydeng Posted October 14, 2017 Share Posted October 14, 2017 Thanks for this testing kernel which got the same error as Post#82 here in my FX-6300 hackintosh. I'll test it later in Phenom II x6 hackintosh later. Are you able to see anything else before it prints pages of invalid kernel ip? This one boots FX8350 with no problem. I turned on trap panic. Should be able to see what happens before the memory error. 2 Link to comment Share on other sites More sharing options...
spakk Posted October 14, 2017 Author Share Posted October 14, 2017 You can not compare the FX-6300 or the FX8350 which that has the CPU Features SSE4.1 and SSE4.2 with a simple CPU such as Phenom II X6 or AMD Athlon X2 4050. Therefore, check the kernel only with a CPU without SSE4. 1 / SSE4.2, so we can see if the changes work, which we all hope. I can not check ydeng kernel until the end of next week. When I'm home 1 Link to comment Share on other sites More sharing options...
Loloflat6 Posted October 14, 2017 Share Posted October 14, 2017 I will try this on my X2 250 , just have to create an USB installer with Sierra 12.6 and cross fingers. 1 Link to comment Share on other sites More sharing options...
jsl Posted October 14, 2017 Share Posted October 14, 2017 Are you able to see anything else before it prints pages of invalid kernel ip? This one boots FX8350 with no problem. I turned on trap panic. Should be able to see what happens before the memory error. This kernel can boot to desktop at 10.12.6 by Clover, but it got KP by Enoch/Bronya. 1 Link to comment Share on other sites More sharing options...
ydeng Posted October 14, 2017 Share Posted October 14, 2017 This kernel can boot to desktop at 10.12.6 by Clover, but it got KP by Enoch/Bronya. com.apple.kpi.bsd is not linked properly. Stock Enoch works for me. Link to comment Share on other sites More sharing options...
jsl Posted October 14, 2017 Share Posted October 14, 2017 com.apple.kpi.bsd is not linked properly. Stock Enoch works for me. Yes, Enoch 2902 can boot to desktop without any issue in FX-6300 hackintosh. 1 Link to comment Share on other sites More sharing options...
AXAXAXAXAXAX Posted October 14, 2017 Share Posted October 14, 2017 Are you able to see anything else before it prints pages of invalid kernel ip? This one boots FX8350 with no problem. I turned on trap panic. Should be able to see what happens before the memory error. the first kernel with Enoch r2902: the latest kernel: and it gives a lot of messages of "mnemonic: 422" and things like "0x103777000 uuid = <13d3b12d-3c1c-3f22-8735-f8ec784714f4>" before and says initproc exited -- no exit reason available -- (signal 6, exit status 0 ) 2 Link to comment Share on other sites More sharing options...
ydeng Posted October 14, 2017 Share Posted October 14, 2017 the first kernel with Enoch r2902: IMG_1718.JPG the latest kernel: IMG_1717.JPG and it gives a lot of messages of "mnemonic: 422" and things like "0x103777000 uuid = <13d3b12d-3c1c-3f22-8735-f8ec784714f4>" before and says initproc exited -- no exit reason available -- (signal 6, exit status 0 ) I forgot to turn some of the debug prints off. 'mnemonic: 422' is sse4.1 instruction pinsrd . Let me remove those so that we can see where it crashes. Here's another one. Thanks for trying. 1 Link to comment Share on other sites More sharing options...
AXAXAXAXAXAX Posted October 14, 2017 Share Posted October 14, 2017 I forgot to turn some of the debug prints off. 'mnemonic: 422' is sse4.1 instruction pinsrd . Let me remove those so that we can see where it crashes. Here's another one. Thanks for trying. it still gives me a lot of messages with uuid like the first two in the screenshot Link to comment Share on other sites More sharing options...
ydeng Posted October 14, 2017 Share Posted October 14, 2017 it still gives me a lot of messages with uuid like the first two in the screenshot IMG_1791.JPG I think I need to copyin/out between user space memory and kernel space. Thanks for the update. This takes a lot of patience. But we are getting there. Please try again. Fixed a bunch of bugs. 2 Link to comment Share on other sites More sharing options...
AkimoA Posted October 15, 2017 Share Posted October 15, 2017 let me see if i can get my old rig back together somewhere in the attic .keeps ya posted .. Tx ydeng for having a go at it ! Link to comment Share on other sites More sharing options...
AXAXAXAXAXAX Posted October 15, 2017 Share Posted October 15, 2017 I think I need to copyin/out between user space memory and kernel space. Thanks for the update. This takes a lot of patience. But we are getting there. Please try again. Fixed a bunch of bugs. Still the same 2 Link to comment Share on other sites More sharing options...
ydeng Posted October 15, 2017 Share Posted October 15, 2017 Still the same IMG_1796.JPG Debug print all sse41 instructions. You need to catch the last one before the failure. 1 Link to comment Share on other sites More sharing options...
AXAXAXAXAXAX Posted October 15, 2017 Share Posted October 15, 2017 Debug print all sse41 instructions. You need to catch the last one before the failure. no luck... but what about commenting these lines? https://github.com/Shaneee92/SierraAMD-XNU/blob/34b926dc342319403feb392575dc6505fb6aa1e5/osfmk/i386/AT386/model_dep.c#L1347-L1357 https://github.com/Shaneee92/SierraAMD-XNU/blob/34b926dc342319403feb392575dc6505fb6aa1e5/osfmk/i386/AT386/model_dep.c#L1435 https://github.com/Shaneee92/SierraAMD-XNU/blob/34b926dc342319403feb392575dc6505fb6aa1e5/osfmk/i386/AT386/model_dep.c#L1438-L1440 so it won't print this long text with uuids and thread. Link to comment Share on other sites More sharing options...
ydeng Posted October 15, 2017 Share Posted October 15, 2017 no luck... but what about commenting these lines? https://github.com/Shaneee92/SierraAMD-XNU/blob/34b926dc342319403feb392575dc6505fb6aa1e5/osfmk/i386/AT386/model_dep.c#L1347-L1357 https://github.com/Shaneee92/SierraAMD-XNU/blob/34b926dc342319403feb392575dc6505fb6aa1e5/osfmk/i386/AT386/model_dep.c#L1435 https://github.com/Shaneee92/SierraAMD-XNU/blob/34b926dc342319403feb392575dc6505fb6aa1e5/osfmk/i386/AT386/model_dep.c#L1438-L1440 so it won't print this long text with uuids and thread. Commented out Debugger message. 1 Link to comment Share on other sites More sharing options...
Recommended Posts