Jump to content

Darwin nForce4 ATA/SATA controller


Guest bikedude880
 Share

1,033 posts in this topic

Recommended Posts

Guest bikedude880

I've noticed a slight difference between hardware initialization from the FreeBSD to the Darwin driver (and it's not the syntax):

 

FreeBSD:

if (ctlr->chip->cfg2 & NVQ) {
	/* clear interrupt status */
	ATA_OUTL(ctlr->r_res2, offset, 0x00ff00ff);

	/* enable device and PHY state change interrupts */
	ATA_OUTL(ctlr->r_res2, offset + 4, 0x000d000d);

	/* disable NCQ support */
	ATA_OUTL(ctlr->r_res2, 0x0400,
		 ATA_INL(ctlr->r_res2, 0x0400) & 0xfffffff9);

Darwin:

// some tests
if ( fProvider->getHardwareFlags() & NVQ )
{
	// clear interrupt status
	OSWriteLittleInt32( (void *)fBMBaseAddr, 0x440, 0x00ff00ff );

	// disable ncq
	UInt32 ncq = OSReadLittleInt32( (void *)fBMBaseAddr, 0x400 );
	ncq &= 0xfffffff9;
	OSWriteLittleInt32( (void *)fBMBaseAddr, 0x400, ncq );
}

*_bmStatusReg = 0x04;

 

Could this mean anything? I'm not sure but it's a start.

Link to comment
Share on other sites

if its jus initialization thats problematic.. then y does it allow us to read? and hang only when we want to write/use disk utility?

BTW my tubgirl download finished today morning (got it done frm a frend).. i cant access IRC (that too is blocked).. so if someone would be willing to upload any kext onto the forums, i'm all ready to test

 

PS: My signature updated to reflect status...

Edited by aPpLeFrEaKpEePs
Link to comment
Share on other sites

Hello MeDevil!!

 

I want to thank you so mutch for making this driver! It works on my Nforce mobo!!

 

The only problem is that i cant format it in OSX to a HFS+ partition disk utility hangs when trying to format also with disk utility on the CD.

 

My specs are :

 

CPU X2 3800+ 939

motherboard : 939NF4G-SATA2

1x 160GB PATA

1x 250GB SATA2 (working)

 

greetings from Jeff from Holland

 

Edit

 

I forget to mention that i justed your PPF patch on the Tubgirl AMD1048 image

Edited by Starscr3am
Link to comment
Share on other sites

Dunno. Maybe that's a corrupted image file or other problem causes it...

 

 

I downloaded a different image and was able to get it installed. If I didn't hit a key to load Darwin, it errors..........sorry, don't remember what the error message said, but it did install.

 

Then I rebooted.............it just hung at a blinking cursor. :(

 

I think this image is the problem and was referenced in another thread. Do I have to start it off from the DVD? But then again, it errors without hitting any key during the startup of the DVD, so that won't work. I will boot off the DVD again, and see what the error message was and post it here.

 

I don't know if I am much help here, but if there is anything that I can test for anyone, please let me know. :)

Link to comment
Share on other sites

Hi Starscr3am,

 

The board u r using has a mcp51 southbridge if i am not mistaken; nforce 410 infact... r u able 2 write to your sata disk without any IOATA controller blocking bus errors??

Edited by aPpLeFrEaKpEePs
Link to comment
Share on other sites

Hi ApllefreakPeeps,

 

I wasnt able to see my sata disk without the patch, now i can see my harddisk and can read it but cannot write to it because it is a NTFS disk with vista on it. I want to format it to hfs+ but the diskmanager hangs.

 

do you mean i have to disable or remove the io kext?

Link to comment
Share on other sites

I've noticed a slight difference between hardware initialization from the FreeBSD to the Darwin driver (and it's not the syntax):

 

FreeBSD:

if (ctlr->chip->cfg2 & NVQ) {
	 /* clear interrupt status */
	 ATA_OUTL(ctlr->r_res2, offset, 0x00ff00ff);

	 /* enable device and PHY state change interrupts */
	 ATA_OUTL(ctlr->r_res2, offset + 4, 0x000d000d);

	 /* disable NCQ support */
	 ATA_OUTL(ctlr->r_res2, 0x0400,
		  ATA_INL(ctlr->r_res2, 0x0400) & 0xfffffff9);

Darwin:

// some tests
 if ( fProvider->getHardwareFlags() & NVQ )
 {
	 // clear interrupt status
	 OSWriteLittleInt32( (void *)fBMBaseAddr, 0x440, 0x00ff00ff );

	 // disable ncq
	 UInt32 ncq = OSReadLittleInt32( (void *)fBMBaseAddr, 0x400 );
	 ncq &= 0xfffffff9;
	 OSWriteLittleInt32( (void *)fBMBaseAddr, 0x400, ncq );
 }

 *_bmStatusReg = 0x04;

 

Could this mean anything? I'm not sure but it's a start.

 

You mean the "PHY state change interrupts"?

Imho, phy interrupts are only (or mainly) related to hotplug (which i will implement in the future).

Also, enabling phy state change interrupt could generate more interrupt related to our hardware that we can't handle and give more of the "device blocking bus" messages.

Please, look carefully at the writePacket() function in the source code: you'll find that I added code to correctly manage the writing of the packet (related to dma). Actually mcp51/55 may manage the writing of the packet in a different way... so we should look deeper into this kind of function(s).

 

Greetings, Domenico.

Link to comment
Share on other sites

Hi all!

I have Asus A8N-SLI Premium mobo.

I have nForce 4 SATA working, and even with Disc Utility.

But sometimes, may be once a day system hangs at all or gives me kernel panic.

I haven't these bugs before (when I haven't nf4-sata driver).

P.S. I'm using JaS 10.4.8 sse2.sse3 with PPF.

Link to comment
Share on other sites

do one thing.. here u hav jus read frm ur sata hard disk.. that is neway problem free wid the existing driver.. if u can create a fat32 partition from windows/linux on ur sata hard disk and then try writing to it.. see if u get any error.. becoz i am getting bus blocking errors and a kernel panic wen i try 2 write to it..

Link to comment
Share on other sites

i tested it i copied something from the sata drive to my desktop without errors 1.5 gigs in 30 seconds

 

 

only problem is that i cant format is there something else besides the disk utulitie from osx?

 

If I did search correctly on google, that mobo should have an nForce 410 MCP chipset.

But, actually there should be no read problems with the nforce mcp51/55 mobo (as Plat Sajack told us on the forum).

Did you try to write something to the sata disk? You can try to reformat the partition using some command line tool, such as fdisk.

 

to bikedude880: i'm not sure if writing to fBMBaseAddr + offset (0x440 / 0x400) is correct... we should investigate on this, because that's the only difference between ck804 and mcp chipsets in bsd... (and i still think that this is related to ncq!).

 

Greetings, Domenico.

Link to comment
Share on other sites

hi to all

does anyone can say me whats is the tip to format sata drivers nforce 4 chip

there are many post and i don t know whats work or what don t work

i ve installed AMD FINAL 10.4.8 TUBGIRL

i ve 2 sata hd (windiws and new)

i can see my windows sata ok (read only)

i can see my new sata but i can t format

 

 

its posible format sata hd nforce4 chp????

 

 

 

disk utility say me error time out

 

sorry for my bad english

thx in advance

Link to comment
Share on other sites

depends..

 

if u hav an nforce4/nforce 4 ultra/SLI (for AMD) works fine...

 

if u hav an MCP51/55 ie. an nforce 410/430/Intel Edition it causes write problems.. its jus able 2 read properly

Link to comment
Share on other sites

Is there any way to plug a usb drive or to load a kext in a certain way during installation? I went through google without any luck.

 

My USB drive is recognized, but cannot be mounted, tried quickly in console also without any luck. Maybe a CD would work? Could I swap the CD during installation?

 

My HD just isn't recognized at all during the install with JAS 10.4.8 sse2/3 patch p1 under a MCP51 chipset. If there's no other way to load a kext through kextload during the install, i will need to add the kext to my install dvd one way or another...

Link to comment
Share on other sites

Guest goodtime
I used clonetool to image my drive and one thing so far is the SATA is not bootable, I get the dreaded "waiting for boot device"

 

any help in fixing that would be greatfully received :P

 

Did you image it to a 2nd hard drive? What verison of OSx86 did you use to make the clone? You can also test clone using your DVD Install disk. Insert the disk and don't press anything when the DVD Bootloader prompts you. This will let you know that you data and system is okay on the clone and it is missing the boot loader. If you cloned it to a 2nd drive using 10.4.6 or 10.4.8 it should have automatically installed a boot loader. I use SATA drives all the time with Clonetool.

 

gt

Edited by goodtime
Link to comment
Share on other sites

Is there any way to plug a usb drive or to load a kext in a certain way during installation? I went through google without any luck.

 

My USB drive is recognized, but cannot be mounted, tried quickly in console also without any luck. Maybe a CD would work? Could I swap the CD during installation?

 

My HD just isn't recognized at all during the install with JAS 10.4.8 sse2/3 patch p1 under a MCP51 chipset. If there's no other way to load a kext through kextload during the install, i will need to add the kext to my install dvd one way or another...

 

you don't need to proper load the kext on instalation. You can install using VMWare (it's really really very simple...same steps as if you were installing normally, but you need to first open the program on Windows and then tell him on a wizzard screen to use you entire disk on the virtual machine). But since you have an nForce 410/430 (MCP 51 controller) you wont be abble to use MacOS, because the driver doesn't work for writing yet. To install it without VMWare is absolutly impossible. You will be abble to see your disk, but will not be abble to format or copy anything to it. Using VMWare everything works normally because it uses the Windows SATA driver on the virtual machine. So it just works! =D

