wastez Posted December 12, 2012 Share Posted December 12, 2012 I tested the new kernel but still stuck at Kernel is LP64. Link to comment Share on other sites More sharing options...
Sinetek Posted December 12, 2012 Share Posted December 12, 2012 yeah i'm past that since long ago, this part is OK doing all the work of poping and pushing etc. i still can't get access to the commpage :@. everything at 0x7fffffe00000 to 0x7fffffe00fff can be read, but anything up can't be accessed. it's weird, using GDB, access is OK and i can execute the commpage, but trying to do so in the normal way, no go. i'll continue probing the shared VM sections code, maybe call apple lol Link to comment Share on other sites More sharing options...
Andy Vandijck Posted December 12, 2012 Share Posted December 12, 2012 I'm currently building a debug version of the kernel. Please when I post it try it with boot flag debug=1 and next boot debug=255 Then post me results... posting soon... Here it is: the debug kernel Test it with debug=1 and debug=255 Lets hope it shows us more... Kernel is LP64 is part of bsd_init.c btw... Keep me posted NOTE: I had to remove the ssse3emu code for being able to build the debug kernel... don't bother trying -enable_ssse3emu with this kernel... Try it please debug_kernel.zip 2 Link to comment Share on other sites More sharing options...
zchef2k Posted December 12, 2012 Share Posted December 12, 2012 Could the latest LP64 hang be launchd? Did anyone glean anything from Lion launchd's issues? Link to comment Share on other sites More sharing options...
Mohamed Khairy Posted December 12, 2012 Share Posted December 12, 2012 debug=1 debug=255 Link to comment Share on other sites More sharing options...
SS01 Posted December 12, 2012 Share Posted December 12, 2012 hmm.. maybe with patched launchd Link to comment Share on other sites More sharing options...
Andy Vandijck Posted December 12, 2012 Share Posted December 12, 2012 Yeah maybe... kernel seems to work fine... launchd is something we could look into... Link to comment Share on other sites More sharing options...
SS01 Posted December 12, 2012 Share Posted December 12, 2012 if we have to patch launchd, installing would be pretty difficult... Link to comment Share on other sites More sharing options...
Shaneee Posted December 12, 2012 Share Posted December 12, 2012 Would the launchd from lion not work? Just a thought. I'm not at home so I can't try it. 1 Link to comment Share on other sites More sharing options...
Andy Vandijck Posted December 12, 2012 Share Posted December 12, 2012 Could somebody please point me to the launchd patches? I have all the 10.8.2 sources so I can look into it... 1 Link to comment Share on other sites More sharing options...
SS01 Posted December 12, 2012 Share Posted December 12, 2012 Could somebody please point me to the launchd patches? I have all the 10.8.2 sources so I can look into it... Which ones? afaik we'd have to do all the patching ourselves 1 Link to comment Share on other sites More sharing options...
Andy Vandijck Posted December 12, 2012 Share Posted December 12, 2012 Aren't there any for Lion? I need to know what to mod lol... 1 Link to comment Share on other sites More sharing options...
SS01 Posted December 12, 2012 Share Posted December 12, 2012 not afaik. We're on our own D: 1 Link to comment Share on other sites More sharing options...
Andy Vandijck Posted December 12, 2012 Share Posted December 12, 2012 Oh my... it probably is launchd. Just checked the console logs and right after Kernel is LP64 I find the following: com.apple.launchd: *** launchd[1] has started up *** Next it launches com.apple.automountd and then: kernel: Waiting for DSMOS... Gonna check the changes from Lion launchd 1 Link to comment Share on other sites More sharing options...
Andy Vandijck Posted December 12, 2012 Share Posted December 12, 2012 Oh my... it probably is launchd. Just checked the console logs and right after Kernel is LP64 I find the following: com.apple.launchd: *** launchd[1] has started up *** Next it launches com.apple.automountd and then: kernel: Waiting for DSMOS... Gonna check the changes from Lion launchd 1 Link to comment Share on other sites More sharing options...
Deltac0 Posted December 12, 2012 Share Posted December 12, 2012 Oh my... it probably is launchd. Just checked the console logs and right after Kernel is LP64 I find the following: com.apple.launchd: *** launchd[1] has started up *** Next it launches com.apple.automountd and then: kernel: Waiting for DSMOS... Gonna check the changes from Lion launchd Great... This is awesome! Now... We're at the same point with 10.8.2 and DP1! And DP1 has i386, so this is looking very good! The launchd problem is MAYBE errno 85, wrong cpu type or something, take a look few pages back something like 25 - 38 and you'll notice the discussion about it. We tried to boot ML DP1 (32-bit!) with Lion kernel patches etc, but it got stuck @ launchd errno85. And we couldn't compile the launchd from source because XCode gave all sorts of weird errors. And AFAIK there isn't any patches for launchd, because there was no need for it before? Or maybe the 10.6 etc. legacy kernels patched the launchd on the fly? Anyway, here is the 10.8.2 launchd source: http://www.opensourc...442.26.2.tar.gz EDIT: Just remembered, Lion has x86_64 and i386 hybrid launchd, ML only x86_64. 1 Link to comment Share on other sites More sharing options...
Sinetek Posted December 12, 2012 Share Posted December 12, 2012 hmm i thought it might be a sysenter/sysexit issue. 1 Link to comment Share on other sites More sharing options...
theconnactic Posted December 13, 2012 Author Share Posted December 13, 2012 Hi, folks! The question is, there are two main branches os AMD CPUs, each one with their own OSX-related issues. First there is what i call "legacy AMD", not because it's 32-bit only, but because of the fact i could only boot to the desktop with Lion using the -legacy boot flag (this boot flag allows only 32-bit processes, regardless of the capabilities of the CPU, and this is not the same thing as arch=i386, which loads a 32-bit kernel but does not put any such restrictions on the processes the machine can run). This happens because, since Lion, the ssse3 instructions became quintessential to run any 64-bit user land process, and that's why the boot will hang on "Kernel=LP64", just before launchd (that is, just at the point it should run the user land) every time we don't use the -legacy boot flag. I'm pretty sure the lack of support for ssse3 instructions is the villain here, since Bulldozers can boot fine with arch=i386 (but not archx86_64 - see later in the post) without the -legacy boot flag, and they have support for ssse3. Second, the newer FX-series CPUs (architectures Bulldozer and Piledriver, only the latter tested with OSX until now). These has all modern Intel instructions plus some AMD specific ones. The were pretty stable with Lion, since they have ssse3 support (meaning they could run 64-bit user land processes on a 32-bit kernel, thus run all 10.7.x features). But, when trying to boot with a 64-bit kernel, they got instant reboots. As far as i know, the problem persists with Mountain Lion, and as far as i know, they should be just working with 10.8.x, wasn't for that. Nawcom told me once about tsc.c issues that prevented 64-bit kernel space to load, but he didn't elaborate and i didn't investigate further. Any 12.x AMD kernel worth of the name should accomplish solutions for both branches. That means that a working ssse3 emulator is needed (and it has to be implemented in 64-bit, since there's no arch=i386 ML kernel), as well as a solution for Bulldozer instant reboots. Link to comment Share on other sites More sharing options...
SS01 Posted December 13, 2012 Share Posted December 13, 2012 @theconnactic: I believe that AMD hackintoshing has gone beyond just the kernel. From Mountain Lion on, it seems that not only kernel, but launchd patching will be necessary. As far as I know, this is the only way to solve "Kernel=LP64". If I'm wrong, then when sinetek's ssse3 emulator is done, we will boot to the userland. I think we need both Sinetek to keep working on his ssse3 emulator, and AnV to work on patching launchd. Whoever's solution boots first will have been the problem. tl;dr: We have two options: patch launchd to avoid using ssse3, or perfect the ssse3 emulator. Which one is best is up to the people working on the respective issues. Link to comment Share on other sites More sharing options...
theconnactic Posted December 13, 2012 Author Share Posted December 13, 2012 Hey, SS01! The problem isn't in the kernel anymore, as legacy AMDs are concerned. The problem is in the user land and will be solved with the proper ssse3 emulator implementation. That's why a Pentium D also cannot bot mountain Lion, despite being a 64-bit intel processor: it doesn't have ssse3 instructions support. And i'm not guessing here: remember Brandon Holland (aka bholland)? He has a Pentium D laptop and tried to boot Mountain Lion. He even patched core crypto and uploaded the result here, but then removed it because of personal concerns. He rebuild all the libraries, dynamic linkers and all, and got stuck at the same point as us: where the user land should take charge, after the statement Kernel=LP64. Then he came to the same conclusion i did: ssse3 support is crucial for Mountain Lion to boot, no matter the patches we make. The work that shuld be done at the kernel properly must aim at Bulldozer CPUs. For the rest of us, i think we should focus on the implementation of the ssse3 emulator. If the launchd patches could do any help, so be it, but i'm skeptical it would be enough. And there is the sysenter traps, as pointed Sinetek, that should be dealth with. Besides all this, i'm simply amazed by the amount of work done: way to go, guys! Really apreciate it! Link to comment Share on other sites More sharing options...
SS01 Posted December 13, 2012 Share Posted December 13, 2012 Thank you for your explanation theconnactic. Sorry, I was probably just rambling As for Bulldozer, I'm not sure if we'll ever get it working.. Instant reboot seems just so complicated. Is it even worth trying? The main reason to get an AMD, cost, is basically non-existent with bulldozer. Link to comment Share on other sites More sharing options...
Andy Vandijck Posted December 13, 2012 Share Posted December 13, 2012 Just something for someone to test. I rebuilt the launchd (and some other needed binaries). NOTE: I had to change a lot of code and it is launched rebuilt from Lion sources (ML is a no go at all when it comes down to rebuilding launchd)... Just to test here are the binaries. They are built against 10.8 SDK (and I made sure it only used vectors up to SSE3). It's a 32+64bit binary. Be sure to back up your current binaries if you test. Let me know if this changes anything... But hey... at least we have allready the kernel and corecrypto done. If Sinetek can complete his ssse3emu fully we'll be set to go , thanks Sinetek Launchd_Lion_built_for_ML.zip 2 Link to comment Share on other sites More sharing options...
theconnactic Posted December 13, 2012 Author Share Posted December 13, 2012 Just something for someone to test. I rebuilt the launchd (and some other needed binaries). NOTE: I had to change a lot of code and it is launched rebuilt from Lion sources (ML is a no go at all when it comes down to rebuilding launchd)... Just to test here are the binaries. They are built against 10.8 SDK (and I made sure it only used vectors up to SSE3). It's a 32+64bit binary. Be sure to back up your current binaries if you test. Let me know if this changes anything... But hey... at least we have allready the kernel and corecrypto done. If Sinetek can complete his ssse3emu fully we'll be set to go , thanks Sinetek I'll test it ahorita, Andy, but i'm not sure how to test... Link to comment Share on other sites More sharing options...
Andy Vandijck Posted December 13, 2012 Share Posted December 13, 2012 Just replace the corresponding binaries in /sbin /usr/(s)bin etc... it's the built results... Link to comment Share on other sites More sharing options...
theconnactic Posted December 13, 2012 Author Share Posted December 13, 2012 Off topic (but not so off): the server for the chatroom #legacykernel changed to chat.osx86.hu now! Hi, Andy! It froze at Kernel is LP64. Ill try now with -enable_ssse3emu. EDIT: also froze at Kernel is LP64. Link to comment Share on other sites More sharing options...
Recommended Posts