subramanyam Posted August 27, 2006 Share Posted August 27, 2006 Well,I guess its high time we got SATA goin on NF4.Inspired by planetbeing,who ported the forcedeth driver,I have decided to try to port the SATA driver. I found sata_nv.c and it is quite a small script actually.. .Nothin compared to forcedeth.But I am an absolute newbie at this and wud like some help from u guys. I will upload the sata_nv for now.Have a look and continue this thread... Edit:I have also uploaded the BSD driver (viaide.c).The name says ide but it supports both SATA and ide. Cheers Subramanyam sata_nv.c.zip viaide.c.zip Link to comment Share on other sites More sharing options...
AMDZen Posted September 6, 2006 Share Posted September 6, 2006 I sent you a PM on this so you don't need to reply to both if you see that. I just wanted it on the forum to see if anyone else can help as well This is my computer: AMD Opteron 146 EVGA nForce4 SLI Motherboard EVGA 7800 GT VidCard SATA Raptor 74 GB SATA Raptor 150 GB (Windows on this) SATA Seagate 300 GB (Data Drive) I want to install Mac OSX on my 74 GB Raptor. It is completely empty and I formatted Fat32 so Mac OSX could see it. I boot up on the JaS 10.4.7 DVD from Demonoid, osx sees the drive, I format the drive and sometimes it will format for mac file system and then it can't mount - so it freezes. I restart and the drive will usually be mounted. I say usually because different things happen. I try to install and select the VIA SATA drivers but the install freezes usually 1/4 of the way through. I saw the thread http://forum.insanelymac.com/index.php?showtopic=25879 Can I use that to somehow install OSX on my SATA? I have no IDE HD on this computer, only SATA. I am a complete n00b at doing this but I think if your driver works and I can get it loaded that I can get OSX installed on my computer. If you will please help me with this it would be much appreciated. Thanks. Link to comment Share on other sites More sharing options...
jape Posted September 6, 2006 Share Posted September 6, 2006 subramanyam: can you please provide viaide.h or whatever defines the VIA/nForce timings on BSD? AMDZEN: No way to use SATA currently. Link to comment Share on other sites More sharing options...
AMDZen Posted September 7, 2006 Share Posted September 7, 2006 Jape. What about the Silicon Image controllers I'm hearing about? Someone said go get a 3112, but upon looking I can't find anyone who has done this really. Some say they have but nobody has told me how. I am willing to buy a PCI or PCI-e SATA card if it will work. Let me know please Link to comment Share on other sites More sharing options...
subramanyam Posted September 7, 2006 Author Share Posted September 7, 2006 Well,Jape I'm sorry...but I dont hav tat... Link to comment Share on other sites More sharing options...
jape Posted September 7, 2006 Share Posted September 7, 2006 Jape. What about the Silicon Image controllers I'm hearing about? Someone said go get a 3112, but upon looking I can't find anyone who has done this really. Some say they have but nobody has told me how. I am willing to buy a PCI or PCI-e SATA card if it will work. Let me know please I don't know anything about that card, sorry. (I don't plan to buy one either). There are some threads around here about that card already. subramanyam: Which BSD you got that file from? I think there are some differences between different BSDs... FreeBSD, OpenBSD, PC-BSD... Link to comment Share on other sites More sharing options...
subramanyam Posted September 7, 2006 Author Share Posted September 7, 2006 I got tat from NetBSD.And from the next time...plz copy/paste my name Link to comment Share on other sites More sharing options...
subramanyam Posted September 10, 2006 Author Share Posted September 10, 2006 And... Thanks to Karthik Ramgopalan.....I have the forcedeth SATA drivers .....the old one without sata support and the new one with NF4 SATA support Hopefully somebody here can see both and spot the difference.... Cheerio Subramanyam Forcedeth_old_n_new_.zip Link to comment Share on other sites More sharing options...
jape Posted September 10, 2006 Share Posted September 10, 2006 You're attaching a diff file, not a complete file. It is useless without the original file the patch was made from. Link to comment Share on other sites More sharing options...
aPpLeFrEaKpEePs Posted September 14, 2006 Share Posted September 14, 2006 hey jape, is there any way to directly port the netbsd driver to darwin, as darwin is also a BSD fork. If i try to build a kext in xcode using the viaide.c file as the source, it gives an error.. i tried meddling around with few functions and all, but no luck.. Link to comment Share on other sites More sharing options...
niteice Posted September 14, 2006 Share Posted September 14, 2006 No, the kernel is entirely different. The NetBSD code is most useful as a reference for writing a new driver. Link to comment Share on other sites More sharing options...
jape Posted September 14, 2006 Share Posted September 14, 2006 And.. I said a lot of times that... porting the BSD driver to the Darwin kernel is USELESS if we don't find ANY visible difference between existing VIA driver & BSD's nForce one. Link to comment Share on other sites More sharing options...
aPpLeFrEaKpEePs Posted September 17, 2006 Share Posted September 17, 2006 Hey folks, This is great news IMHO. i downloaded the AppleVIAATADriver.cpp and the AppleVIAATARoot.cpp files which are the sources of the VIA ATA/SATA Drivers in Darwin. I have mailed them 2 subramanyam, who will be uploading it soon. To get Nforce 4 SATA working, all we need is to add the additional Nforce 4 Timings to both (which I cant figure out from the viaide.c file, but I am sure someone like Jape will be able to), add the device ID’s and compile in Xcode. I know that the timings are present in distinct functions in both cpp files, but I am unable to figure out the timings themselves. This is the method which was suggested by many programmers who are a part of the Darwin Device Drivers mailing list. I found these cpp files at the opendarwin website. Hope we get working SATA soon, now that we know that we do not have to code a driver from scratch after all. Link to comment Share on other sites More sharing options...
aPpLeFrEaKpEePs Posted September 17, 2006 Share Posted September 17, 2006 Hey I am myself attaching both files.. Here they are.. Best of luck !! VIAATA.rar Link to comment Share on other sites More sharing options...
jape Posted September 17, 2006 Share Posted September 17, 2006 Thanks a lot for comments! But I have bad news... As you may check from the thread on my sig, I already modded the nForceATA kext to detect the nForce SATA. The nForceATA kext has got the nForce timings (1) on it, and it didn't work. These may be wrong, of course. As I told subramanyam, I dind't found the timings on the viaide.c, they must be somewhere else. (In the VIAATA kext, "timings" are multiple tables of integers (2), each table is a different ata mode, each row is a different pio/udma mode) Even though I've read some docs about the IDE spec, I still don't really know what the timings are there for. I've read in some places that timings are not really needed for SATA. In fact, the VIA ATA kext specifically disables (3) timings if the device is identified as a SATA controller. Also, the BSD's viaide.c function via_sata_chip_map which seems to handle sata controllers is way simpler than its via_chip_map PATA counterpart. BTW, there's no real device id matching in VIAATA kext source. It is all done on the .plist file, unlike the nForceATA kext. May I ask you where the Darwin Device Drivers mailing list archives are? ----------------------------------------------------------------------- 1: See file AppleOnboardPCATA/AppleNVIDIAnForceATA/AppleNVIDIAnForceATATiming.h 2: See file AppleVIAATA/AppleVIAATATiming.h 3: In file AppleVIAATA/AppleVIAATADriver.cpp 786 void AppleVIAATADriver::programTimingRegisters( void ) 787 { 788 if (fProvider->getHardwareType() != VIA_HW_SATA) 789 { [Here timings are applied only if not SATA] 842 } 843 844 dumpVIARegisters(); 845 } Link to comment Share on other sites More sharing options...
jape Posted September 21, 2006 Share Posted September 21, 2006 .... Hi? Where did you read that "This is the method which was suggested by many programmers who are a part of the Darwin Device Drivers mailing list. "? I would love to see that. Link to comment Share on other sites More sharing options...
subramanyam Posted September 22, 2006 Author Share Posted September 22, 2006 Just google.... "DARWIN DEVICE DRIVERS MAILING LIST" Link to comment Share on other sites More sharing options...
jape Posted September 22, 2006 Share Posted September 22, 2006 I've seen the Karthik messages and their replies on that list, but no one says the reason is "timings are missing". Instead, they say what I know: that the problem we have shouldn't happen. (I was hoping there was another mailing list... non Apple hosted...) Every friend (some of them are systems engineers) I've asked about this has answered that BSY forever is usually a controller's bug (some say it's a hard disk bug until I tell them it's a SATA disk. It seems SATA handles BSY differently than PATA, but driver implementations don't differ). Then I tell them it works under Windows, Linux & DOS. Then they tell me "that's weird". Then I'm alone again. The Darwin source, although easy to read for a newbie because it's very structured, it's pretty difficult to understand what it really does because of high abstraction -- no one I know can catch the glimpse at first glance and no one I know is willing to study it Link to comment Share on other sites More sharing options...
vaderd Posted September 23, 2006 Share Posted September 23, 2006 Jape. What about the Silicon Image controllers I'm hearing about? Someone said go get a 3112, but upon looking I can't find anyone who has done this really. Some say they have but nobody has told me how. I am willing to buy a PCI or PCI-e SATA card if it will work. Let me know please Yes, the controller card with a 3112 chipset works using the VIAATA.kext! You have flash a new firmware to the card though. Instead of the RAID BIOS, you have to use the SATALink BIOS. You can download it at the Silicon Image website. Works well and is cheap! Link to comment Share on other sites More sharing options...
jape Posted September 25, 2006 Share Posted September 25, 2006 Did anyone test the bare Darwin with the VIA ATA driver? I'll be testing it as soon as I have free time. Link to comment Share on other sites More sharing options...
subramanyam Posted October 2, 2006 Author Share Posted October 2, 2006 Any News Link to comment Share on other sites More sharing options...
jester1o1 Posted October 2, 2006 Share Posted October 2, 2006 Any News You start a thread saying your going to port the NF4 driver - and then post to that same thread asking for news? Have you started the port? Link to comment Share on other sites More sharing options...
jape Posted October 2, 2006 Share Posted October 2, 2006 No driver needs to be ported until we find out the differeces between the already existing Darwin driver and every other driver in the world. Starting typing right now would probably lead to another AppleVIAATA-like driver. Link to comment Share on other sites More sharing options...
gixxer_drew Posted October 6, 2006 Share Posted October 6, 2006 I am really excited if you guys can build this driver I wish I had any expertise to help. Link to comment Share on other sites More sharing options...
IcyStorm Posted October 7, 2006 Share Posted October 7, 2006 Wait, how far can you people go with the installation with nForce 4 SATA? I installed it so far, but I'm getting an IOATA Controller device blocking bus error, and I'm trying to figure that out. Can you guys get that far or do your SATA drives not work even before that? Link to comment Share on other sites More sharing options...
Recommended Posts