Jump to content
ludacrisvp

[HOWTO] Boot Macs with Intel Chipset in AHCI Win7 Vista XP Linux

422 posts in this topic

Recommended Posts

Advertisement
BSOD would seem to indicate that the mode has been changed from IDE to something.... it may have changed to RAID (doubtful) ... Most likely it did change to AHCI but its entirely possible that the changes made in Windows did not apply properly. Windows does NOT instantly save all changes to registry right away and therefore they may not have been saved for the next boot. It's possible that in some of the Win7 installs that the Microsoft provided AHCI basic driver is not included, I believe the file name for the driver if it is on your system is msstorahci.sys or something close to that. (not in windows ATM in Lion)

 

So try all the registry changes again and either use the GUI or the v1.1 script to attempt the mod again.

Make the changes and then surf the net a bit then reboot and see if they stayed changed then reboot to OSX and mod away.

 

 

Updated 1st post finally

 

If you want TRIM support in OSX Snow Leopard go here for the application to enable it (Faster SSD performance in OSX)

TRIM Enabler

 

BSOD would seem to indicate that the mode has been changed from IDE to something.... it may have changed to RAID (doubtful) ... Most likely it did change to AHCI but its entirely possible that the changes made in Windows did not apply properly. Windows does NOT instantly save all changes to registry right away and therefore they may not have been saved for the next boot. It's possible that in some of the Win7 installs that the Microsoft provided AHCI basic driver is not included, I believe the file name for the driver if it is on your system is msstorahci.sys or something close to that. (not in windows ATM in Lion)

 

So try all the registry changes again and either use the GUI or the v1.1 script to attempt the mod again.

Make the changes and then surf the net a bit then reboot and see if they stayed changed then reboot to OSX and mod away.

 

 

Updated 1st post finally

 

If you want TRIM support in OSX Snow Leopard go here for the application to enable it (Faster SSD performance in OSX)

TRIM Enabler

 

Hi Luda, I am the one on the macrumors thread that tried it out and hit the BSOD that I wasn't able to get out of. Am happy to help and test if I can - 2011 17" i7 model.

Share this post


Link to post
Share on other sites

I also tried i5 script and got a BSOD. Just a blue screen without error code saying windows had to stop (don't think it's the usual BSOD that appears when msahci is not enabled). I didn't have much time to test so I restored the MBR. If it's useful, I can try again and give you more details. Juste let me know.

Share this post


Link to post
Share on other sites

So we've been trying a lot over here. Also the grub method.

We've created three partitions:

100MB "SYSTEM RESEVERD"

4GB windows install disk (extraction of install iso + bootsect.exe)

al other data is the partition to install windows on.

 

We've installed GRUB, looked at lspci which gave us an IDE controller.

We've done a setpci:

<pre>setpci -d 8086:1c01 90.b=60</pre>

Than we have a SATA controller. We start the installation of Windows and no disk is detected. We try to use the Intel RST drivers and get a blue screen, IRQL NOT EUQUAL OR LESS. We now think we need to setpci some more, we just have no idea where, because we're not smart enough :D

 

anybody who understands the INTEL specs better that wants to help us?

 

--edit--

Oh, I have a Macbook pro 2011, 13,1" with a corsair F120 SSD.

Share this post


Link to post
Share on other sites

On a quick note I have never been able install a windows system using ahci mode. I have always installed as legacy mode then did the conversion. John and I went back and forth about trying to install that way but were never able to come to a solution. That's what it looks like to me that you are attempting to do.

Share this post


Link to post
Share on other sites
On a quick note I have never been able install a windows system using ahci mode. I have always installed as legacy mode then did the conversion. John and I went back and forth about trying to install that way but were never able to come to a solution. That's what it looks like to me that you are attempting to do.

 

I only tried that because the conversion doesn't work on a MBP 2011... it gives the same blue screen. I think we need to set more or differently on this chipset, just don't know what :D

Share this post


Link to post
Share on other sites

Did anyone figure out how to get the Apple Boot Camp Control Panel back after applying this patch?

 

I wish I had used the non-GUI version of this script so that I would have a backup of my MBR. I still don't know if I could get back into Windows in IDE mode after reversing the patch, though. That would temporarily let me change my Boot Camp preferences.

 

For reference, I get the "startup disk preferences could not be accessed" error.

 

I didn't realize until a couple days ago that this patch had caused that error.

Share this post


Link to post
Share on other sites

As I had some time today, I tried again on my MBP 15" 2.2 2011, to be sure I didn't miss anything. After enabling AHCI with script version 1.1, Windows fires the usual BSOD with error 0x0000007b. I tried to repair the installation. But even when giving Intel drivers, the installer was unable to see the disk. Hope you'll be able to figure out the changes to make to MBR to have AHCI enabled on these new MBP.

Share this post


Link to post
Share on other sites

I have been unsuccessful in enabling Windows ACHI via ACHI Enabler nor achi.sh script.

 

Due to stuffing three 3TB drives in bays 1-3, I had to partition my lone 1TB drive into two in order to have both Windows XP and Windows 7 (x64) installed (there is no known way to get a 3TB to have both an OS X and Win install at this time).

 

