Help - Search - Members - Calendar
Full Version: Darwin nForce4 ATA/SATA controller
InsanelyMac Forum > OSx86 Project > Hardware and Drivers > SATA/IDE Controllers
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21
bikedude880
Since I have so much free time, I decided to try and write a driver for the nForce series chipsets (nForce/nForce2/nForce3/nForce4) based on the AppleOnboardPCATA kext. This is only a test and I don't expect much to come out of it.

-------------------------------------------------------------

MeDevil has successfully figured out the core problem behind the "Device blocking bus" error. ATA/SATA is recognized, drives are UDMA enabled, and will work with most chipsets after the correct device id is added to the plist file (there are already several id's in there.)

Download link
tomtefar
Will give it a fly-by when I complete the install of my C2D box.

Btw, why not start with Hamlo's driver and try to fix that one??
macwanabe
Ok installed on Nforce 4 SLI board. It works in the sense that I can see ATA and SATA drives and access them. Speed seems a bit slower. Copy at 43 MB a second. I copied 4 GIG of files to SATA Drive on FAT32 Partition, dmg fail checksum when copied to SATA, data corruption still taking place. Hope this helps.
jape
Source please?

Do you have a nice idea? rolleyes.gif
AlainTox714
What i am running :
- mobo A8N-E with AMD64 X2 3800, ATI X1600, 3x ATA, 1x SATA disks.
- OSX_1048_AMD_SSE3.iso updated with OSX_1048_AMD_SSE3_PPF2, amd_1048_new.txt applied
- SecUpd2006-007Intel.pkg with secupd.txt applied

Boot fine apparently no problems but when i check in logs please see what i found:

kernel[0]: IOATAController device blocking bus.
kernel[0]: IOATAController device blocking bus.
mDNSResponder: mDNSPlatformRawTime: last_mach_absolute_time 066372A700000013
mDNSResponder: mDNSPlatformRawTime: this_mach_absolute_time 066364F700000013
kernel[0]: IOATAController device blocking bus.
kernel[0]: jnl: flushing fs disk buffer returned 0x3c
diskarbitrationd[57]: disk1s2 hfs 5F6A1098-CA22-3F01-983F-F60CB5527410 SATA /Volumes/SATA

Otherwise with small files <= 650MB the checksum is always the same.
With big files at the second try the checksum is diffrent.

MD5 (/Volumes/SATA/OPERATING SYSTEM - CD-DVD/Mac OS X 10.4.6 Retail Install DVD (PPC)/Mac OS X Install DVD.dmg) = ced07c1007caab786a185f0f7e148470

MD5 (/Volumes/SATA/OPERATING SYSTEM - CD-DVD/Mac OS X 10.4.6 Retail Install DVD (PPC)/Mac OS X Install DVD.dmg) = ffe439e2db58201747dfc352dc9433b2
jape
QUOTE
why not start with Hamlo's driver and try to fix that one??

Up so far, nobody has really written a kext from scratch (i.e. mine was based on nForceATA, hamlo's latest was a remix of different kexts with some custom pieces, and i dunno about this one).
But as I said, I think writing from scratch is useless unless we understand WHAT'S FAILING first. Cause If I were to write a new kext, I would end up copy VIAATA's, "Because that one should have worked ™".
So I think it's better to just try to edit current avalaible kexts ("try & crash & try again with a different value" procedure) than to lose time rewriting.
bikedude880
This one is based off of Apples older nForce kext. It sounds like timing is still off and a couple of access registers are not properly mapped. I will take a look at it when I have the time.
bikedude880
QUOTE(jape @ Dec 16 2006, 08:15 AM) *
Up so far, nobody has really written a kext from scratch (i.e. mine was based on nForceATA, hamlo's latest was a remix of different kexts with some custom pieces, and i dunno about this one).
But as I said, I think writing from scratch is useless unless we understand WHAT'S FAILING first. Cause If I were to write a new kext, I would end up copy VIAATA's, "Because that one should have worked ™".
So I think it's better to just try to edit current avalaible kexts ("try & crash & try again with a different value" procedure) than to lose time rewriting.


I'm currently working at getting the VIA ATA kext working with the SiS chipset and it has roughly the same source as the nForce ATA kext. I will try to output error message to the system log.
subramanyam
Good to know tat somebody is still trying to make this work.... biggrin.gif
bikedude880
QUOTE(subramanyam @ Dec 16 2006, 07:17 PM) *
Good to know tat somebody is still trying to make this work.... biggrin.gif


It would work even better if I could find the proper timing values and registers sad.gif
AlainTox714
Please find attached 3 files from FreeBSD sources, not sure it could be helpfull
but in ata-chipset.c there is a lot timing

From the man page i post here :
http://forum.insanelymac.com/index.php?sho...091&st=120#

The currently supported ATA/SATA controller chips are:
.......
nVidia: nForce, nForce2, nForce2 MCP, nForce3, nForce3 MCP,
nForce3 Pro, nForce4.

Good work, i try by myself to understand how it works but my knowledge is
inadequate.
subramanyam
bikedude880...it wud be great if u could actually let us know wat u are trying coz all it requires is one moment of brilliance from one of the members to pull this off... sleep.gif sleep.gif
iMäcen
I've tried the kext, andit gives me lots of read and write errors. Keep up the good work, I would like to test further releases.
Thico Alves
what about nForce 410/430 controllers?!? I try this one with mine, but it didn't even initializated, and I got still waiting bla bla bla again... AppleVIAATA detected my controller but frozed just after that with a read/write error
bikedude880
QUOTE(AlainTox714 @ Dec 17 2006, 10:45 PM) *
Please find attached 3 files from FreeBSD sources, not sure it could be helpfull
but in ata-chipset.c there is a lot timing
...


The problem with the timing in that file is that they are in the format 0x28269008 and not 0x13 .

QUOTE(Thico Alves @ Dec 18 2006, 08:32 AM) *
what about nForce 410/430 controllers?!? I try this one with mine, but it didn't even initializated, and I got still waiting bla bla bla again... AppleVIAATA detected my controller but frozed just after that with a read/write error


Working on that. My focus is in other places. Leopard.
evanrodge
I would really like for this to happen so I can use my new dv6000z!! A hefty donation would be in the future of the developer who writes a good, stable driver that gets my laptop working whistle.gif 2centsfinal.gif
subramanyam
Bikedude880 had mentioned that he intended to use the same source to write the drivers for the Sis and Nforce chipsets.Now that Sis is working,guess this thread deserves a bump... smile.gif
Thico Alves
please someone!! make it working on 410/430!!! excl.gif

I don't know what more to do to get my notebook SATA HD working on OSX . . . sad.gif
bikedude880
QUOTE(Thico Alves @ Dec 21 2006, 07:29 PM) *
please someone!! make it working on 410/430!!! excl.gif

I don't know what more to do to get my notebook SATA HD working on OSX . . . sad.gif


Give it time, these things don't just pop out of people asses tongue.gif

Granted I have been a tad busy doing other things, I have not forgotten about this project. I'll take a look at it tonight.
timmyj
doesn't anyone know how to make this driver work?? it's been a work in progress for ages with countless threads and yet still the best solution is this VIAATA kext which just corrupts files. With some of the work you guys are doing, rewriting kernels, getting leopard running, a mere SATA Driver can't be that much of a challenge, anyways I think its great that some people are continually trying and showing support and i thank them for that but still as yet we have no solution. So what's the latest on this?
jape
I do think this is a NVIDIA bug somewhere that only OS X "exploits", but I have no proof.

How's life?
macgirl
QUOTE(jape @ Dec 22 2006, 10:07 AM) *
How's life?

"Life is what happens to you while you're busy making other plans." John Lennon
subramanyam
Bikedude880...I know this can get irritating,but could'nt resist...any UPDATES ??
bikedude880
QUOTE(subramanyam @ Dec 23 2006, 02:50 AM) *
Bikedude880...I know this can get irritating,but could'nt resist...any UPDATES ??


Not as of yet. I've been busy with the holidays, Leo, and whatever bit of life I have left. tongue.gif

Hopefully when the New Year comes, so will some new development biggrin.gif
subramanyam
This post desperately requires a bump....bikedude880, wru...?? whistle.gif whistle.gif
SaxMachine
QUOTE(subramanyam @ Dec 31 2006, 06:22 AM) *
This post desperately requires a bump....bikedude880, wru...?? whistle.gif whistle.gif



yeahhh *bump2*

Any news?
bikedude880
Current News: I still don't have the proper registers for this chipset. Without them, I have nothing.
bikedude880
I think I've almost got it working (at least compiling correctly...) Hopefully there will be something new during this week.
tomtefar
Great news indeed! Keeping my fingers crossed. smile.gif
timmyj
great news bikedude, i just saw this http://forum.insanelymac.com/index.php?showtopic=37127 post by raska on that topic where he puts the hardware ids in appleviaata and appleahciport.kext, i'm not sure if that has been tried much b4 but he claims it is working, any thoughts or is this just the same old. anyways thanks bikedude for your efforts!! thumbsup_anim.gif
bikedude880
QUOTE(timmyj @ Jan 3 2007, 01:57 AM) *
great news bikedude, i just saw this http://forum.insanelymac.com/index.php?showtopic=37127 post by raska on that topic where he puts the hardware ids in appleviaata and appleahciport.kext, i'm not sure if that has been tried much b4 but he claims it is working, any thoughts or is this just the same old. anyways thanks bikedude for your efforts!! thumbsup_anim.gif


It might work, but it's also using code that was optimized for a different chipset (improper timing and registers, both of which should be closer to correct in what I'm working on.) This beta will also implement a couple nifty features that will be revealed when it's released.
SaxMachine
Perhaps after all this time I will be able to put the mac os on my disc 7200RPM

bikedude you are my hero!!!
bikedude880
QUOTE(SaxMachine @ Jan 3 2007, 11:25 AM) *
Perhaps after all this time I will be able to put the mac os on my disc 7200RPM

bikedude you are my hero!!!


Not yet I'm not. If this beta loads and detects the chipset correctly, then there might be hope. When that happens, I'd like to see xbench disk scores (only) before and after. Not even going to be concerned with data loss until the chipset runs at the proper acceleration (UDMA).
bikedude880
Kext is almost ready for testing. Just going to do a load check on this end and it's off to upload the beta. Whoo!
bikedude880
NOTE: THIS WILL ONLY WORK ON 10.4.8!

Kext is ready for testing. This is still in beta and is not expected to work properly. I have provided a little shell script that will repair the permissions on the kext and delete Extensions.mkext. Just drop IOATAFamily.kext into /System/Library/Extensions/ and run the script. Report back with what happens.
EDIT: Removed for further coding.
macgirl
Thanks, I'll test it ASAP biggrin.gif
tomtefar
Can I test it on an old 10.4.7 rig or do I have to use 10.4.8??

Well.... I would like to take this moment to direct your attention to that colorful bird over there... wink.gif

Sorry.
JaS
Great,congrats on your new beta smile.gif
xtraa
Yea, congrats smile.gif

I have no sata here so I can't test it atm, but I am lucky that some progress is going on
and thank you for the work bikedude biggrin.gif
SaxMachine
Thank you...bikedude


OK i go to test...
tomtefar
I updated my old AMD SSE2 rig with the packages:

JaS.10.4.8.AMD.SSE2.Only.Combo.Update.pkg.zip
and
JaS.10.4.8.AMD.SSE2.SemtheX.Beta9.pkg.zip


and I get a lot of error messages, below is the part that is still available from dmesg (private/var/log/system.log had non of this????)

tersE9ataUnitID
__ZN20AppleNVIDIAATADriver24getSATAPortPresentStatusEm
__ZN20AppleNVIDIAATADriver26computeUDMATimingRegistersE9ataUnitID
__ZNK21AppleNVIDIAATAChannel16getMaxDriveUnitsEv
kld_load_from_memory() failed for module com.apple.driver.AppleNVIDIAATA
\^[[33mFailed to load extension com.apple.driver.AppleNVIDIAATA.
\^[[0mCouldn't alloc class "AppleNVIDIAATARoot"
Security auditing service present
BSM auditing present
disabled
From path: "uuid",
Waiting for boot volume with UUID 7F23DF16-2741-35C8-83FA-82E3398107AB
Waiting on <dict ID="0"><key>IOProviderClass</key><string ID="1">IOResources</string><key>IOResourceMatch</key><string ID="2">boot-uuid-media</string></dict>
kld(): Undefined symbols:
__ZN20AppleNVIDIAATADriver10kMaxDrivesEv
__ZN20AppleNVIDIAATADriver17setSATAPortEnableERmb
__ZN20AppleNVIDIAATADriver20writeTimingRegistersEv
__ZN20AppleNVIDIAATADriver22computeTimingRegistersE9ataUnitID
__ZN20AppleNVIDIAATADriver24getSATAPortPresentStatusEm
__ZN20AppleNVIDIAATADriver26computeUDMATimingRegistersE9ataUnitID
__ZNK21AppleNVIDIAATAChannel16getMaxDriveUnitsEv
kld_load_from_memory() failed for module com.apple.driver.AppleNVIDIAATA
\^[[33mFailed to load extension com.apple.driver.AppleNVIDIAATA.
\^[[0mCouldn't alloc class "AppleNVIDIAATARoot"
kld(): Undefined symbols:
__ZN20AppleNVIDIAATADriver10kMaxDrivesEv
__ZN20AppleNVIDIAATADriver17setSATAPortEnableERmb
__ZN20AppleNVIDIAATADriver20writeTimingRegistersEv
__ZN20AppleNVIDIAATADriver22computeTimingRegistersE9ataUnitID
__ZN20AppleNVIDIAATADriver24getSATAPortPresentStatusEm
__ZN20AppleNVIDIAATADriver26computeUDMATimingRegistersE9ataUnitID
__ZNK21AppleNVIDIAATAChannel16getMaxDriveUnitsEv
kld_load_from_memory() failed for module com.apple.driver.AppleNVIDIAATA
\^[[33mFailed to load extension com.apple.driver.AppleNVIDIAATA.
\^[[0mCouldn't alloc class "AppleNVIDIAATARoot"
subramanyam
Off to test this....
subramanyam
posted by raska in an other thread..

QUOTE
YAYAYAYAY!!!

All solved. Here is how I made it. I'm learning MACOS fast. LOL

First of all...My Hardware settings:

Motherboard Gigabyte GA-K8NF-9 nforce4 >>>> http://www.gigabyte.com.tw/Products/Mother...?ProductID=1860
Processor: AMD Athlon 64-3.5 Ghz.
RAM: 2 x 1 gig. Kingstom
Graphic Card: NVidia Geforce 7300 GT-512 RAM
HD 250 GB SATA - Seagate (4 partitions) as master in SATA port
HG 80 GB ATA - Seagate (3 partitions) as master in IDE port.

The first thing I made has been a bat file in windows using notepad to get all the details in the Device Manager. I called it details.bat and it looks this way

---------------
@echo OFF
set DEVMGR_SHOW_DETAILS=1 >NUL
start devmgmt.msc >NUL
exit
-------------

Then double click on it and I just got my Device Manager in Windows to see all... I selected the SATA thing and then the tab Details that I didn't get before of the execution of the *.bat file smile.gif

There I can see that the vendor ID is "10DE" and the Device ID is "0054": I noted all down and restart in MAC.

Edited to show a pic that someone requested, on how to extract the 2 ID.... Sorry for the language in pic, but my native one is Spanish smile.gif

Reduced: 84% of original size [ 760 x 434 ]- Click to view full image


Now the MAC part begin:

-----------

1 - Load Terminal
2 - cd /System/Library/Extensions/
3 - sudo nano /AppleVIAATA.kext/contents/info.plist
4 - In Via Sata controller I added the vendor and device ID of my computer to the entry "IOPCIPrimaryMatch".
As my vendor ID is 10DE and the PCI device is 0054, I added the following: 0x005410DE -
^O and ^X to save and quit. It looks now this way (Red is added):

---------------------------------------------------------------------
<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>0x005410DE 0x528810B9 0x31491106 0x00e310de 0x00ee10de</string>
<key>IOProbeScore</key>
<string>1000</string>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
<key>Serial ATA</key>
<true/>
</dict>
----------------------------------------------------------------------

5 - sudo nano /AppleAHCIPort.kext/contents/info.plist
6 - In GenericAHCI controller I changed the vendor and device ID of my computer to the entry "IOPCIClassMatch".
As my vendor ID is 10DE and the PCI devide is 0054, I added the following: 0x005410DE -
^O and ^X to save and quit. It looks now this way (Red is changed):

----------------------------------------------------------------------
<key>GenericAHCI</key>
<dict>
<key>CFBundeIdentifier</key>
<string>com.apple.driver.AppleAHCIPort</string>
<key>IOClass</key>
<string>AppleAHCI</string>
<key>IOPCIClassMatch</key>
<string>0x005410DE</string>
<key>IOProbeScore</key>
<integer>800</integer>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
<key>Vendor Name</key>
<string>Generic AHCI</string>
</dict>

----------------------------------------------------------------------

7 - Then I set permissions:

sudo chown -R root:wheel AppleVIAATA.kext
sudo chmod -R 755 AppleVIAATA.kext
sudo chown -R root:wheel AppleAHCIPort.kext
sudo chmod -R 755 AppleAHCIPort.kext

cd /System/Library/
sudo rm -rf Extensions.kextcache
sudo rm -rf Extensions.mkext

8 - Reboot...

9 - Tension ... What will happens ?... white letters scrolling .... blue screen .... more tension ..... Finder appears!! ... 2 seconds more...

10 - VOILA!!!! ALL WORKS!!! I have my 7 partitons now in my desktop!!! and all working like a charm.... I can read either the 2 NTFS partitions I have.
This remember me my Commodore Amiga times. hehe

I hope this can be a help for all people having the same or similar problem...

Ciao for now!!! and thanks to all what made possible that I learned so fast the way to get all working in no time beeing a total noob in MAC world. I just read a bunch of posts here and i dont know right now which ones point me in the correct direction. So, THANKS TO ALL WHAT WRITE SOME INFO HERE!!!!!! You are all wonderful!!!

Cheers and Happy Year 2007!!!
iMäcen
Didn't work that well on my machine. When trying to boot I get:

Waiting for boot volume with UUID 67EF3022-3580-3722-BB72-E3FB0079860C
Waiting on <dict UD="0"><key>IOProviderClass</key><string ID="1">IOResources</string><key>IOResourceMatch</key><string ID="2">boot-uuid-media</string></dict>
kld(): Undefined symbols:
__ZN20AppleNVIDIAATADriver10kMaxDrivesEv
__ZN20AppleNVIDIAATADriver17setSATAPortEnableERmb
__ZN20AppleNVIDIAATADriver20writeTimingRegistersEv
__ZN20AppleNVIDIAATADriver22computeTimingRegistersE9ataUnitID
__ZN20AppleNVIDIAATADriver24getSATAPortPresentStatusEm
__ZN20AppleNVIDIAATADriver26computeUDMATimingRegistersE9ataUnitID
__ZNK21AppleNVIDIAATAChannel16getMaxDriveUnitsEv
kld_load_from_memory() failed for module com.apple.driver.AppleNVIDAATA
Failed to load extension com.apple.driver.AppleNVIDIAATA
Couldn't alloc class "AppleNVIDIAATARoot"

I get this with PATA drive alone too. With SATA and PATA I get the same errors afte each other.


subramanyam: What raska posted sure makes your SATA drive show up, but reading and writing from/to it dosen't work. If it was that easy to solve the problem, bikedude didn't have to spend his time on his releases.
robiecat
Same here,

Failed to load extension com.apple.driver.AppleNVIDIAATA. ...
and freezes with "waiting for root device"
:-(

Also tried the solution from Rasca. Works but systems freezes occasionally.
:-(

Cheers



Asus A8N SLI
AMD 64 Winchester (SSE2)
bikedude880
Right, so there are some things that still need to be fixed. I've removed the link to the beta as so far the same error has come up for a couple people, so I guess I'll work on that.
SaxMachine
Don't work for me beta release A8N SLI SE AMD 4800 X2 but congratulation for your kext
raska
QUOTE(iMäcen @ Jan 4 2007, 01:10 PM) *
What raska posted sure makes your SATA drive show up, but reading and writing from/to it dosen't work. If it was that easy to solve the problem, bikedude didn't have to spend his time on his releases.


As I said in my previous post I am a total noob on MAC, No more than 4 days playing with MACOS. I read a lot in all forums around and I just made that solution that works fine for me.
I can read/write from Mac to XP and vice-versa. I have no idea why you can't. Of course I can't write to partitions NTFS. I only have one and I can read it only.
As far as I have understood reading around. Mac can't write in NTFS partitions. Maybe you have all your XP drives NTFS formated?

I have a bunch of programs installed. Tested all of them and all works fine. Never had any freeze and I tested Quick Time playing 8 movies at time without jumps.
I am really happy with my new MAC. LOL

I only have had an issue one time that I put the time to the year 2002, then after to reboot, MAC was not able to see the SATA drive... I run the Disk Utility an after a couple minutes (a lot) it coould see all the drives but the sata ones was Unmounted (ghost). I reboot in Windows, set the clock to the actual year, back to MAC and all working fine again. I have no f***g idea what the time has to see with the ghosting unmounted drives, but well... sure someone knows why!!!

Cheers!!!
bikedude880
New beta, fixed as many errors as possible. Same instructions as last time.
EDIT: Removed for newer one.
macgirl
Error:

kextload: extension IOATAFamily.kext/Contents/PlugIns/AppleNVIDIAATA.kext appears to be valid
kld(): Undefined symbols:
__ZN20AppleNVIDIAATADriver17setSATAPortEnableERmb
__ZN20AppleNVIDIAATADriver20writeTimingRegistersE9ataUnitID
__ZN20AppleNVIDIAATADriver22computeTimingRegistersE9ataUnitID
__ZN20AppleNVIDIAATADriver24getSATAPortPresentStatusEm
__ZN20AppleNVIDIAATADriver26computeUDMATimingRegistersE9ataUnitID
__ZNK21AppleNVIDIAATAChannel16getMaxDriveUnitsEv
kextload: kld_load_from_memory() failed for module /System/Library/Extensions/IOATAFamily.kext/Contents/PlugIns/AppleNVIDIAATA.kext/Contents/MacOS/AppleNVIDIAATA
kextload: a link/load error occured for kernel extension IOATAFamily.kext/Contents/PlugIns/AppleNVIDIAATA.kext
load failed for extension IOATAFamily.kext/Contents/PlugIns/AppleNVIDIAATA.kext
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.