Jump to content

AHCI or RAID in bootcamp (bios emulation mode) ?

1 post in this topic

Recommended Posts



I've been looking for a solution to setup a raid system in my mac pro that would work equally in Linux, Windows and OS X.


the ESB2 southbridge supports 3 different modes:

- Legacy IDE (as PCI vendor id 2680)

- AHCI (as PCI vendor id 2681)

- RAID (as PCI vendor id 2682)


It seems that when the system is booted, AHCI mode is used (I checked the status in rEFIt's efi console), and Mac OS X also reports that it's using AHCI mode.


Unfortunately, when booting Linux or Windows through the bios emulation, the ESB2 is switched back to Legacy IDE mode, so you cannot use the RAID features of the board.


While reading through the ESB2 specification (http://www.intel.com/design/chipsets/datashts/313082.htm) it seems that AHCI mode supports RAID 0 and 1, and RAID mode supports RAID 0, 1 and 5. but RAID mode also requires an "Option ROM" to be on the mainboard. Specification also states that it is possible to switch the chipset's mode, by just writting to offset 0x90 of the ide controller PCI configuration space (the PCI device at address 00:00:1f.2).


I confirmed this mode switching under Linux, using the setpci tool to write to the config space (the vendor id is itself available at offset 0x02 of the same space).


Eventually, the goal would be to be able to set up a RAID 5 array that would be accessible from both Windows and Linux (don't know if OS X would support it, as it is not provided as a standard feature, but I only use OS X for firmware updates anyways)


The question I still have is : what about the "Option ROM" ? is it only used for array configuration ? In which case Linux and Windows can achieve the same, or is it really necessary for the array's "sanity" ?


Then, my guess would be that Apple's bios is responsible for setting this controller mode (as AHCI and RAID mode require specific driver from intel, to be loaded from a floppy at windows installation*, and the Mac Pro does not have a floppy drive, or maybe just to have another excuse to claim how cooler Mac OS X is ...)


*: actually, that's just the "official way". you can also slipstream the driver in your installation CD. And Vista supports "F6 loading" from a USB key or CD as well, not only from floppy anymore. And the driver is included in the linux kenel for some versions now.


The options I see to restore the full fearured behaviour would be:


a) patch a bootloader (like grub or lilo) to write to the PCI config space, and use this bootloader to boot all your bios emulated OSes. Problem is that these bootloader uses the BIOS to access the hard drives, so I don't know how safe it is to switch the controller mode outside of the bios.


B) patch the apple's bios emulation layer so that it does not set the controller to Legacy IDE mode. But here, I don't know yet how to read and write to the EFI firmware ... and I'm not even talking about reverse engineering it (though we already know all the values to look for).


Any comment or hints about this ?

Link to comment
Share on other sites


  • Create New...