Link to comment
Share on other sites

sorry for my last post

 

my chipset nForce 570 SLI

micro amd2 4200

mother asus m2n-sli de luxe

osx86 10.4.8 amd final tubgirl

pata 30gb osx

sata 120gb wxp

sata 120 for foture osx

 

does anyone has a guide to format sata

it s posible???

i can see but i can t format

thx in advance

Link to comment
Share on other sites

no way as yet to format by using disk utility/fdisk or write to any SATA hard disk attached to a controller>=MCP51.. u can just read

Link to comment
Share on other sites

Hello, I have a nForce 410/430 MCP controller installed on my laptop (or at least this is what CPU-Z reported me...) and, using the last .kext version of the "nForce4 ATA/SATA controller", I was finally able to mount my hard disk. But then it freezed in Darwin while trying to remove some temporary files... :) Anyone got a solution for this? I want to run Mac OSX in native mode, VMWare is so slow... Thanks a lot!

Edited by DDJ
Link to comment
Share on other sites

sordos: What filesystem are you using on the partition you want to format? If it's NTFS, I think it's impossible. I had that problem too.

Use Windows diskpart (type "diskpart" in run command) to delete the partition and then create a new one with "id=af". Then you should be able to format the partition with disk utility.

Link to comment
Share on other sites

hey sordos

ill give u an easier GUI way to format your partition ...

 

1) Boot into windows (this is assuming u have windows 2000/xp pro)

2) Go to start->run.. type diskmgmt.msc in the run box and press enter to open disk management tools

3) choose the partition you want to format.. right click on it and then click on format. if u want to delete any partition you have options for that also

 

BOL

 

Regards,

aPpLeFrEaKpEePs

Link to comment
Share on other sites

Hello, I have a nForce 410/430 MCP controller installed on my laptop (or at least this is what CPU-Z reported me...) and, using the last .kext version of the "nForce4 ATA/SATA controller", I was finally able to mount my hard disk. But then it freezed in Darwin while trying to remove some temporary files... :dev: Anyone got a solution for this? I want to run Mac OSX in native mode, VMWare is so slow... Thanks a lot!

 

If you look at the previous posts you can see that MCP51 isn't supported yet with these drivers. You can mount SATA, but's for read-only. Since you need to write while booting OSX nativelly, the driver will not work. MeDevil, bikedude, and other folks are working for a new version of the driver that should be compatible.

Link to comment
Share on other sites

 Share

×
×
  • Create New...