How to know my kernel extensions are 64-bit ready?

Is there an easy way to tell whether all my kernel extensions will "survive" booting with a 64 bit kernel? I can of course try the "6-4 finger boot", but maybe there is a piece of hardware I use infrequently and that won't work when I use it in a month, leaving me to wonder what went wrong.

I can see a list of extensions in System Profiler > Software > Extensions, with 8 of them listed as not "64-bit (Intel)", but 5 of them are "Pseudoextensions" with a Load Address "built-in to the kernel", and the 3 others are CHUD-related and will probably be gone once I update Xcode? Is that enough to conclude that I won't have problems? Or are there extensions that are not loaded now and that I can test somehow?


Solution 1:

As far as I know, System Profiler won't display information for any .kext's that are being loaded and are located somewhere else besides the /System/Library/Extensions/ folder.

To get comprehensive information about the kernel extensions which are currently loaded and in use on your Mac, you can use the kextstat command line tool.

Open up the Terminal application (in the /Applications/Utilities/ folder), type the following at the prompt, and then hit return:

 kextstat

You will get a large list of all the loaded kernel extensions. You'll primarily want to focus on the bundle identifiers of the loaded .kexts. (That's the backwards domain name string such as "com.apple...."). You should be able to eliminate the ones that include "com.apple", as those will be Apple's and should have a K64 version. Once you've gotten rid of those, you'll then need to go over the remaining ones to make sure they are built as universal K32+K64 versions, or whether you may need to make sure you have the latest updates.

For example, after eliminating all the Apple kexts on the output I get, I have the following kexts listed. Since I switched to K64 a year or so ago, all of these are in order so everything is fine.

MacPro:~ mdouma46$ kextstat
Index Refs Address          Size   Wired  Name (Version) <Linked Against>
73  0 0xffffff7f8111a000 0x8000 0x8000  com.AmbrosiaSW.AudioSupport (3.2) <72 5 4 3 1>
81  0 0xffffff7f811bf000 0x9000 0x9000  jp.plentycom.driver.SteerMouse (4.0.2) <55 29 24 5 4 3>
105 0 0xffffff7f81499000 0x5000 0x5000  com.Cycling74.driver.Soundflower (1.5.2) <72 5 4 3>
115 0 0xffffff7f814bf000 0xd1000 0xd1000 com.vmware.kext.vmx86 (3.1.2) <7 5 4 3 1>
116 0 0xffffff7f81590000 0xc000 0xc000   com.vmware.kext.vmci (3.1.2) <5 4 3 1>
117 0 0xffffff7f8159c000 0x7000 0x7000  com.vmware.kext.vmioplug (3.1.2) <29 24 5 4 3 1>
118 0 0xffffff7f815a3000 0xa000 0xa000  com.vmware.kext.vmnet (3.1.2) <5 4 3 1>
119 0 0xffffff7f815ad000 0x2000 0x2000  com.nvidia.CUDA (1.1.0) <4 1>

Solution 2:

kextfind

The kextfind utility locates and prints information, or generates reports, about kernel extensions (KEXTs).

Examples

The following command searches /System/Library/Extensions for KEXTs that do not include the x86_64 architecture:

kextfind -not -arch x86_64

An extended search, to include the two paths most commonly used for installation:

kextfind -f /Library/Extensions -e -not -arch x86_64

Other directories

KEXTs can also be installed in ROM or inside an application bundle, but kextfind can not search recursively.

In the Leopard era there was a suggestion that KEXTs might be found in the /Library/StartupItems area. As SystemStarter is deprecated, so it may be reasonable to omit this area when using kextfind.

Manual pages

Users of OS X can view the current manual page in Terminal. In a web browser, go to:

  • x-man-page://8/kextfind

In Mac OS X Developer Library the 2009 edition of the page is outdated.

Thanks

To ghoppe for raising awareness of kextfind.

Solution 3:

Use the file command.

Example:

$ cd /System/Library/Extensions/KeyspanUSAdriver.kext/Contents/MacOS
$ file KeyspanUSAdriver 
KeyspanUSAdriver: Mach-O universal binary with 2 architectures
KeyspanUSAdriver (for architecture x86_64): Mach-O 64-bit kext bundle x86_64
KeyspanUSAdriver (for architecture i386):   Mach-O object i386

Notice that it has both x86_64 and i386 architectures.