this details how i got the disks (SATA and IDE) working in my
asus P5B Deluxe motherboard.
there seems like a lot of misinformation and voodoo involved in getting working SATA disk support in the various P965 chipset boards. i just bought one (actually two, but i'm returning one of them) and have been wading through all the ICH8 ICH8R posts and patches and work-arounds and i found that a lot of them didn't work for me so i decided to start from scratch.
<noob info>
the big picture is that apple's kext's are designed to specifically recognize the hardware/chipsets in the boxes that apple sells. they can support other hardware/chipsets too, but they will not recognize them unless you tell them how. virtually all of them have a little xml file inside the kext bundle called Info.plist. inside that file is a bunch of config-like info for the kext, including the device ID's of the hardware that kext will recognize. in order to get your hardware working with apple's kexts (assuming that they are able to support it at all) you have to edit that Info.plist to include a string that is the device ID for your hardware/chipset. finding the right device ID for your stuff can be challenging sometimes. if you are lucky you can google around or search here or on the osx86 wiki. another way is to search through the output of the ioreg command on your working osx system (see below).
</noob info>
so i have an
asus P5B Deluxe motherboard which has two disk controllers on it. One is the
Intel ICH8R and the other is the
JMicron JMB363. In among the voodoo in the various posts i have read lately, i found that the device ID for the JMicron chipset is
0x2363197B.
i saw a lot of device ID strings for ICH8 and ICH8R chipsets in many threads, but none of them were working for me. what i mean by that is that my sata ports were working, but they were showing up in the system profile under "Generic AHCI" so i knew that they weren't being specifically recognized and i assumed that they wouldn't get the maximum performance and reliabilty that way (but this assumption might be wrong...). but since they were showing up under generic, i figured that i had to be able to find their device ID's by doing an ioreg command. so here is what i did in terminal:
CODE
ioreg -l > /ioreg-out.txt
that spewed a lot of stuff into a text file in the root of my system disk called ioreg-out.txt. then i opened that text file in a text editor and searched for "SATA". and here is part of the relevant section that i found:
CODE
+-o SATA@1F,2 <class iopcidevice,="" registered,="" matched,="" active,="" busy="" 0,="" retain="" count="" 16="">
| | | | {
| | | | "IODeviceMemory" = [lot's a junk edited out]
| | | | "device-id" = <"!(">
| | | | "name" = "pci8086,2821"
| | | | "acpi-path" = "IOACPIPlane:/_SB/PCI0@0/SATA@1f0002"
| | | | "IOName" = "pci8086,2821"
| | | | "vendor-id" = <86800000>
| | | | "revision-id" = <02000000>
see where it says "name" = "pci8086,2821" and "IOName" = "pci8086,2821"? that's the stuff i needed to contstruct the device ID for the ICH8R chipset on my motherboard. you throw that stuff together like this:
start with 0x and then add what is after the comma (2821) and then throw away the pci and then add what is before the comma (8086) and you end up with ===>
0x28218086 which is, in fact, the correct device ID for the ICH8R chipset on my P5B deluxe mobo.
[read a much deeper and better explanation about device ID's
here.]
next step is to put those two device ID's into the right place in the right kexts so that osx will pay attention to them.
so i know from my reading that the kexts that matter in this case are:
Jmicron: /System/Library/Extensions/AppleVIAATA.kext
ICH8R: /System/Library/Extensions/AppleAHCIPort.kext
as far as i know, the appleVIAATA.kext does not really supply direct support for the Jmicron chipset (which is what supplies the IDE functionality for my motherboard). my assumption is that the IDE-related instructions for the Jmicron chipset are compatible with those in whatever VIA chipsets that apple is supporting. so adding the Jmicron device ID to the AppleVIAATA.kext works because of that compatibility.
here's the edit i did to /System/Library/Extensions/AppleVIAATA.kext/Contents/Info.plist
<key>VIA SATA Controller</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.driver.AppleVIAATA</string>
<key>Hardware Name</key>
<string>8237 SATA</string>
<key>IOClass</key>
<string>AppleVIAATARoot</string>
<key>IOPCIPrimaryMatch</key>
<string>0x2363197</string>
<key>IOProbeScore</key>
<string>1000</string>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
<key>Serial ATA</key>
<true/>
</dict>when i was in there, i noticed that there was a similar section in this Info.plist for a VIA PATA controller. i thought that maybe i should put the JMicron device ID in there because i was in fact doing this to enable support for my IDE devices which are actually PATA devices (1 old HD and my IDE DVD drive). i tried it both ways and the performance with the JMicron under VIA SATA was way better (xbench disk score 57 vs. 34). maybe that's because addressing the chipset in SATA IDE mode is faster than PATA IDE.
next up was the ICH8R fix. here is the edit i did to /System/Library/Extensions/AppleAHCIPort.kext/Contents/Info.plist
<key>ICH7MAHCI</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.driver.AppleAHCIPort</string>
<key>Chipset Name</key>
<string>ICH7-M AHCI</string>
<key>IOClass</key>
<string>AppleAHCI</string>
<key>IOPCIPrimaryMatch</key>
<string>0x28218086</string>
<key>IOProbeScore</key>
<integer>2000</integer>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
<key>Vendor Name</key>
<string>Intel</string>
</dict>
</dict>
some people have posted patches and instructions for changing the key and chipset name string above to ICH8 or ICH8R. i don't think it matters at all either way, but i chose not to do that. changing these IOPCIPrimaryMatch strings is not changing the code that is running inside the kext. it's just making the kext talk to your hardware instead of the hardware in the boxes that apple sells. the code in the kext is still addressing the chipset with ICH7 instructions. presumably, the reason this works at all with these ICH8* chipsets is because the ICH8* instruction set is a superset and backwards compatible with the ICH7 chipset. apple is likely to release new kexts at some point soon that support the ICH8 chipset and then there will be another section in the Info.plist for that chipset.
so after doing these two edits i then did the usual post-kext-modification stuff:
CODE
sudo chown -R root:wheel /System/Library/Extensions/AppleVIAATA.kext
sudo chown -R root:wheel /System/Library/Extensions/AppleAHCIPort.kext
sudo chmod -R 755 /System/Library/Extensions/AppleVIAATA.kext
sudo chmod -R 755 /System/Library/Extensions/AppleAHCIPort.kext
sudo rm /System/Library/Extensions.kextcache /System/Library/Extensions.mkext
and then after a re-boot this is what it looks like in System Profile:

the top two are JMicron SATA ports (one internal and one external). then there are the six intel ICH8R SATA ports (identified as how they are being seen and addressed by osx -- Intel ICH7-M AHCI). then there is the JMicron IDE port hosting my IDE disk and DVD drive.
in the BIOS of the P5B Deluxe, under Main / IDE Configuration, i have SATA configured as "Enhanced" and "AHCI". under Advanced / Onboard Devices Configuration / i have the JMicron SATA/PATA controller set to "Enabled" with the controller mode as "AHCI".
my xbench disk scores for my SATA disks (seagate barracudas) are in a range from 54 - 57. to me that seems slow for new SATA disks, but it is workable. if anyone knows a way to get those disk scores up, lay it on us.
ok, that was a big blab.
oao