Jump to content

EFI finally mastered. OS X booted with an UNMODIFIED kernel.


Dr. Hurt
 Share

359 posts in this topic

Recommended Posts

um... only working for C2D cpus right now :angel: i dont know where u get your info from...

 

http://tgwbd.org/darwin/boot.html

 

The problem is not with the bootloader. It will work fine with any cpu. The problem is with OS X itself. For OS X to be fully functional without any kernel modifications, you'll need a core 2 cpu because it's the only one which has ssse3 which is used by OS X for running 64-bit instructions. Without a core 2 cpu, 64-bit applications won't work, but the boot loader and the rest of the OS will work fine.

Link to comment
Share on other sites

The problem is not with the bootloader. It will work fine with any cpu. The problem is with OS X itself. For OS X to be fully functional without any kernel modifications, you'll need a core 2 cpu because it's the only one which has ssse3 which is used by OS X for running 64-bit instructions. Without a core 2 cpu, 64-bit applications won't work, but the boot loader and the rest of the OS will work fine.

 

I don't see any reason why Pentium-Ds (and AMD64+SSE3 single core Pentium 4s for that matter) can't be run in 32-bit mode though, because Core Duo/Core Solo don't support SSSE3 either, and Apple has to support those in OS X's kernel.

 

AMD is not going to happen with an unmodded OS though, due to the CPUID checks.

Link to comment
Share on other sites

The problem is that this will only work on modern computers. Core 2 and a motherboard with HPET are required.

Other hardware like sse2 cpus or older 64bit cpus will still need some modifications to the kernel.

 

Netkas is not planning on releasing it yet as he is still improving the emulation.

 

Well, I guess it's time for me to buy a new computer now. :(

 

A HPET enabled motherboard and a Core 2 don't need to cost a fortune. In fact they are pretty much standard on every semi-decent computer you buy now (or you can upgrade your own, of course).

 

anyone know where i can find a cpu util so i can check if my cpu supports hpet ?

 

AFAIK, it is the motherboard, not the CPU which supports HPET.

Link to comment
Share on other sites

I don't see any reason why Pentium-Ds (and AMD64+SSE3 single core Pentium 4s for that matter) can't be run in 32-bit mode though, because Core Duo/Core Solo don't support SSSE3 either, and Apple has to support those in OS X's kernel.

 

AMD is not going to happen with an unmodded OS though, due to the CPUID checks.

 

I never said they won't work. I just said that "64-bit applications" will not work. Apart from that, everything else will work on any sse3 intel cpu installed on a motherboard with HPET.

Link to comment
Share on other sites

Offhand, do we have a list of which apps these are?

Well.. To be honest with you, I don't know any 64-bit applications because I never use any. All I know is that 64-bit applications on os x with any processors other than core 2 will give a bus error. Thats what netkas said and why he wrote a fix for it in the kernel.

 

By the way what does offhand mean?

Link to comment
Share on other sites

I don't know where you were told that, but Core Duo/Core Solo DO support SSE3

 

On Page 7 in the introduction of the DataSheet for these processors, it clearly states that they support SSE2 and SSE3 instructions.

 

http://download.intel.com/design/mobile/da...ts/30922106.pdf

 

No he said SSSE3. AS in 3 S's.

 

There is SSSE3 and SSE3. Two different instruction sets...

Link to comment
Share on other sites

No he said SSSE3. AS in 3 S's.There is SSSE3 and SSE3. Two different instruction sets...

 

Ah, I stand corrected the Core 2 Duo have Supplemental.

 

But that has nothing to do with booting an unmodified kernel on a core duo machine, because it already boots on the first gen macbooks, macbook pros and iMacs.

 

If on a Pentium 4 or Pentium Dual with SSE3 and you're worried about accidentally executing a 64bit app from a fat binary, you can always add -legacy to your boot flags to boot the OS in 32 bit mode.

Link to comment
Share on other sites

I never said there would be a problem with Core chips (which aren't 64-bit in the first place and thus avoid the whole problem.)

 

I just said that we'd have to ignore the 64-bit capabilities of chips which otherwise would be able to run OS X in 64-bit mode because they have AMD64 and SSE3 but not SSSE3 (which is basically Pentium 4 5x1/6xx-on and the Celeron equivalents, and Pentium Ds) in the case of running unmodified OS X, whereas we can have an SSSE3 emulator in the kernel for those chips and allow them to run a 64-bit kernel if we have compiled the kernel from source/patched it and aren't attempting to run an unmodified OS X install on generic hardware.

Link to comment
Share on other sites

I just said that we'd have to ignore the 64-bit capabilities of chips which otherwise would be able to run OS X in 64-bit mode because they have AMD64 and SSE3 but not SSSE3 (which is basically Pentium 4 5x1/6xx-on and the Celeron equivalents, and Pentium Ds) in the case of running unmodified OS X, whereas we can have an SSSE3 emulator in the kernel for those chips and allow them to run a 64-bit kernel if we have compiled the kernel from source/patched it and aren't attempting to run an unmodified OS X install on generic hardware.

 

OK, I'm a noob, please help me understand.

 

A quick scan of the kernel shows that it does not execute any of the 16 SSSE3 instructions.

 

The 64bit extension instructions are different instructions then the SSSE3 instructions which act on 64/128 bit registers.

 

I realize there is a bug in the kernel when running 64bit apps on older processors.

 

But how does running a 64bit app relate to SSSE3, when the kernel doesn't use it?

 

I'm trying to understand how you made the connection from running a 64bit app on an older processor crashes to the newer processors have SSSE3?

Link to comment
Share on other sites

Because AFAIK, GCC4 when compiling apps for 64-bit OS X uses SSSE3, thus as more OS X apps start to contain AMD64 binaries, people with these CPUs running the 'unmodified' OS X which we're presumably going to be using soon are going to run into a brick wall running unless they specifically stip out the 64-bit binary, or take the easier solution and just run the 32-bit kernel which won't allow the 64-bit binaries to run and will just use the x86 version.

 

Presumably this whole Leo being more 64-bit friendly means that some binaries which will benefit from 64-bit execution are going to get even bigger as they'll contain 4 versions, 32 and 64-bit PPC and x86 :(

Link to comment
Share on other sites

 Share

×
×
  • Create New...