nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   General Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=27)
-   -   nForce2 CPU C1 Disconnect Hang Fix (Semi-Official) (http://www.nvnews.net/vbulletin/showthread.php?t=28483)

nfarce 05-07-04 10:43 PM

nForce2 CPU C1 Disconnect Hang Fix (Semi-Official)
 
Fix for using APIC, IO-APIC and ACPI without any lockups caused by CPU transistioning to C1 disconnects causing the NForce2 hangs that everybody knows about. The fix is in current BitKeeper for 2.4.27 and 2.6.6 kernels.

From Allen Martin at nVidia to kernel mailing list, original mail available here. Conclusion, they've known about the problem forever but just didn't want to tell anybody and only included it in the small print for motherboard manufacturers to update their BIOS. (About bloody time, though Allen probably had to fight the evil sales force to get this released.)

Quote:

I'm happy to be able to make this information public to the Linux
community. This information has been previously released to BIOS /
board vendors as an appnote, but in the interest of getting a workaround
into the hands of users the quickest we're making it public for possible
inclusion into the Linux kernel.

Problem:
C1 Halt Disconnect problem on nForce2 systems

Description:
A hang is caused when the CPU generates a very fast CONNECT/HALT cycle
sequence.

Workaround:
Set the SYSTEM_IDLE_TIMEOUT to 80 ns. This allows the state-machine and
timer to return to a proper state within 80 ns of the CONNECT and probe
appearing together.

Since the CPU will not issue another HALT within 80 ns of the initial
HALT, the failure condition is avoided.

This will require changing the value for register at bus:0 dev:0 func:0
offset 6c.

Chip Current Value New Value
C17 1F0FFF01 1F01FF01
C18D 9F0FFF01 9F01FF01

Northbridge chip version may be determined by reading the PCI revision
ID (offset 8) of the host bridge at bus:0 dev:0 func:0. C1 or greater
is C18D.
Instant patch from the current IDE maintainer;

Quote:

diff -puN arch/i386/pci/fixup.c~nforce2_fix arch/i386/pci/fixup.c
--- linux-2.6.6-rc3-bk2/arch/i386/pci/fixup.c~nforce2_fix 2004-05-04 00:27:18.114421672 +0200
+++ linux-2.6.6-rc3-bk2-bzolnier/arch/i386/pci/fixup.c 2004-05-04 01:02:29.821393416 +0200
@@ -187,6 +187,39 @@ static void __devinit pci_fixup_transpar
dev->transparent = 1;
}

+/*
+ * Fixup for C1 Halt Disconnect problem on nForce2 systems.
+ *
+ * From information provided by "Allen Martin" <AMartin@nvidia.com>:
+ *
+ * A hang is caused when the CPU generates a very fast CONNECT/HALT cycle
+ * sequence. Workaround is to set the SYSTEM_IDLE_TIMEOUT to 80 ns.
+ * This allows the state-machine and timer to return to a proper state within
+ * 80 ns of the CONNECT and probe appearing together. Since the CPU will not
+ * issue another HALT within 80 ns of the initial HALT, the failure condition
+ * is avoided.
+ */
+static void __devinit pci_fixup_nforce2(struct pci_dev *dev)
+{
+ u32 val, fixed_val;
+ u8 rev;
+
+ pci_read_config_byte(dev, PCI_REVISION_ID, &rev);
+
+ /*
+ * Chip Old value New value
+ * C17 0x1F01FF01 0x1F0FFF01
+ * C18D 0x9F01FF01 0x9F0FFF01
+ */
+ fixed_val = rev < 0xC1 ? 0x1F01FF01 : 0x9F01FF01;
+
+ pci_read_config_dword(dev, 0x6c, &val);
+ if (val != fixed_val) {
+ printk(KERN_WARNING "PCI: nForce2 C1 Halt Disconnet fixup\n");
+ pci_write_config_dword(dev, 0x6c, fixed_val);
+ }
+}
+
struct pci_fixup pcibios_fixups[] = {
{
.pass = PCI_FIXUP_HEADER,
@@ -290,5 +323,11 @@ struct pci_fixup pcibios_fixups[] = {
.device = PCI_ANY_ID,
.hook = pci_fixup_transparent_bridge
},
+ {
+ .pass = PCI_FIXUP_HEADER,
+ .vendor = PCI_VENDOR_ID_NVIDIA,
+ .device = PCI_DEVICE_ID_NVIDIA_NFORCE2,
+ .hook = pci_fixup_nforce2
+ },
{ .pass = 0 }
};

matheusber 05-09-04 02:23 AM

Re: nForce2 CPU C1 Disconnect Hang Fix (Semi-Official)
 
i knew it ...

and i was just about to give this abit back, thinking was board related problem ...
just yesterday i found something in the internet that made me think i was wrong ...

i'm using 2.6.5, this patch is usual for me ?

if you let me ... i'd like to ask how to make my nforce2 sound to play more then one sound ... non alsa and the nvidia driver ( cant compile againts 2.6.x ) do ...

thanks

matheus

nfarce 05-09-04 05:58 PM

Re: nForce2 CPU C1 Disconnect Hang Fix (Semi-Official)
 
Yes, the same patch applies for both 2.4 and 2.6 kernels.

Sorry, I don't know about the onboard sound as I use a SB Live on my Asus A7N8X instead. However, I didn't think the OSS i810 and nVidia drivers could provide multiple inputs channels as its a hardware limitation (i.e. 1 only), isn't it? Are you sure you didn't have a sound daemon running previously?

matheusber 05-10-04 12:50 AM

Re: nForce2 CPU C1 Disconnect Hang Fix (Semi-Official)
 
Quote:

Originally Posted by nfarce
Yes, the same patch applies for both 2.4 and 2.6 kernels.

Sorry, I don't know about the onboard sound as I use a SB Live on my Asus A7N8X instead. However, I didn't think the OSS i810 and nVidia drivers could provide multiple inputs channels as its a hardware limitation (i.e. 1 only), isn't it? Are you sure you didn't have a sound daemon running previously?

great for the info about kernel ...

i dont know about multiple channels ... if is supported ... but i use windowmaker and no sound deamon for sure :)

i think i'll have to use a sblive also ... :/

i'll try to use the nvidia oficial sound driver ... ( must use 2.4.x :/ ) and oss as well ... i'm using alsa now ...

matheus

nfarce 05-10-04 01:15 AM

Re: nForce2 CPU C1 Disconnect Hang Fix (Semi-Official)
 
Unfortunately documentation isn't available for OSS or ALSA drivers to implement the hardware mixing possible with nVidia Soundstorm (apparently 32 channels).

I'm not sure if the nVida driver actually uses the available hardware mixing, but I presume so from your experience. I've never actually used it though.

connyosis 05-19-04 01:54 PM

Re: nForce2 CPU C1 Disconnect Hang Fix (Semi-Official)
 
The Linux driver for the onboard nforce2 sound does not support hardware mixing, only the windows driver does. People have been asking nVidia for ages now to either write a proper driver, or release specs so other developers can write a driver for it, but so far nothing has happened.


All times are GMT -5. The time now is 01:49 PM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.