Jump to content

TASK FORCE - [AMD] to missing SSE4.1 Instruction set - older CPUs on macOS Sierra (10.12.x)


spakk
 Share

272 posts in this topic

Recommended Posts

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.

  • Like 1
Link to comment
Share on other sites

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!

  • Like 6
Link to comment
Share on other sites

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

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 

  JMwu8qylRq_C3R5M1h8gGg.png

 

_EU3PI2UQo6dnoKBA0nNMA.png

 

 

Link to comment
Share on other sites

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 

  JMwu8qylRq_C3R5M1h8gGg.png

 

_EU3PI2UQo6dnoKBA0nNMA.png

 

 

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

attachicon.gifIMG_1712.JPG

Where does this happen?  Did it boot at all?

  • Like 1
Link to comment
Share on other sites

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

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.

  • Like 2
Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

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.

post-70188-0-63689200-1507995431_thumb.jpg

  • Like 1
Link to comment
Share on other sites

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:

post-1299088-0-72249500-1508003022_thumb.jpg

 

the latest kernel:

post-1299088-0-45262600-1508003138_thumb.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 )

  • Like 2
Link to comment
Share on other sites

the first kernel with Enoch r2902:

attachicon.gifIMG_1718.JPG

 

the latest kernel:

attachicon.gifIMG_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.

  • Like 1
Link to comment
Share on other sites

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 

post-1299088-0-94647000-1508016221_thumb.jpg

Link to comment
Share on other sites

it still gives me a lot of messages with uuid like the first two in the screenshot 

attachicon.gifIMG_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.

  • Like 2
Link to comment
Share on other sites

 Share

×
×
  • Create New...