Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I know that many apple laptops such as my Macbook 6,1 run a 32 bit kernel in OS X Snow Leopard. The kernel according to Apple can also run or "support" 64 bit applications. My question is how does the system do that?

A 64 bit OS can run 32 bit apps by default because the OS has emulators that catch all 32 bit calls and translate them into native 64 bit calls.

But how does the 32 bit kernel in OS X do that with 64 bit?

  1. Hardware architecture virtualization? (if so, wouldnt this be slow as the conversion from 32 bit calls and memory addresses to 64 bit is a lot more intensive?)
  2. Hybrid architecture design (i.e the kernel is designed with some 64 bit elements mixed in with the mostly 32 bit design?)

Apple docs and support doesnt seem to have anything specific on this. I am just curious!

share|improve this question
    
add comment

2 Answers

up vote 2 down vote accepted

Note, some of the info in this answer was cribbed from here:

Mac OS X 10.6 Snow Leopard was the last OS to support 32 bit CPU architectures, like the Core Solo, and Core Duo (not Core 2 Duo) processors. Note that it's entirely possible to have a 64bit processors like the Core 2 Duo, and still have a 32bit EFI firmware, so the CPU alone isn't the sole indicator of your systems capabilities in this respect.

This is how you end up the situation of having a 32 bit kernel, that is held back by the EFI, running on a 64 bit CPU, which is capable of running a 64bit application stack so long as it is not dynamically loading any kernel modules etc. The application isn't wholly tied to the kernel, and is capable is independent running in a different state to the kernel if required. Same way an app can run 32bit on a 64bit kernel...

To be honest, the number of people with a Core 2 Duo or above but with a 32bit EFI are relatively limited, and you are unlucky if you are one of those people that has, say a Macbook from 2007/8 when this was common. The 64bit EFI was introduced in a staggered way across the range so it's not simple to pinpoint what date it was common across all formats.

You can check your machine’s EFI by entering the following command in Terminal:

ioreg -l -p IODeviceTree | grep firmware-abi

It will return either “EFI32″ or “EFI64.”

In addition, some perfectly capable machines still only boot into 32bit mode kernels, even when they are capable, although you can force a 64bit kernel by holding down the 6 and 4 keys on boot.

OS News notes that only Macs with a 64-bit EFI are able to boot the 64-bit Snow Leopard kernel and kexts; an artificial limitation imposed by Apple, even though a 32-bit EFI can boot a 64-bit kernel “just fine.”

What’s worse is that even if your MacBook (non-Pro) has a 64-bit EFI, it will only be able to boot the 32-bit version of Snow Leopard because of a limitation that Apple imposes on MacBooks. The biggest roadkill on Route 64 is the original Mac Pro (which was discontinued January 8, 2008) it won’t be able to boot the 64-bit kernel and drivers either.enter link description here

share|improve this answer
    
Yeah I figured as much. Thanks again! –  Gautham C. Feb 10 '12 at 21:09
add comment

The 32 bit versus 64 bit is probably more of a question for the microprocessor manufacturer:

http://search.intel.com/default.aspx?q=64+bit&c=en_US&method=text&input-submit=Search

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.