Jump to content

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

Mountain Lion AMD legacy kernel x64_86 ssse3 ssse3 emulator

  • Please log in to reply
6343 replies to this topic

#2381
Shaneee

Shaneee

    AMD Dev Tester

  • Retired
  • 1,002 posts
  • Gender:Male
  • Location:Scotland
  • Interests:Web Design. OS X. Music.

Andy I have this in the console. Is it related?

 

Attached File  error.png   19.04KB   12 downloads



#2382
Andy Vandijck

Andy Vandijck

    InsanelyMac Deity

  • Coders
  • 1,630 posts
  • Gender:Male
  • Location:Tienen
  • Interests:Programming stuff for Mac OS X...
    Hacking...
    Hard rock (also really big Metallica...

Andy, do you mean the kernel will print error messages in the Console?

What kind of messages should i be looking for?

All the best!

Opemu invalid kernel instruction (instruction here)

Andy I have this in the console. Is it related?

error.png

No its part of IOHIDFamily.kext

#2383
Shaneee

Shaneee

    AMD Dev Tester

  • Retired
  • 1,002 posts
  • Gender:Male
  • Location:Scotland
  • Interests:Web Design. OS X. Music.

Opemu invalid kernel instruction (instruction here)
No its part of IOHIDFamily.kext

 

Ahh ok was just it said kernel. Nothing related to opemu in the console so far. Glitches are still present but not as bad as they used to be.

 

Edit: Forgot to mention I'm running 10.8.4



#2384
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,944 posts
  • Gender:Male

No opemu errors here under 10.8.4, Andy. This could be an ultimate proof of concept.

 

All the best!



#2385
Bronya

Bronya

    InsanelyMac Legend

  • Coders
  • 917 posts
  • Gender:Male

I made a 10.8.3 kernel.

I also modified the opemu sources so that if it encounters an invalid opcode it will print 8B of the instruction buffer.

This way we can trace this in both kernel space and user space.

Invalid opcode in kernel opemu will also no longer call panic trap but just show the above and return.

I hope this will make VMWare / VirtualBox work with the opemu.

I also modified the code for the processor flag.

On Intel CPU it will use the MSR and on AMD CPU it will always set it to 1.

It is the value in sysctl -a like this:

machdep.cpu.processor_flag: 1

So I put this for AMD also on 1.

Sources are included.

Could you guys please test and report back?

Thx. 

Hello ! :)

I copy your's opemu from SinetekBronzovkAnVoodoo_RC5.diff .

And compile my kernel and tested :

1) with your opemu and my kHasSSE4_2:

Attached File  19062013145.jpg   208.04KB   3 downloads

2) with my modified opemu and kHasSSE4_2: but only your mach_kernel is normal graphics.

Attached File  19062013146.jpg   140.6KB   3 downloads

 

3) your kernel wrong show cache_size  :

Attached File  Снимок экрана 2010-01-01 в 3.06.01.png   73.03KB   2 downloads

4) my kernel normal show cache_size :  

Attached File  Снимок экрана 2010-01-01 в 3.04.31.png   74.53KB   4 downloads

 

With your opemu i getting panic by parallel desktop .V

Vmware normal working.

 

I tested on my old athlon x64 dual core !

 

Please see In my attachment my modified opemu :) ! My opemu don't working parallel desktop , i no fix . 

Attached File  opemu_work.zip   7.28KB   26 downloads



#2386
Andy Vandijck

Andy Vandijck

    InsanelyMac Deity

  • Coders
  • 1,630 posts
  • Gender:Male
  • Location:Tienen
  • Interests:Programming stuff for Mac OS X...
    Hacking...
    Hard rock (also really big Metallica...

Hello ! :)
I copy your's opemu from SinetekBronzovkAnVoodoo_RC5.diff .
And compile my kernel and tested :
1) with your opemu and my kHasSSE4_2:
19062013145.jpg
2) with my modified opemu and kHasSSE4_2: but only your mach_kernel is normal graphics.
19062013146.jpg

