I know there is another thread running concerning itself with the poor performance of SATA under Boot Camp, but much of the discussion wasn't technical in nature. I would like to focus this thread on the technical aspects preventing the drives from reaching their ultimate performance potential.
I have spent a few days researching SATA, and how it is handled under Windows, especially Intel's implementation. Intel is pushing a standardized controller interface called AHCI. AHCI does support legacy PATA emulation. In WinTel platform, it is a requirement of the BIOS to configure the AHCI device properly. The AHCI PCI device will present different PCI subcodes depending if it is running in PATA or native mode. These PCI subcodes are used to choose the appropriate driver at boot time.
For best performance, SATA wants to run in native mode which, on the Mac Pro platform, means running the controller device in AHCI mode. AHCI fully supports DMA as well as Native Command Queuing (NCQ). Combining these two technologies give the best performance.
The PATA emulation can support DMA, depending on the actual BIOS implementation. PATA can not support NCQ.
With Boot Camp, Apple is providing a BIOS layer on top of EFI, the new standard for low-level PC firmware. This layer is called a CSM (Compatibility Support Module). I believe the CSM is not programming the device to enter AHCI mode. Also, the CSM is not providing anything other than Programmed I/O (PIO or non-DMA) in their PATA emulation support.
How do we work around this? I don't know. I am hoping to bring others into this discussion to see if we can figure something out. Considering Apple released Boot Camp 1.1 with the same flaw, I don't believe we can expect them to resolve this issue soon.
Putting the device in AHCI mode may present more difficult problems for Apple. They will have to change their CSM to support loading the boot sector using AHCI instead of PATA protocols.
There is one other thing to note, when you boot with device in AHCI mode, and then install Windows, you must install a 3rd party driver provided by Intel at installation time. Pressing the F6 key early on in the install process, inserting a floppy, which contains the driver, and then choosing the driver for installation. The CSM will have to support USB floppies (I have not tested to see if it does, yet). It also means that any user that currently has Windows installed will have to reinstall Windows once we determine how to put the device in AHCI mode.
If we were willing to give up NCQ, it might be easier for Apple to extend their CSM to include better PATA emulation. We may be limited to 100MB/s, or 133MB/s at best. This is more than enough bandwidth to support any single drive.
In a later post, I will list all of the steps that I have tried in enabling any form of SATA DMA on the Mac Pro.
To finish off this post, I ask if you have been following other similar threads on other sites, please bring their attention to this thread. I would really like to centralize all discussion, work and knowledge in one place.
Brian Williams
I have spent a few days researching SATA, and how it is handled under Windows, especially Intel's implementation. Intel is pushing a standardized controller interface called AHCI. AHCI does support legacy PATA emulation. In WinTel platform, it is a requirement of the BIOS to configure the AHCI device properly. The AHCI PCI device will present different PCI subcodes depending if it is running in PATA or native mode. These PCI subcodes are used to choose the appropriate driver at boot time.
For best performance, SATA wants to run in native mode which, on the Mac Pro platform, means running the controller device in AHCI mode. AHCI fully supports DMA as well as Native Command Queuing (NCQ). Combining these two technologies give the best performance.
The PATA emulation can support DMA, depending on the actual BIOS implementation. PATA can not support NCQ.
With Boot Camp, Apple is providing a BIOS layer on top of EFI, the new standard for low-level PC firmware. This layer is called a CSM (Compatibility Support Module). I believe the CSM is not programming the device to enter AHCI mode. Also, the CSM is not providing anything other than Programmed I/O (PIO or non-DMA) in their PATA emulation support.
How do we work around this? I don't know. I am hoping to bring others into this discussion to see if we can figure something out. Considering Apple released Boot Camp 1.1 with the same flaw, I don't believe we can expect them to resolve this issue soon.
Putting the device in AHCI mode may present more difficult problems for Apple. They will have to change their CSM to support loading the boot sector using AHCI instead of PATA protocols.
There is one other thing to note, when you boot with device in AHCI mode, and then install Windows, you must install a 3rd party driver provided by Intel at installation time. Pressing the F6 key early on in the install process, inserting a floppy, which contains the driver, and then choosing the driver for installation. The CSM will have to support USB floppies (I have not tested to see if it does, yet). It also means that any user that currently has Windows installed will have to reinstall Windows once we determine how to put the device in AHCI mode.
If we were willing to give up NCQ, it might be easier for Apple to extend their CSM to include better PATA emulation. We may be limited to 100MB/s, or 133MB/s at best. This is more than enough bandwidth to support any single drive.
In a later post, I will list all of the steps that I have tried in enabling any form of SATA DMA on the Mac Pro.
To finish off this post, I ask if you have been following other similar threads on other sites, please bring their attention to this thread. I would really like to centralize all discussion, work and knowledge in one place.
Brian Williams