InfiniteMac OSx86

InfiniteMac OSx86 (http://infinitemac.com/forum.php)
-   Mountain Lion 10.8 (http://infinitemac.com/forumdisplay.php?f=102)
-   -   kernel 12.0 AMD SVP ? (http://infinitemac.com/showthread.php?t=7881)

The Connactic 09-20-2012 03:17 PM

Raw, i did the experiment you suggested and boot my stable 10.7.4 with your universal kernel (flags: raw64bit arch=x86_64 npci=0x3000).

The results were surprising. I think we're on the verge to learn something. I'll post the screenshots for you to examine (i did it with my iPad, but i'm not used to take photos with it, maybe the images come blurry or flipped upside down again).

R:A:W:X86 09-20-2012 03:39 PM

I am not suprised if the x86_64 Kernel works on yours, independent from the version of OS X.
Those people reporting the x86_64 Kernel to work had similiar CPU / ones where autodetection of parameters - particularly the FSB works...

Too bad - but it would have been too easy, if things would have turned out, the way I thought for a short moment... :-|

The Connactic 09-20-2012 03:40 PM

2 Attachment(s)
Notice two very important things:

1) The boot starts to go wrong at an Apple RTC error, before it finally freezes at a bunch of USB messages. Do you know a good script to patch Apple RTC for Lion 64-bit?

2) Look at the PFM64 message (PFM64 (44 CPU)) just below ACPI system state. What does it mean? Prefetch memory?

The Connactic 09-20-2012 03:41 PM

Quote:

Originally Posted by R:A:W:X86 (Post 58833)
I am not suprised if the x86_64 Kernel works on yours, independent from the version of OS X.
Those people reporting the x86_64 Kernel to work had similiar CPU / ones where autodetection of parameters - particularly the FSB works...

Too bad - but it would have been too easy, if things would have turned out, the way I thought for a short moment... :-|


RAW, do you have any single report of any AMD CPU that can run the 64-bit Lion kernel? Because, if i manage to boot it, Mountain Lion becomes more than a possibility, but a certainty for the near future, since it will be proved that AMD CPUs can boot the latest 64-bit kernels (i'm not claiming victory before the game begins, since the system wasn't about to boot really).

R:A:W:X86 09-20-2012 04:04 PM

Quote:

Originally Posted by The Connactic (Post 58835)
RAW, do you have any single report of any AMD CPU that can run the 64-bit Lion kernel?

There are some on the forum i.e. see http://osx86.co/f36/10-6-5-legacy-ke...730/page2.html
Snow Leopard - yes, but the patch isn't that different.
Also some people reporting the x86_64 Lion Kernel to work. "work" by the meaning of no instant reboot. ;)

As long as this is not fixed for the majority, including all owners of recent AMD CPUs, it doesn't make sense for me, to look into porting the current Patch to Mountain Lion...

//regarding that AppleRTC errors - have you tried, to regenerate the kextcache yet?

The Connactic 09-20-2012 10:08 PM

I got a little further by removing the unnecessary kexts EVOreboot and LegacyRTC . Now i'm stuck at Kernel=LP64. So i think i won't get past there without solving the ssse3 issue.

Researching about it, i came to a very interesting website from Dave Elliot: http://tgwbd.org/darwin/xnu.html

There i learn that there is only one routine that needs ssse3 at the commpage, precisely the one required to enable 64-bit support. Do you have any assembly knowledge, RAW? Here's the routine, as is in xnu 1699.26.8:

#include <i386/asm.h>

/* void *memcpy((void *) to, (const void *) from, (size_t) bcount) */
/* rdi, rsi, rdx */
/*
* Note: memcpy does not support overlapping copies
*/
ENTRY(memcpy)
movq %rdx,%rcx
shrq $3,%rcx /* copy by 64-bit words */
cld /* copy forwards */
rep
movsq
movq %rdx,%rcx
andq $7,%rcx /* any bytes left? */
rep
movsb
ret

/* void bcopy((const char *) from, (char *) to, (unsigned int) count) */
/* rdi, rsi, rdx */

ENTRY(bcopy_no_overwrite)
xchgq %rsi,%rdi
jmp EXT(memcpy)

/*
* bcopy(src, dst, cnt)
* rdi, rsi, rdx
* [email protected] (Wolfgang Solfrank, TooLs GmbH) +49-228-985800
*/
ENTRY(bcopy)
xchgq %rsi,%rdi
movq %rdx,%rcx

movq %rdi,%rax
subq %rsi,%rax
cmpq %rcx,%rax /* overlapping && src < dst? */
jb 1f

shrq $3,%rcx /* copy by 64-bit words */
cld /* nope, copy forwards */
rep
movsq
movq %rdx,%rcx
andq $7,%rcx /* any bytes left? */
rep
movsb
ret

/* ALIGN_TEXT */
1:

addq %rcx,%rdi /* copy backwards */
addq %rcx,%rsi
decq %rdi
decq %rsi
andq $7,%rcx /* any fractional bytes? */
std
rep
movsb
movq %rdx,%rcx /* copy remainder by 32-bit words */
shrq $3,%rcx
subq $7,%rsi
subq $7,%rdi
rep
movsq
cld
ret


The questions are:

1) Why this routine needs ssse3 to run? It's not explicit.