3) your kernel show don't right cache_size :
Снимок экрана 2010-01-01 в 3.06.01.png
4) my kernel normal show's cache_size :
Снимок экрана 2010-01-01 в 3.04.31.png

Please see In my attachment my modified opemu :) !
opemu_work.zip

Cool! Thanks bronzovka.

EDIT: I've rewritten the cache info parts like with your diff.

I also did some more work on the CPU microcode parts.

I've implemented your fixed opemu too.

Post when done (RC6) ;)



#2387
Bronya

Bronya

    InsanelyMac Legend

  • Coders
  • 917 posts
  • Gender:Male

Andy Vandijck , cache_size only from cupid.c ))

My cupid.c is new ... 


Edited by Bronya, 19 June 2013 - 08:04 PM.


#2388
Andy Vandijck

Andy Vandijck

    InsanelyMac Deity

  • Coders
  • 1,630 posts
  • Gender:Male
  • Location:Tienen
  • Interests:Programming stuff for Mac OS X...
    Hacking...
    Hard rock (also really big Metallica...

I've fixed the cache size thanks to your diff...

EDIT: Bronzovka tested it, cache size is indeed fine. (tested on AMD Athlon64 x2)

We still need FX tests on it to check...

Yep... I fixed it in cpuid.c

Other testers please?

Thanks. :D

Source included.

EDIT2: Could somebody please do the following 2 command on AMD and post the results?

sysctl -a | grep microcode

sysctl -a | grep processor_flag

EDIT3: Bronzovka tested it and microcode version and processor flag are properly 21 and 1 :)

Attached Files



#2389
Bronya

Bronya

    InsanelyMac Legend

  • Coders
  • 917 posts
  • Gender:Male

It is kernel - cache_size on old amd is ok , graphic is ok . But have artifact. 

I soon update my kernel for test .))


Edited by Bronya, 19 June 2013 - 09:06 PM.


#2390
kulfon77

kulfon77

    InsanelyMac Protégé

  • Members
  • Pip
  • 8 posts

I have a question about pmulhrsw in opemu:

 

void pmulhrsw128(XMM *src, XMM *dst, XMM *res)
{
    int i;
    for(i = 0; i < 8; ++i)
        res->a16[i] = (((dst->a16[i] * src->a16[i] >> 14) + 1) >> 1);
}

After multiplicating two 16bit numbers we get 32bit, shifting 14bit right leaves 18bit, so to make it 16bit again we need to shift it 2 bits right, right?

 

        res->a16[i] = (((dst->a16[i] * src->a16[i] >> 14) + 1) >> 2);

Or am I missing something? :D



#2391
Andy Vandijck

Andy Vandijck

    InsanelyMac Deity

  • Coders
  • 1,630 posts
  • Gender:Male
  • Location:Tienen
  • Interests:Programming stuff for Mac OS X...
    Hacking...
    Hard rock (also really big Metallica...

I have a question about pmulhrsw in opemu:

 

void pmulhrsw128(XMM *src, XMM *dst, XMM *res)
{
    int i;
    for(i = 0; i < 8; ++i)
        res->a16[i] = (((dst->a16[i] * src->a16[i] >> 14) + 1) >> 1);
}

After multiplicating two 16bit numbers we get 32bit, shifting 14bit right leaves 18bit, so to make it 16bit again we need to shift it 2 bits right, right?

 

        res->a16[i] = (((dst->a16[i] * src->a16[i] >> 14) + 1) >> 2);

Or am I missing something? :D

Gcc's testsuite defines it like this:

 

/* Routine to manually compute the results */
static void
compute_correct_result (int *i1, int *i2, int *r)
{
  short *s1 = (short *) i1;
  short *s2 = (short *) i2;
  short *sout = (short *) r;
  int t0;
  int i;

  for (i = 0; i < 8; i++)
    {
      t0 = (((int) s1[i] * (int) s2[i]) >> 14) + 1;
      sout[i] = (short) (t0 >> 1);
    }
}

Where r = i1 operation i2

EDIT: So it is correct... :D (the way it is)



#2392
kulfon77

kulfon77

    InsanelyMac Protégé

  • Members
  • Pip
  • 8 posts

Well, thanks for the answer, yet it still looks strange to me. I got confused after reading this: http://pl.wikibooks..../SSSE3/PMULHRSW



#2393
Andy Vandijck

Andy Vandijck

    InsanelyMac Deity

  • Coders
  • 1,630 posts
  • Gender:Male
  • Location:Tienen
  • Interests:Programming stuff for Mac OS X...
    Hacking...
    Hard rock (also really big Metallica...

Well, thanks for the answer, yet it still looks strange to me. I got confused after reading this: http://pl.wikibooks..../SSSE3/PMULHRSW

Interesting.
The info on that page is different.
Still if you run the gcc testsuite for it it checks out on Intel.
I made a testsuite for the opemu a long time ago. (Somewhere on this thread)

#2394
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,944 posts
  • Gender:Male


Andy Vandijck , cache_size only from cupid.c ))
My cupid.c is new ...


