Jump to content

Dell D820, SSD support


dutchcow

Recommended Posts

  • Replies 31
  • Created
  • Last Reply

Top Posters In This Topic

Will do. I booted into my live Lion with the previous one, and I think it sort of works. Check this out:

 

 

sh-3.2# kextstat | grep -i ahci
   54    1 0x11ff000  0xb000     0xa000     com.apple.iokit.IOAHCIFamily (2.0.8) <5 4 3 1>
   55    0 0x1a1c000  0x1b000    0x1a000    com.apple.driver.AppleAHCIPort (2.3.1) <54 14 5 4 3 1>
 
The kexts seem to be loaded right?
 
sh-3.2# lspci -s 00:1f.2 -nnvvxxx | grep -i sata
00:1f.2 IDE interface [0101]: Intel Corporation 82801GBM/GHM (ICH7-M Family) SATA Controller [iDE mode] [8086:27c4] (rev 01) (prog-if 80 [Master])
 
That didn't change, and system profiler can't find any SATA controller. I will reboot into the new one and see how that goes. I read somewhere that what they do is address the SATA controller on 0x80 and store it at 0x40 or whatever that means. I will try and find those forum posts later (should've bookmarked those).
 
Booting in the new one doesn't differ from the first.
 
I also see a "applesmbpci failed to get provider" or something comes by fast too. But that could be normal.
 
Booting with the stock DSDT from USB I can set the controller in SATA mode with success in OSX, but after about 10 seconds the system freezes and doesn't recover. I was able to verify the controller indeed switched using setpci in OSX terminal. Hope this helps.
Link to comment
Share on other sites

Yeah, I think my best bet is to make a grub .img file that can execute the setpci commands and then chainload chameleon. That bootdisk found inside that $25 software can actually do it, but I'm not paying money for a suite of software I only need to use 1% of. I've tried looking everywhere for the old free version of it. It would be a perfect solution, could install grub in the EFI, which sets the controller in sata mode and then loads chameleon or an installer if I need to reinstall. Making a chainloading mini grub isn't the problem, the dos apps they use to change the pci registers are very hard to find.

 

Another option is to figure out how Windows gets access to TRIM and NCQ, because I checked the device id in windows and its also still on *4 and not *5 (sata mode) yet TRIM and NCQ work, verified with fstool. But figuring that out isn't my strong point. I'm a unix guy really.

 

I don't know if this is helpful for DSDT modding, but this is what they do to make AHCI work on ICH7-M:

 

ahci.bat:

:: Based off Coreboot i82801gx AHCI SATA code http://tiny.cc/cbahci
:: 
:: Enable BARs 
setpci -s 0:1f.2 4.w=0007

:: Allow both Legacy and Native mode
setpci -s 0:1f.2 9.b=8f

:: set interrupt line.Interrupt Pin is set by D31IP.PIP
setpci -s 0:1f.2 3c.b=a

:: set timings
setpci -s 0:1f.2 40.w=A307
setpci -s 0:1f.2 42.w=A303

:: sync DMA
setpci -s 0:1f.2 48.b=1
setpci -s 0:1f.2 4a.b=1

:: Set IDE I/O Configuration 
setpci -s 0:1f.2 54.l=3002

:: Set Sata Controller Mode. 
setpci -s 0:1f.2 90.b=40

:: Port 0 and 4 enable
setpci -s 0:1f.2 92.b=1011

:: SATA initialisation register
setpci -s 0:1f.2 94.l=4a000180

:: SATA initialisation sequence
setpci -s 0:1f.2 a0.b=40
setpci -s 0:1f.2 a6.b=22
setpci -s 0:1f.2 a0.b=78
setpci -s 0:1f.2 a6.b=22
setpci -s 0:1f.2 a0.b=88
setpci -s 0:1f.2 a4.l=1b1b1212
setpci -s 0:1f.2 a0.b=8c
setpci -s 0:1f.2 a4.l=121212AA
setpci -s 0:1f.2 a0.b=0
setpci -s 0:1f.2 3c=0
setpci -s 0:1f.2 94.l=c4a000180

 

autoexec.bat:

echo off
echo ICH7M/ICH8M: 27c48086/28288086 = IDE, 27c58086/27298086 = AHCI
echo ICH7M/ICH8M: original sata PCI ID. Visually confirm it is 27c48086/28288086 (IDE)
setpci -s 0:1f.2 0.l

:: setup PCI Configuration space. You'll need to find free space in PCI Configuration Space to allocate to
:: Use PCI Scope Trial to easily identify free space  

:: register 4, bit 1: Memory space enable (for AHCI)
:: Must be done while in IDE mode (register 90=0)
setpci -s 0:1f.2 4.b=2:2

:: Register 90: 0x00=IDE, 0x40=AHCI, 0x80=RAID. Set it to AHCI + non-combined. 
setpci -s 0:1f.2 90.b=40

call ahcipci.bat

:: Register 94: set the SCRAE bit 9
:: setpci -s 0:1f.2 94.w=200:200

:: Register 9: set pci_class_prog=0x01
setpci -s 0:1f.2 9.b=1

:: Register a: set pci_class_device=0x06
setpci -s 0:1f.2 a.b=6

:: Switch off, then on the sata port
setpci -s 0:1f.2 92.w=0000
setpci -s 0:1f.2 92.w=1011

echo Visually inspect output below. Want a "1" on the left side to indicate a device was found
setpci -s 0:1f.2 92.w

echo ICH7M/ICH8M AHCI FIX APPLIED
echo ICH7M/ICH8M new sata PCI ID. Visually confirm it is 27c58086/27298086 (AHCI)
setpci -s 0:1f.2 0.l

:: quirk: Required a hardset to enable AHCI memory space
setpci -s 0:1f.2 4.b=7

:: rescan pci-bus
lspci > nul

:: Chainload operating system
:: grub --config-file="menu.xp"
:: Or for Vista/Win7
:: grub --config-file="menu.w7"
Link to comment
Share on other sites

Hrm.. When executing "setpci -s 00:1f.2 90.b=40" from the grub prompt and then doing a lspci shows the controller in sata mode, but I can't see any disks. When I boot the system freezes, ctrl-alt-del can reboot though, previously I had to hold down the power button. Any command inside grub that requires loading files from the grub folder on the hdd results in a freeze too, like the help command.

Link to comment
Share on other sites

Some more 'technical' information on this 'patch'.

 

http://tlasd.wordpress.com/2009/11/06/intel-sata-chipsets-and-ahci/

http://mjg59.livejournal.com/76062.html

 

I really think we need a DSDT wizard to make this work. I'm def. willing to chip in some money as this will not only benefit me but anyone with a ICH7/8-M chipset without AHCI mode in the BIOS. The speed gain even with normal drives can be quite a lot. Let alone SSDs. Getting NCQ to work will be a major boost, TRIM would be super sweet for us SSD users.

 

The "quirks.ich_force_ahci=1" kernel flag for Linux is very interesting and I wonder if its possible to port that, or create a very tiny loader that loads a linux kernel, sets the sata mode and then boots into chameleon.

Link to comment
Share on other sites

Many people also succeed though. I mean if I can toggle the thing into SATA mode with some simple commands, surely there must be a way to either put the fixes in the DSDT or create some ramdisk that can execute them without crashing as is the case now, even when booting from external media, the system freezes. This can also have todo by the lack of AHCI address space, which need to put in the DTST or via setpci commands too. The speed increase right now is a lot already but with NCQ and TRIM it will be faster and better for the lifetime of my SSD.
 
For the record I'm attaching my Linux and BIOS extracted unmodified DSDT to this post.

Linux_BIOS_DSDT.zip

Link to comment
Share on other sites


×
×
  • Create New...