Since I already had WinXP installed on a GPT format that I wanted to preserve, I had to keep the GPT partitioning scheme over an MBR scheme (WinClone refused to restore to the WinXP image to a non-GPT drive).

 

Perhaps this is why all methods to run the ACHI script have failed, with the former not able to detect an NTFS Volumes and the latter stating it could not find any MBR, yes?

 

Are there any other options to get ACHI enabled on my Win7 install?

 

2008 Mac Pro 2x2.8, 10.6.7, RocketRAID 2642, 3x3TB WD + 1x1TB WD.

Share this post


Link to post
Share on other sites

First of all, kudos to the people that brought this (relatively) easy way of enabling ahci under windows.

 

That said, I was so far successful with the GUI Application, (everything very clear and simple) as I now can finally "see" my freshly installed LG bluray burner under Win7 (using a Mac Pro early 2008).

 

What makes me still wonder is the actual link speed of my startup HDD as reported by windows and mac os x. Don't know if that is related:

 

- Under OS X, all my 4 HDDs are reported with 3 Gigabit, the Bluray Burner with 1,5 GBit.

 

- Under windows, all HDD drives except the startup disk report still 3 GBit, while the startup disk only reports 1,5 GBit! Thats the same drive which runs with 3 Gbit speed in OS X. I already installed the latest intel rapid storage drivers. Everything else seems quite okay.

 

Anybody any idea why this happens? TIA :(

Share this post


Link to post
Share on other sites

Is there at least one person that was able to patch the MBR to force AHCI on the latest generation MacBook (Pro) 2011 with HM65 "sandybridge" Core i5 / i7 Chipset?

 

@Johnsock, ludacrisvp: Are you willing to release some more information about the patch? For example the assembler code of the patched bytes and a reference to the Intel AHCI documentation how to pragmatically switch the chipset from IDE to ACHI? This would certainly allow others (including myself) to contribute in a more efficient way.

 

Update:

 

Actually johnsock has already posted the analysis here: http://www.insanelymac.com/forum/index.php...26089&st=71

 

And the reference can be found in the ICH10 datasheet:

http://www.intel.com/Assets/PDF/datasheet/319973.pdf

Page 516

 

In the Notes it says:

 

3. AHCI mode may only be selected when MV = 0

MV = Map Value (1:0 read only)

 

So maybe the MBR patch should verify a) that MV = 0 and B) the value at offset 90 after it has been set. For debugging purpose the value could be written to the display.

Share this post


Link to post
Share on other sites
Is there at least one person that was able to patch the MBR to force AHCI on the latest generation MacBook (Pro) 2011 with HM65 "sandybridge" Core i5 / i7 Chipset?

 

@Johnsock, ludacrisvp: Are you willing to release some more information about the patch? For example the assembler code of the patched bytes and a reference to the Intel AHCI documentation how to pragmatically switch the chipset from IDE to ACHI? This would certainly allow others (including myself) to contribute in a more efficient way.

 

Update:

 

Actually johnsock has already posted the analysis here: http://www.insanelymac.com/forum/index.php...26089&st=71

 

And the reference can be found in the ICH10 datasheet:

http://www.intel.com/Assets/PDF/datasheet/319973.pdf

Page 516

 

In the Notes it says:

 

3. AHCI mode may only be selected when MV = 0

MV = Map Value (1:0 read only)

 

So maybe the MBR patch should verify a) that MV = 0 and ;) the value at offset 90 after it has been set. For debugging purpose the value could be written to the display.

 

The link to johnsocks comment isn't working? You have it working now? And i yes: what exactly did you do? :P

Share this post


Link to post
Share on other sites

I could speculate that apple has changed something with the efi boot process that's hampering our attempts. This may have been an intentional change to reduce the number of osx86 machines out there since the lion boot is way different.

Share this post


Link to post
Share on other sites

This isn't under 'active' development at this point in time since neither john nor I have any hands on access to any of the new 2011 sandybridge MacBook / Pro. So we can only make suggestions at this point to users and since all indications are the chipset changes mode with the same method and that apparently doesn't work anymore we will have to devise a different method. We might need to go back to grub or figure out how to get windows to boot in efi mode.

Share this post


Link to post
Share on other sites
This isn't under 'active' development at this point in time since neither john nor I have any hands on access to any of the new 2011 sandybridge MacBook / Pro. So we can only make suggestions at this point to users and since all indications are the chipset changes mode with the same method and that apparently doesn't work anymore we will have to devise a different method. We might need to go back to grub or figure out how to get windows to boot in efi mode.

 

What would your suggestion be? As far as I know the grub1 loader (stage1 patch) does exactly the same as the MBR patch does.

 

Booting Windows with EFI requires UEFI 2.x and MBP comes with EFI 1.1. So I believe that idea is unrealistic.

Share this post


Link to post
Share on other sites

The grub patch sets a different code for the esb2 chipset from the Mac pro. I will mod it to the current version when I have the chance, going into work right now.

I was just putting the idea out there since they are working on efi emulation in the hackintosh world (xpc and [url=&quot;http://www.insanelymac.com/forum/topic/279450-why-insanelymac-does-not-support-tonymacx86/&quot;]#####[/url]) it might be possible depending on what version of efi emulates. I know windows really wants uefi 2 or higher so who knows what we can do with it.

Share this post


Link to post
Share on other sites
>The grub patch sets a different code for the esb2 chipset from the Mac pro.

 

What grub patch are you exactly referring to? The one that is in stage1 (in the boot.zip) as well as the patch file from here: http://boeglin.org/static/macpro/grub-0.97...tage1_new.patch

 

Does exactly the same as the patched MBR.

 

In the Notes it says:

 

3. AHCI mode may only be selected when MV = 0

MV = Map Value (1:0 read only)

 

So maybe the MBR patch should verify a) that MV = 0 and cool.gif the value at offset 90 after it has been set. For debugging purpose the value could be written to the display.

 

Not exactly, it does look that way to average user however it sets the pci code a bit differently. For one the code for AHCI that its using is for the Mac Pro's ESB2 chipset and the PCI table says its code is an 8bit register with the hex value of 0x40 being written to it for AHCI to become enabled, or 0x80 for RAID enable - however since there is no option ROM RAID fails to work. see this line in the stage1 "+ mov $0x40,"

 

This section also seems to indicate that it is changing the map value that you mentioned to 0 to allow AHCI to be selected. I am not sure if john included this section in his MBR patch or not.

/* set the mode to zero */

- movb $0, -1(%si)

+# movb $0, -1(%si)

 

While the newer i5/i7 chipsets use a different code at the same offset but have a 16bit register their code is 0x60 for AHCI.

 

I have made a test copy of the stage1 file with the sandybridge modifications made to it. try it out and let me know.

You will need to know how to properly install GRUB and use this stage1 file from the attached ZIP, instructions are in the first post for using grub.

 

stage1_test_mod_for_sandybridge.zip

Share this post


Link to post
Share on other sites

I made a few tests this week-end using grub2 and setting manually register to 0x60 at offset 90. When listing devices with lspci, the IDE controller 1c01 changes to a SATA controller with device id 1c03. But Windows can't seem to find drivers for it. I have tried the repair option giving manually drivers extracted from Intel storage. With no luck. I'll try your modified stage1 file asap.

Share this post


Link to post
Share on other sites

Thanks for your modifications. I tried the stage1 file above. Unfortunately, alhough Windows redetected my disks on first start, controller is still in legacy mode (device id 1c01). If I can be of any help, please let me know. I have prepared an old disk in MBR with only Windows and grub on it.

Share this post


Link to post
Share on other sites

>ludacrisvp

That is actually the first thing I tried, writing a word 0x60 to 0x90. But a 0x40 would work as well. The difference between 0x40 and 0x60 is explained in the Intel doc:

 

http://www.intel.com/Assets/PDF/datasheet/319973.pdf

Page 516

 

5

SATA Port-to-Controller Configuration (SC) — R/W. This bit changes the number of

SATA ports available within each SATA Controller.

0 = Up to 4 SATA ports are available for Controller 1 (Device 31 Function 2) with ports

[3:0] and up to 2 SATA ports are available for Controller 2 (Device 31 Function 5)

with ports [5:4].

1 = Up to 6 SATA ports are available for Controller 1 (Device 31 Function 2) with ports

[5:0] and no SATA ports are available for Controller 2 (Device 31 Function 5).

 

Basically 0x40 is AHCI with 4 SATA ports, 0x60 is AHCI with 6 SATA ports but both values successfully switch the controller into AHCI. Also setting a byte instead of a word as the original MBR does has the same effect on the cougar point.

 

I'm using 0x60 because that is what the controller is set to on MacOSX.

 

>+# movb $0, -1(%si)

This part has absolutely nothing to do with the controller, it's just a hack to save some bytes so there is enough space for the Macbook code.

 

 

-- Call for pre 2011 MBP owners --

 

If anybody with a pre-2011 MBP has some time and interest to do some testing on Windows Vista/Windows 7 please let me know. I'm trying to figure out what the has changed between the controller's / BIOS behavior between MBP 8.3 and previous versions.

 

Basically I want to see what the PCI registers are after the controller has been manually switched from IDE to AHCI. I have all these results with the 2011 MBP but have no access to an older version.

 

Thank you. Please pm me with your email address and/or live messenger/skype/gmail id.

Share this post


Link to post
Share on other sites

I hadn't seen that patch diff file prior to your post so I only looked at it for a few mins and the code seemed to suggest that it was setting something to zero and the only logical thing was the MV value you had mentioned. Using the 0x40 code on the newer MacBooks the i5 i7 last gen did not work we had tried this already and that's when John and I figured out it needed to be 0x60 to work. Perhaps we could try the raid mode of 0x80 and see what we get... If we could at least confirm that we are able to change the mode and windows can see the changes it's a step in the right direction. The datasheet seems to indicate that there are two sata controllers in this chipset and it gives 4 ports to the first controller and 2 to the second when in one mode and all 6 to one and 0 to the other in another mode. It's possible that the disk is connected to the second controller and we are disabling access to it. Just kinda grasping at some possible straws.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×