InfiniteMac OSx86  
  #11  
Old 09-20-2012, 03:17 PM
The Connactic The Connactic is offline
Jaguar
 
Join Date: Jul 2012
Posts: 89
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).
Reply With Quote
  #12  
Old 09-20-2012, 03:39 PM
R:A:W:X86's Avatar
R:A:W:X86 R:A:W:X86 is offline
 
Join Date: Mar 2012
Location: Germany
Posts: 95
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...

AMD FX 4100
MSI 760GM-P23
Radeon HD6570
OS X Lion Retail 10.7.5
Lion Kernel Project
Reply With Quote
  #13  
Old 09-20-2012, 03:40 PM
The Connactic The Connactic is offline
Jaguar
 
Join Date: Jul 2012
Posts: 89
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?
Attached Images
File Type: jpg 59df0ec58a15739a944bd7f812abcb70.jpg (651.4 KB, 7 views)
File Type: jpg c199a01fa2fe93a22d2656eb655f4a78.jpg (623.9 KB, 7 views)

Last edited by The Connactic; 09-20-2012 at 03:42 PM.
Reply With Quote
  #14  
Old 09-20-2012, 03:41 PM
The Connactic The Connactic is offline
Jaguar
 
Join Date: Jul 2012
Posts: 89
Quote:
Originally Posted by R:A:W:X86 View Post
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).

Last edited by The Connactic; 09-20-2012 at 03:46 PM.
Reply With Quote
  #15  
Old 09-20-2012, 04:04 PM
R:A:W:X86's Avatar
R:A:W:X86 R:A:W:X86 is offline
 
Join Date: Mar 2012
Location: Germany
Posts: 95
Quote:
Originally Posted by The Connactic View Post
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?

AMD FX 4100
MSI 760GM-P23
Radeon HD6570
OS X Lion Retail 10.7.5
Lion Kernel Project

Last edited by R:A:W:X86; 09-20-2012 at 04:06 PM.
Reply With Quote
  #16  
Old 09-20-2012, 10:08 PM
The Connactic The Connactic is offline
Jaguar
 
Join Date: Jul 2012
Posts: 89
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?

Last edited by The Connactic; 09-20-2012 at 10:19 PM.
Reply With Quote
  #17  
Old 09-21-2012, 07:55 PM
The Connactic The Connactic is offline
Jaguar
 
Join Date: Jul 2012
Posts: 89
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).
Reply With Quote
  #18  
Old 09-22-2012, 12:58 PM
gils's Avatar
gils gils is offline
Panther
 
Join Date: Dec 2011
Posts: 194
Quote:
Originally Posted by The Connactic View Post
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 .

Macmini early 2006 /blanGsak 10.7.2
Acer 8930 G / core2duo T6500 / NV 9600 GS m / Lion 10.7.3 / ML 10.8.2 / w7/8
Asus M5A97pro / FX 8350 / Asus HD 7950 CUII v2
GA-78LMT SP2 / FX 6100 / P x4 960t / Sapphire HD 4850 1024
MSI K9neo v1 / Atlon 4800+/ Gigabyte HD 5450 512
test kernel 12.0 AMD

Tuto : http://www.hack-my-mac.fr/index.php/...fx-buldo#28896

CG opérationnelle : HD 5450 512 / HD 4850 1 / GT 610
Reply With Quote
  #19  
Old 09-23-2012, 07:30 AM
The Connactic The Connactic is offline
Jaguar
 
Join Date: Jul 2012
Posts: 89
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.
Reply With Quote
  #20  
Old 09-23-2012, 04:13 PM
gils's Avatar
gils gils is offline
Panther
 
Join Date: Dec 2011
Posts: 194
Quote:
Originally Posted by The Connactic View Post
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.



💡 Deploy cloud instances seamlessly on DigitalOcean. Free credits ($100) for InfMac readers.


Macmini early 2006 /blanGsak 10.7.2
Acer 8930 G / core2duo T6500 / NV 9600 GS m / Lion 10.7.3 / ML 10.8.2 / w7/8
Asus M5A97pro / FX 8350 / Asus HD 7950 CUII v2
GA-78LMT SP2 / FX 6100 / P x4 960t / Sapphire HD 4850 1024
MSI K9neo v1 / Atlon 4800+/ Gigabyte HD 5450 512
test kernel 12.0 AMD

Tuto : http://www.hack-my-mac.fr/index.php/...fx-buldo#28896

CG opérationnelle : HD 5450 512 / HD 4850 1 / GT 610
Reply With Quote
Reply
Thread Tools
Display Modes