Bronzovka, although I can confirm the cache misreporting bug with Andy's kernel, it must be noted it also reports ssse3 instructions instead of sse4.2, and i think this relates to the fact that both his kernels are the most stable, even for 10.8.4. With your latest 10.8.3 kernel, I got glitches so heavy that the system was rendered unusable.

All the best!

#2395
Bronya

Bronya

    InsanelyMac Legend

  • Coders
  • 917 posts
  • Gender:Male

Bronzovka, although I can confirm the cache misreporting bug with Andy's kernel, it must be noted it also reports ssse3 instructions instead of sse4.2, and i think this relates to the fact that both his kernels are the most stable, even for 10.8.4. With your latest 10.8.3 kernel, I got glitches so heavy that the system was rendered unusable.

All the best!

Yes ! But i found and fixed opemu.  i test my new kernel with sse4_2on athlon x64 ... !   :)


Edited by Bronya, 19 June 2013 - 11:30 PM.


#2396
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,944 posts
  • Gender:Male

Okay, i'll wait for your new kernel! :)



#2397
Bronya

Bronya

    InsanelyMac Legend

  • Coders
  • 917 posts
  • Gender:Male

I did kernel only processor x2 250 ! Stable working ! I continue ... )



#2398
carlo_67

carlo_67

    InsanelyMac Deity

  • Local Moderators
  • 2,042 posts
  • Gender:Male
  • Location:Roma

works well Phenom 2 x6 1075T, start more 'fast, good fluidity', with and without DSDT,
unfortunately always with graphical artifacts, I hope will be resolved soon

anyway great job, I'm confident

ps: sorry for my english

Carlo_67



#2399
JorgeMax

JorgeMax

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 306 posts
  • Gender:Male
  • Location:Brasil-Piauí-Teresina

Andy, my result with the AMD Phenom II X4 820:

Attached Files



#2400
spakk

spakk

    If you try to please everyone, then you have certainly forgotten

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,895 posts
  • Gender:Male
  • Location:português

Hi Andy, I have tested your current kernel for ML10.8.3  with ML10.8.2, it boots, but after a few minutes I get a Kernel Panic, I think that the cause of the kernel panics is not your current kernel. I started the DarwinDummper before the kernel panic, maybe someone can see where the cause is :(

  Global Memory (PCIe):   0 MB

:(

 

in the Diagnostic Report folder I find a CVMCompiler.crash -.> OpenGL.framework problem with CVMCompiler

Attached Files


Edited by spakk, 20 June 2013 - 09:27 PM.






Also tagged with one or more of these keywords: Mountain Lion, AMD, legacy kernel, x64_86, ssse3, ssse3 emulator


10 user(s) are reading this topic

2 members, 7 guests, 1 anonymous users


© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy