Jump to content

NForce4 Serial ATA (DEVELOPMENT)


hamlo
 Share

185 posts in this topic

Recommended Posts

VIA SATA controller its a little incompatible with NForce SATA. The specific PCI config space registers offset of VIA controller is 0x40 the nForce SATA controller is 0x50, and many other incompatiblities and differences...

For example the reading with VIA method working fine in nForce, but writing corrupt data. Structure of timing registers in VIA another than nForce.

NVIDIA close information about your controllers. This is bad.

 

But i'm working.

 

If somebody can get documentation about nForce controllers (tech doc, controller specifications, system registers or other tech...) i would be glad !

 

If you have friends working in NVIDIA and ready to help me, let know me.

Link to comment
Share on other sites

hamlo: Great to hear from you! Regarding your statement: there is not enough information in the open source drivers for linux, freebsd and openbsd?? I mean all those OSes have working open source drivers (which should have all information in them). There is also NVIDIA's released sourcecode.

Link to comment
Share on other sites

VIA SATA controller its a little incompatible with NForce SATA. The specific PCI config space registers offset of VIA controller is 0x40 the nForce SATA controller is 0x50, and many other incompatiblities and differences...

For example the reading with VIA methon working fine in nForce, but writing corrupt data. Structure of timing registers in VIA another than nForce.

But we both already tried the ApplenForce driver, and it fails too -- same than with AppleVIAATA.

 

NVIDIA close information about your controllers. This is bad.

 

If somebody can get documentation about nForce controllers (tech doc, controller specifications, system registers or other tech...) i would be glad !

 

If you have friends working in NVIDIA and ready to help me, let know me.

In fact it was an NVIDIA employee who wrote the Open Source Linux nForce drivers.

Link to comment
Share on other sites

Are the BSD drivers open-source? Since Darwin is BSD based, drivers should be easy.

 

I tried this way ago. Problem is, differences between Darwin and BSD are enormous.

 

Darwin uses IOKit, which is a driver framework based on C++, using object oriented programming, inheritance, overloading...

BSD on the other hand is pure C & C preprocessor.

 

They're like day and night.

Link to comment
Share on other sites

The SATA is the fast version of PATA. SATA fully compatible with PATA. But in SATA added many other useful functions.

VIA controller use other method for programming timing registers. This is main problem that make driver VIA not working with nForce chipset. If correct routine that programm timing registers the driver will work.

I correct driver for Intel and that driver work on my nForce successfull :-)

Link to comment
Share on other sites

jape

Darwin uses IOKit, which is a driver framework based on ObjC, using lots of objects, inheritance, code sharing and the latest on structured programming.
Is it a joke? Cocoa framework based on Objective C, IOKit it's pure C++ framework, which widely uses polymorphism .

 

It's ok :construction:

Link to comment
Share on other sites

Well.. Hamlo was right, nVidia's drivers use a different register space offset.

 

I've modified to VIA driver to point to the right registers... I hope it's right. I've ignore VIA_MISC registers as they have no NVIDIA equivalent.

 

(Modified code from AppleVIA follows)

/*
* VIA specific PCI config space registers.
*/
#define VIA_IDE_ENABLE	  0x50
#define VIA_IDE_CONFIG	  0x51
#define VIA_FIFO_CONFIG	 0x53
#define VIA_MISC_1		  0x44
#define VIA_MISC_2		  0x45
#define VIA_MISC_3		  0x46
#define VIA_DATA_TIMING	 0x58
#define VIA_CMD_TIMING	  0x5e
#define VIA_ADDRESS_SETUP   0x5c
#define VIA_ULTRA_TIMING	0x60

 

It boots at least. 15 minutes live then freezed like the old days. Just one ATAControllerBlockingBus message which is a pretty number for 15 minutes but not the lowest I've ever get.

Edited by jape
Link to comment
Share on other sites

The official driver from nVidia is only addon for standard IDE driver ! The best source code for analyse is driver from NetBSD (viaide.c).

 

#include <sys/cdefs.h>

__KERNEL_RCSID(0, "$NetBSD: viaide.c,v 1.32 2006/08/01 20:38:50 xtraeme Exp $");

 

static const struct pciide_product_desc pciide_nvidia_products[] = {

{ PCI_PRODUCT_NVIDIA_NFORCE_ATA100,

0,

"NVIDIA nForce IDE Controller",

via_chip_map

},

{ PCI_PRODUCT_NVIDIA_NFORCE2_ATA133,

0,

"NVIDIA nForce2 IDE Controller",

via_chip_map

},

{ PCI_PRODUCT_NVIDIA_NFORCE2_400_ATA133,

0,

"NVIDIA nForce2 Ultra 400 IDE Controller",

via_chip_map

},

{ PCI_PRODUCT_NVIDIA_NFORCE2_400_SATA,

0,

"NVIDIA nForce2 Ultra 400 Serial ATA Controller",

via_sata_chip_map

},

{ PCI_PRODUCT_NVIDIA_NFORCE3_ATA133,

0,

"NVIDIA nForce3 IDE Controller",

via_chip_map

},

{ PCI_PRODUCT_NVIDIA_NFORCE3_250_ATA133,

0,

"NVIDIA nForce3 250 IDE Controller",

via_chip_map

},

{ PCI_PRODUCT_NVIDIA_NFORCE3_250_SATA,

0,

"NVIDIA nForce3 250 Serial ATA Controller",

via_sata_chip_map

},

{ PCI_PRODUCT_NVIDIA_NFORCE3_250_SATA2,

0,

"NVIDIA nForce3 250 Serial ATA Controller",

via_sata_chip_map

},

{ PCI_PRODUCT_NVIDIA_NFORCE4_ATA133,

0,

"NVIDIA nForce4 IDE Controller",

via_chip_map

},

{ PCI_PRODUCT_NVIDIA_NFORCE4_SATA1,

0,

"NVIDIA nForce4 Serial ATA Controller",

via_sata_chip_map

},

{ PCI_PRODUCT_NVIDIA_NFORCE4_SATA2,

0,

"NVIDIA nForce4 Serial ATA Controller",

via_sata_chip_map

},

{ PCI_PRODUCT_NVIDIA_NFORCE430_ATA133,

0,

"NVIDIA nForce430 IDE Controller",

via_chip_map

},

{ PCI_PRODUCT_NVIDIA_NFORCE430_SATA1,

0,

"NVIDIA nForce430 Serial ATA Controller",

via_sata_chip_map

},

{ PCI_PRODUCT_NVIDIA_NFORCE430_SATA2,

0,

"NVIDIA nForce430 Serial ATA Controller",

via_sata_chip_map

},

{ PCI_PRODUCT_NVIDIA_MCP04_IDE,

0,

"NVIDIA MCP04 IDE Controller",

via_chip_map

},

{ PCI_PRODUCT_NVIDIA_MCP04_SATA,

0,

"NVIDIA MCP04 Serial ATA Controller",

via_sata_chip_map

},

{ PCI_PRODUCT_NVIDIA_MCP04_SATA2,

0,

"NVIDIA MCP04 Serial ATA Controller",

via_sata_chip_map

},

{ PCI_PRODUCT_NVIDIA_MCP55_IDE,

0,

"NVIDIA MCP55 IDE Controller",

via_chip_map

},

{ PCI_PRODUCT_NVIDIA_MCP55_SATA,

0,

"NVIDIA MCP55 Serial ATA Controller",

via_sata_chip_map

},

{ PCI_PRODUCT_NVIDIA_MCP55_SATA2,

0,

"NVIDIA MCP55 Serial ATA Controller",

via_sata_chip_map

},

{ 0,

0,

NULL,

NULL

}

};

 

2 JAPE The interrupt controller working in native or legacy mode. The correct reprogramming interrupt controller for PATA IDE and SATA IDE solve the blocking bus problem.

Link to comment
Share on other sites

My K8-Triton nForce4 is working - i have done nothing special so far.

I have a PATA hard disk - on which Mac OSX is installed and 2 SATA for Linux. (And my bios allows me to select which disk to boot so it simplifies the boot process).

 

Here is what I have at boot time:

esourceMatch</key><string ID="2">boot-uuid-media</string></dict>

Nov 12 20:34:46 localhost kernel[0]: Extension "com.apple.driver.AppleOnboardPCATA" has no kernel dependency.

Nov 12 20:34:46 localhost kernel[0]: USBF: 23.794 AppleUSBOHCI[0x212a000]::start OHCI controller will be unloaded across sleep

Nov 12 20:34:46 localhost kernel[0]: AppleNVIDIAnForceATA: NVIDIA nForce4 (CMD 0x170, CTR 0x374, IRQ 15, BM 0xf008)

Nov 12 20:34:46 localhost kernel[0]: AppleNVIDIAnForceATA: NVIDIA nForce4 (CMD 0x1f0, CTR 0x3f4, IRQ 14, BM 0xf000)

Nov 12 20:34:46 localhost kernel[0]: AppleVIAATADriver: VIA 8237 SATA (CMD 0x9f0, CTR 0xbf0, IRQ 23, BM 0xd000)

Nov 12 20:34:46 localhost kernel[0]: Got boot device = IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IDE0@6/AppleOnboardPCATARoot/PRI0@0/AppleNVIDIAnForceATA/ATADeviceNub@0/IOATABlockStorageDriver/IOATABlockStorageDevice/IOBlockStorageDriver/WDC WD800JB-00JJC0 Media/IOFDiskPartitionScheme/Untitled 1@1

 

 

 

 

But I had a problem with my second SATA disk - apparently Linux did not complain of any error but Mac OS X found - repeatidly- some problem and was giving me a lot of IOATABloickingBus. And I had to remove my second SATA drive. Then Mac OSX stopped to complain much.

 

But: mainly at boot time I have:

 

Nov 12 20:34:50 Amon configd[53]: posting notification com.apple.system.config.network_change

Nov 12 20:34:50 Amon lookupd[104]: lookupd (version 369.6) starting - Sun Nov 12 20:34:50 2006

Nov 12 20:34:52 Amon kernel[0]: IOATAController device blocking bus.

Nov 12 20:34:52 Amon diskarbitrationd[55]: disk0s2 msdos 00000000-0000-0000-0000-000000000000 RFV2 /Volumes/RFV2

Nov 12 20:34:53 Amon mDNSResponder: Adding browse domain local.

Nov 12 20:34:59 Amon kernel[0]: IOATAController device blocking bus.

Nov 12 20:35:01 Amon diskarbitrationd[55]: disk1s7 msdos 00000000-0000-0000-0000-000000000000 E-LIBRAIRY /Volumes/E-LIBRAIRY

Nov 12 20:35:02 Amon kernel[0]: IOATAController device blocking bus.

Nov 12 20:35:03 Amon diskarbitrationd[55]: disk1s8 msdos 00000000-0000-0000-0000-000000000000 PERSFOLDERS /Volumes/PERSFOLDERS

Nov 12 20:35:27 Amon configd[53]: target=enable-network: disabled

 

and I wonder if it is related with the problem you mention about the driver or the IOATAController blocking Bus is due to some other problems ?

 

Here is mt string from the Info.plist in the AppleVIAATA

 

<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>0x31491106 0x00e310de 0x005410de 0x005510de</st$

<key>IOProbeScore</key>

<string>1000</string>

<key>IOProviderClass</key>

<string>IOPCIDevice</string>

<key>Serial ATA</key>

<true/>

 

How can I check if it fits my controller ? ( I looked in the System Profiler but I cannot see anything like vendor ID or device).

 

I am asking because I feel sometime my Mac OS X has strange reaction sometimes... like forcing the fsck to run and crashing my FAT32 partition... An dI wonder if there would not be a relation with the driver issue ?

 

Thanx

 

Robert

Link to comment
Share on other sites

 Share

×
×
  • Create New...