2) Instead of write an on-the-fly ssse3 emulator, would it be possible to simply alter this single assembly routine so it calls, say, sse3 and not ssse3?

The Connactic 09-21-2012 07:55 PM

EDIT: Now i'm sure that is a waste of time to use Lion 10.7.4 XNU kernel as is to boot Mountain Lion, since it requires ssse3 instructions to boot 64-bit, and Mountain Lion requires a 64-bit kernel. We could just try to solve this problem with the ssse3 routine (it would help Lion AMD users too), but even with this, maybe it cannot boot Mountain Lion anyway because of core changes in the new OS (even the changes being not so drastic from an end-user point of view).

So i think there's two main paths for AMD hackintoshing by now: 1) focus on Mountain Lion XNU itself, and before even trying to patch it for AMD, we must discover if it has any ssse3 routines required to run, which ones, and how to change it and then apply patches AMD-specific (unless we plan to abandon non-Buldozer users like me, lol) or 2) focus on Lion 10.7.4 XNU, since we have a patched one for AMD, then making it run 64-bit flawlessly on AMD with Lion itself, by correcting the ssse3 calls in the commpage and bcopy.s routine and perfecting the AMD patches (remember that even Bulldozer ssse3-enabled CPUs have to boot arch=i386, which won't work with ML), and only then try to either have ML booting with it or generate a diff file from it by comparing it with ML's, and then apply this diff with AMD patches and ssse3 correction as a patch to ML XNU (I tried something like that though, applying RAW's diff directly as a patch on 12.0 XNU, and got an epic fail).

gils 09-22-2012 12:58 PM

Quote:

Originally Posted by The Connactic (Post 58851)
EDIT: Now i'm sure that is a waste of time to use Lion 10.7.4 XNU kernel as is to boot Mountain Lion, since it requires ssse3 instructions to boot 64-bit, and Mountain Lion requires a 64-bit kernel. We could just try to solve this problem with the ssse3 routine (it would help Lion AMD users too), but even with this, maybe it cannot boot Mountain Lion anyway because of core changes in the new OS (even the changes being not so drastic from an end-user point of view).

So i think there's two main paths for AMD hackintoshing by now: 1) focus on Mountain Lion XNU itself, and before even trying to patch it for AMD, we must discover if it has any ssse3 routines required to run, which ones, and how to change it and then apply patches AMD-specific (unless we plan to abandon non-Buldozer users like me, lol) or 2) focus on Lion 10.7.4 XNU, since we have a patched one for AMD, then making it run 64-bit flawlessly on AMD with Lion itself, by correcting the ssse3 calls in the commpage and bcopy.s routine and perfecting the AMD patches (remember that even Bulldozer ssse3-enabled CPUs have to boot arch=i386, which won't work with ML), and only then try to either have ML booting with it or generate a diff file from it by comparing it with ML's, and then apply this diff with AMD patches and ssse3 correction as a patch to ML XNU (I tried something like that though, applying RAW's diff directly as a patch on 12.0 XNU, and got an epic fail).

hello ,


:)


it is not so easy to see that, I still found that the kernel panic on RAWX86 ML 10.8 but the PC does not reboot, as you say, there would not have a fundamental diference between the 2 kernel? I am completely noob in this area.

I do not manage to understand the difference between the 2 kernel, is there no way to resume writing kernel 11.0 and 12.0 adapt the kernel ?

google traduction .

The Connactic 09-23-2012 07:30 AM

Hi, Gills!

Follow this topic: http://www.insanelymac.com/forum/top...0#entry1855016

RAW, you're invited too to post there if/when you have time; we really need some experienced point of view of someone who has actual knowledge on it.

gils 09-23-2012 04:13 PM

Quote:

Originally Posted by The Connactic (Post 58885)
Hi, Gills!

Follow this topic: http://www.insanelymac.com/forum/top...0#entry1855016

RAW, you're invited too to post there if/when you have time; we really need some experienced point of view of someone who has actual knowledge on it.

hello,

I do not have an account on this site, we are here !?? :)
you would not have a test kernel 12.0 ? I try.