Fixes for nforce2 hard lockup, apic, io-apic, udma133 covered
Greetings,
I am not subscribed so please cc responses.
I have monitored list and know my nforce2 experiences have been common. Attached patches are in a single bzip tar ball.
I have Albatron KM18G Pro & Epox 8RGA+ MOBOs both using nforce2 chipsets. I made up a kernel as follows.
Get std 2.4.22 src
apply patch-2.4.23
apply 2.4.22-low-latency.patch
apply preempt-kernel-rml-2.4.23-pre5-1.patch
apply vhz-j64-2.4.22.patch
One patch fails on inode.c, dispose_list() so I placed conditional_schedule() as follows =static void dispose_list(struct list_head *head)
={
= int nr_disposed = 0;
=
= while (!list_empty(head)) {
= struct inode *inode;
= conditional_schedule();
Config for athlon with 1000hz tics, preempt & low-lat on. Compiled and installed nvnet & nvidia video driver.
Disclaimer: The following information and code patches are not fully tested and may be dangerous, also these are the first patches I have made for public consumption so I hope that their format works.
Note also that the patches are against 2.4.22 even though they were developed against the heavily patched 2.4.23 mentioned above. The patch code is the same for both kernels but at different line numbers.
When I enabled either apic or io-apic in kern config, lockups came hard and fast. Particularly bad under hard disk load. Heaps of lost ints on irq7 in apic and ioapic mode. Lockups disappeared when I lowered the ide hda udma speed to mode 3 with hdparm so I went looking for answers which now follow.
There are three parts to this email.
a) apic mods.
b) io-apic mods
c) ide driver mods
a) Lockups are due to too fast an apic acknowledge of apic timer int.
Apic hard locked up the system - no nmi debug available.
Fixed it by introducing a delay of at least 500ns into smp_apic_timer_interrupt() just prior to ack_APIC_irq().
See attached diff file "nforce2-apic.c-2.4.22.patch" for details.
I have guessed at a suitable cpu speed dependent delay.
Perhaps someone with AMD cpu docs (apic timing specs) & analyser tools could refine it.
Maybe nforce2 chipset really is very quick accessing ram in dual dimm mode? Or AMD 2200XP has a really slow APIC?
arch/i386/kernel/apic.c +9 -0
@@ -1078,6 +1078,15 @@*/ apic_timer_irqs[cpu]++; +#ifdef CONFIG_MK7 &&CONFIG_BLK_DEV_AMD74XX +/* +* on 2200XP & nforce2 chipset we need at least 500ns delay here +* to stop lockups with udma100 drive. try to scale delay time +* with cpu speed. Ross Dickson. + */ +ndelay ((cpu_khz >>12 )+200 );/* don't ack too soon or hard lockup */ +#endif +/* * NOTE! We'd better ACK the irq immediately, * because timer handling can be slow.
b) I was also disappointed to see I could not have irq0 timer IO-APIC-edge. So I have fixed it too (tested on both my epox and albatron MOBOs). Firstly I found 8254 connected directly to pin 0 not pin 2 of io-apic. I have modified check_timer() in io_apic.c to trial connect pin and test for it after the existing test for connection to io-apic.
See attached diff file nforce2-io-apic.c-2.4.22 for details.
arch/i386/kernel/io_apic.c +36 -1
@@ -1614,9 +1614,44 @@return ; }clear_IO_APIC_pin (0 , pin1); -printk (KERN_ERR "..MP-BIOS bug: 8254 timer not connected to IO-APIC\n" ); +printk (KERN_ERR "..MP-BIOS bug: 8254 timer not connected to IO-APIC pin%d\n" ,pin1); } +#ifdef CONFIG_ACPI_BOOT &&CONFIG_X86_UP_IOAPIC +/* for nforce2 try vector 0 on pin0 +* Note the io_apic_set_pci_routing call disables the 8259 irq 0 +* so we must be connected directly to the 8254 timer if this works +* Note2: this violates the above comment re Subtle but works! + */ +printk (KERN_INFO "..TIMER: Is timer irq0 connected to IOAPIC Pin0? ...\n" ); +if ( pin1 !=-1 && nr_ioapics ) { +int saved_timer_ack = timer_ack; +/* next call also disables 8259 irq0 */ +int result =io_apic_set_pci_routing (0 ,0 ,0 ,0 ,0 ); +/* +* Ok, does IRQ0 through the IOAPIC work? +*/ +unmask_IO_APIC_irq (0 ); + timer_ack =0 ; +if (timer_irq_works ()) { +if (nmi_watchdog ==NMI_IO_APIC ) { +disable_8259A_irq (0 ); +setup_nmi (); +enable_8259A_irq (0 ); +check_nmi_watchdog (); + } +printk (KERN_INFO "..TIMER: works OK on apic pin0 irq0\n" ); +return ; + } +/* failed */ + timer_ack = saved_timer_ack; +clear_IO_APIC_pin (0 ,0 ); + result =io_apic_set_pci_routing (0 , pin1,0 ,0 ,0 ); +printk (KERN_ERR "..MP-BIOS bug: 8254 timer not connected to IO-APIC Pin 0\n" ); + } +#endif +/* end new stuff for nforce2 */ +printk (KERN_INFO "...trying to set up timer (IRQ0) through the 8259A ... " );if (pin2 !=-1 ) {printk ("\n..... (found pin %d) ..." , pin2);
c) Finally during my fault finding I merged A.Martins patches for the nforce2 IDE driver. I note that the nforce2 address setup timing bits are different to the AMD ones. I have assumed the nforce2 address timings apply to nforce and nforce3 chipsets. I could be wrong so if someone with the nvidia docs could check it please.
I have also not tested it with anything but a WDC ata100 hard drive.
For info see attached patch files (I think pci ids are already in 2.4.23) nforce2-amd74xx.c-2.4.22.patch, nforce2-amd74xx.h-2.4.22.patch, nforce2-pci_ids.h-2.4.22.patch
Thanks
Ross Dickson
Quoted 5 lines · Ross Dickson
b) I was also disappointed to see I could not have irq0 timer IO-APIC-edge. So I have fixed it too (tested on both my epox and albatron MOBOs). Firstly I found 8254 connected directly to pin 0 not pin 2 of io-apic. I have modified
check_timer()inio_apic.cto trial connect pin and test for it after the existing test for connection to io-apic.
I'm pretty sure this part is bogus. Have you actually verified it either
by using a hardware probe or at least by investigating documentation you really have IRQ 0 routed to the I/O APIC interrupt #0 (INTIN 0)? If no, then you can almost surely see interrupts travelling across the pair of 8259A PICS which are connected to the INTIN 0 input of the first I/O APIC in every IA32-based PC system providing an I/O APIC seen so far.
Signature · 3 lines
+ Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: [email protected], PGP key available +
Quoted 19 lines · Maciej W. Rozycki
Quoted 5 lines · Ross Dickson
b) I was also disappointed to see I could not have irq0 timer IO-APIC-edge. So I have fixed it too (tested on both my epox and albatron MOBOs). Firstly I found 8254 connected directly to pin 0 not pin 2 of io-apic. I have modified
check_timer()inio_apic.cto trial connect pin and test for it after the existing test for connection to io-apic.I'm pretty sure this part is bogus. Have you actually verified it either
by using a hardware probe or at least by investigating documentation you really have IRQ 0 routed to the I/O APIC interrupt #0 (INTIN 0)? If no, then you can almost surely see interrupts travelling across the pair of 8259A PICS which are connected to the INTIN 0 input of the first I/O APIC in every IA32-based PC system providing an I/O APIC seen so far.
Review
Quoted 3 lines
(quoted diff) +3
-0+ Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: [email protected], PGP key available +
Thanks Maciej for your response.
If everyone followed published recommendations then I would agree with your comments however nvidia? et al?.
I have no appropriate docs so I cannot confirm via a real hardware probe so I can only offer a software confirmation.
Background musings:
I was forced to approach the problems using somewhat educated guesses and with the tools I had at hand. As with most discoveries about black boxes the answer comes about by a combination of educated guess, luck and checking the unlikely. The apic delay (a) came about because the lockup problem went away when I put a debugging outb_p() statement flipping bits at the lpt port while I was trying to catch the frozen IRQ state info on my CRO. I was pleasantly surprised when the lockups ceased so I replaced the outb_p with a delay and trimmed it as best I could without docs. I did not change it within the Ack call as I realised that all the other normal apic ack paths had considerably more code delay time - although could this be a gotcha depending on what code path is in the driver. What if we had a really fast cpu or is it restricted solely to the timer irq??
Back to your query:
I approached the io-apic edge with the same what if?
I think I got it right but please check my following code to confirm. I have since hacked the kernel as follows.
WARNING Following Mods For Debugging Only!
In File i8259.c I needed to get to "cached_irq_mask"
/*
* This contains the irq mask for both 8259A irq controllers, */
//static unsigned int cached_irq_mask = 0xffff; debug ross unsigned int cached_irq_mask = 0xffff;
In File io_apic.c I have tried to fully mask the 8259.
/*
* This code may look a bit paranoid, but it's supposed to cooperate with
* a wide range of boards and BIOS bugs. Fortunately only the timer IRQ
* is so screwy. Thanks to Brian Perkins for testing/hacking this beast
* fanatically on his truly buggy board.
*/
// debug ross
extern spinlock_t i8259A_lock;
extern unsigned int cached_irq_mask;
static inline void check_timer(void)
{
....
<snip>
....
#ifdef CONFIG_ACPI_BOOT && CONFIG_X86_UP_IOAPIC
/* for nforce2 try vector 0 on pin0
* Note the io_apic_set_pci_routing call disables the 8259 irq 0
* so we must be connected directly to the 8254 timer if this works
* Note2: this violates the above comment re Subtle but works!
*/
printk(KERN_INFO "..TIMER: Is timer irq0 connected to IOAPIC Pin0? ...\n");
if ( pin1 != -1 && nr_ioapics ) {
int result, tok;
unsigned long flags;
unsigned int saved_cached_irq_mask;
unsigned char imr1, imr2;
int saved_timer_ack = timer_ack;
// disable all of 8259 irq's
spin_lock_irqsave(&i8259A_lock, flags);
saved_cached_irq_mask = cached_irq_mask;
cached_irq_mask = 0xffff;; // ensure nothing restores 8259 ints
outb(0xff, 0x21); /* mask all of 8259A-1 */
outb(0xff, 0xA1); /* mask all of 8259A-2 */
spin_unlock_irqrestore(&i8259A_lock, flags);
/*
* Ok, does IRQ0 through the IOAPIC work?
*/
/* next call also disables 8259 irq0 */
result = io_apic_set_pci_routing ( 0, 0, 0, 0, 0);
unmask_IO_APIC_irq(0);
timer_ack = 0 ;
spin_lock_irqsave(&i8259A_lock, flags);
imr1 = inb(0x21);
imr2 = inb(0xA1);
printk("..TIMER check 8259 ints disabled, imr1:%02x, imr2:%02x\n", imr1, imr2);
tok = timer_irq_works();
spin_unlock_irqrestore(&i8259A_lock, flags);
// restore 8259 mask
spin_lock_irqsave(&i8259A_lock, flags);
cached_irq_mask = saved_cached_irq_mask;
outb( cached_irq_mask & 0xff, 0x21 ); /* restore all of 8259A-1 */
outb( cached_irq_mask >> 8, 0xA1 ); /* restore all of 8259A-2 */
spin_unlock_irqrestore(&i8259A_lock, flags);
/*
* Ok, does IRQ0 through the IOAPIC work?
*/
// unmask_IO_APIC_irq(0);
// timer_ack = 0 ;
// if (timer_irq_works()) {
if (tok) {
if (nmi_watchdog == NMI_IO_APIC) {
disable_8259A_irq(0);
setup_nmi();
enable_8259A_irq(0);
check_nmi_watchdog();
}
printk(KERN_INFO "..TIMER: works OK on apic pin0 irq0\n" );
return;
}
/* failed */
timer_ack = saved_timer_ack;
clear_IO_APIC_pin(0, 0);
result = io_apic_set_pci_routing ( 0, pin1, 0, 0, 0);
printk(KERN_ERR "..MP-BIOS bug: 8254 timer not connected to IO-APIC Pin 0\n");
}#endif
/* end new stuff for nforce2 */
The inner spinlock around timer_irq_works() I think is redundant but I put it there for good measure.
Relevant dmesg output from Albatron KM18G Pro ( this is different MOBO (same type) but this time has a barton core 2500 XP cpu).
enabled ExtINT on CPU#0
ESR value before enabling vector: 00000000
ESR value after enabling vector: 00000000
ENABLING IO-APIC IRQs
init IO_APIC IRQs
IO-APIC (apicid-pin) 2-0, 2-16, 2-17, 2-18, 2-19, 2-20, 2-21, 2-22, 2-23 not connected.
..TIMER: vector=0x31 pin1=2 pin2=-1
..MP-BIOS bug: 8254 timer not connected to IO-APIC pin2
..TIMER: Is timer irq0 connected to IOAPIC Pin0? ...
IOAPIC[0]: Set PCI routing entry (2-0 -> 0x31 -> IRQ 0 Mode:0 Active:0) ..TIMER check 8259 ints disabled, imr1:ff, imr2:ff
..TIMER: works OK on apic pin0 irq0
Using local APIC timer interrupts.
calibrating APIC timer ...
..... CPU clock speed is 1829.0708 MHz.
..... host bus clock speed is 332.0674 MHz.
cpu: 0, clocks: 332674, slice: 166337 CPU0<T0:332672,T1:166320,D:15,S:166337,C:332674>
Please advise if anyone knows of extra registers which may have been added to the nforce2 8259 core which could allow the interrupts through the masked chip core? I note that they may exist after reading your email March 21 2002 (irq FosterP4)
http://www.ussg.iu.edu/hypermail/linux/kernel/0203.2/1213.html
Note that I think it is safe to leave the 8259 irq(0) implicitly disabled on failure exit as the code paths following my code patch do it anyway.
Regards
Ross.
Quoted 13 lines · Ross Dickson
Relevant dmesg output from Albatron KM18G Pro ( this is different MOBO (same type) but this time has a barton core 2500 XP cpu).
enabled ExtINT on CPU#0
ESR value before enabling vector: 00000000
ESR value after enabling vector: 00000000
ENABLING IO-APIC IRQs
initIO_APICIRQs
IO-APIC (apicid-pin) 2-0, 2-16, 2-17, 2-18, 2-19, 2-20, 2-21, 2-22, 2-23 not connected.
..TIMER: vector=0x31 pin1=2 pin2=-1
..MP-BIOS bug: 8254 timer not connected to IO-APIC pin2
..TIMER: Is timer irq0 connected to IOAPIC Pin0? ...
IOAPIC[0]: Set PCI routing entry (2-0 ->0x31-> IRQ 0 Mode:0 Active:0)
Quoted 8 lines
..TIMER check 8259 ints disabled, imr1:ff, imr2:ff ..TIMER: works OK on apic pin0 irq0
Using local APIC timer interrupts. calibrating APIC timer ...
..... CPU clock speed is 1829.0708 MHz. ..... host bus clock speed is 332.0674 MHz.
cpu: 0, clocks: 332674, slice: 166337 CPU0<T0:332672,T1:166320,D:15,S:166337,C:332674>
Hmm, while this is different from what is documented in the MP Spec, it
looks like the 8254 IRQ is connected to INTIN0 indeed. We can handle such a setup if the BIOS reports routing correctly. Since you invoke io_apic_set_pci_routing() I assume you use ACPI for IRQ routing information. Can you please rebuild the kernel with APIC_DEBUG set to 1 in include/asm-i386/apic.h and send me the bootstrap log? Can you please send me the output of a tool called `mptable' as well, so that I can compare the results?
Maciej
Signature · 3 lines
+ Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: [email protected], PGP key available +
Quoted 39 lines · Maciej W. Rozycki
Quoted 13 lines · Ross Dickson
Relevant dmesg output from Albatron KM18G Pro ( this is different MOBO (same type) but this time has a barton core 2500 XP cpu).
enabled ExtINT on CPU#0
ESR value before enabling vector: 00000000
ESR value after enabling vector: 00000000
ENABLING IO-APIC IRQs
initIO_APICIRQs
IO-APIC (apicid-pin) 2-0, 2-16, 2-17, 2-18, 2-19, 2-20, 2-21, 2-22, 2-23 not connected.
..TIMER: vector=0x31 pin1=2 pin2=-1
..MP-BIOS bug: 8254 timer not connected to IO-APIC pin2
..TIMER: Is timer irq0 connected to IOAPIC Pin0? ...
IOAPIC[0]: Set PCI routing entry (2-0 ->0x31-> IRQ 0 Mode:0 Active:0)Quoted 8 lines
..TIMER check 8259 ints disabled, imr1:ff, imr2:ff ..TIMER: works OK on apic pin0 irq0
Using local APIC timer interrupts. calibrating APIC timer ...
..... CPU clock speed is 1829.0708 MHz. ..... host bus clock speed is 332.0674 MHz.
cpu: 0, clocks: 332674, slice: 166337 CPU0<T0:332672,T1:166320,D:15,S:166337,C:332674>Hmm, while this is different from what is documented in the MP Spec, it
looks like the 8254 IRQ is connected to INTIN0 indeed. We can handle such a setup if the BIOS reports routing correctly. Since you invokeio_apic_set_pci_routing()I assume you use ACPI for IRQ routing information. Can you please rebuild the kernel withAPIC_DEBUGset to 1 ininclude/asm-i386/apic.hand send me the bootstrap log? Can you please send me the output of a tool called `mptable' as well, so that I can compare the results?Maciej
Review
Quoted 3 lines
(quoted diff) +3
-0+ Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: [email protected], PGP key available +
Thanks Maciej,
bootstrap log follows
CPI: RSDT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1dff3000
ACPI: FADT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1dff3040
ACPI: MADT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1dff7980
ACPI: DSDT (v001 NVIDIA AWRDACPI 0x00001000 MSFT 0x0100000e) @ 0x00000000
ACPI: Local APIC address 0xfee00000
Boot CPU = 0
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
Processor #0 Pentium(tm) Pro APIC version 16
Floating point unit present.
Machine Exception supported.
64 bit compare & exchange supported.
Internal APIC present.
SEP present.
MTRR present.
PGE present.
MCA present.
CMOV present.
PAT present.
PSE present.
MMX present.
FXSR present.
XMM present.
Bootup CPU
ACPI: LAPIC_NMI (acpi_id[0x00] polarity[0x1] trigger[0x1] lint[0x1])
ACPI: IOAPIC (id[0x02] address[0xfec00000] global_irq_base[0x0])
IOAPIC[0]: Assigned apic_id 2
IOAPIC[0]: apic_id 2, version 17, address 0xfec00000, IRQ 0-23
Bus #0 is ISA
Int: type 3, pol 0, trig 0, bus 0, irq 0, 2-0
Int: type 0, pol 0, trig 0, bus 0, irq 1, 2-1
Int: type 0, pol 0, trig 0, bus 0, irq 3, 2-3
Int: type 0, pol 0, trig 0, bus 0, irq 4, 2-4
Int: type 0, pol 0, trig 0, bus 0, irq 5, 2-5
Int: type 0, pol 0, trig 0, bus 0, irq 6, 2-6
Int: type 0, pol 0, trig 0, bus 0, irq 7, 2-7
Int: type 0, pol 0, trig 0, bus 0, irq 8, 2-8
Int: type 0, pol 0, trig 0, bus 0, irq 9, 2-9
Int: type 0, pol 0, trig 0, bus 0, irq 10, 2-10
Int: type 0, pol 0, trig 0, bus 0, irq 11, 2-11
Int: type 0, pol 0, trig 0, bus 0, irq 12, 2-12
Int: type 0, pol 0, trig 0, bus 0, irq 13, 2-13
Int: type 0, pol 0, trig 0, bus 0, irq 14, 2-14
Int: type 0, pol 0, trig 0, bus 0, irq 15, 2-15
ACPI: INT_SRC_OVR (bus[0] irq[0x0] global_irq[0x2] polarity[0x0] trigger[0x0])
Int: type 0, pol 0, trig 0, bus 0, irq 0, 2-2
ACPI: INT_SRC_OVR (bus[0] irq[0x9] global_irq[0x9] polarity[0x1] trigger[0x3])
Int: type 0, pol 1, trig 3, bus 0, irq 9, 2-9
ACPI BALANCE SET
Using ACPI (MADT) for SMP configuration information
Kernel command line: splash=silent root=/dev/hda2 hdc=ide-scsi hdclun=0ide_setup: hdc=ide-scsiide_setup: hdclun=0
mapped APIC to ffffe000 (fee00000)
mapped IOAPIC to ffffd000 (fec00000)
Initializing CPU#0
Detected 1830.076 MHz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 3620.86 BogoMIPS
Memory: 482980k/491456k available (1800k kernel code, 8088k reserved, 622k data, 112k init, 0k highmem) Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
Inode cache hash table entries: 32768 (order: 6, 262144 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 32768 (order: 5, 131072 bytes)
Page-cache hash table entries: 131072 (order: 7, 524288 bytes)
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 512K (64 bytes/line)
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU: After generic, caps: 0383fbff c1c3fbff 00000000 00000000 CPU: Common caps: 0383fbff c1c3fbff 00000000 00000000 CPU: AMD Athlon(tm) XP 2500+ stepping 00
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
Getting VERSION: 40010
Getting VERSION: 40010
Getting ID: 0
Getting ID: f000000
Getting LVT0: 700
Getting LVT1: 400
enabled ExtINT on CPU#0
ESR value before enabling vector: 00000000
ESR value after enabling vector: 00000000
ENABLING IO-APIC IRQs
Synchronizing Arb IDs.
init IO_APIC IRQs
IO-APIC (apicid-pin) 2-0, 2-16, 2-17, 2-18, 2-19, 2-20, 2-21, 2-22, 2-23 not connected.
..TIMER: vector=0x31 pin1=2 pin2=-1
..MP-BIOS bug: 8254 timer not connected to IO-APIC pin2
..TIMER: Is timer irq0 connected to IOAPIC Pin0? ...
IOAPIC[0]: Set PCI routing entry (2-0 -> 0x31 -> IRQ 0 Mode:0 Active:0) ..TIMER check 8259 ints disabled, imr1:ff, imr2:ff
..TIMER: works OK on apic pin0 irq0
Using local APIC timer interrupts.
calibrating APIC timer ...
..... CPU clock speed is 1829.0813 MHz.
..... host bus clock speed is 332.0693 MHz.
cpu: 0, clocks: 332693, slice: 166346 CPU0<T0:332688,T1:166336,D:6,S:166346,C:332693>
mtrr: v1.40 (20010327) Richard Gooch ([email protected])
mtrr: detected mtrr type: Intel
ACPI: Subsystem revision 20031002
PCI: PCI BIOS revision 2.10 entry at 0xfb4e0, last bus=2
PCI: Using configuration type 1
IOAPIC[0]: Set PCI routing entry (2-9 -> 0x71 -> IRQ 9 Mode:1 Active:0)
ACPI: Interpreter enabled
ACPI: Using IOAPIC for interrupt routing
ACPI: System [ACPI] (supports S0 S1 S4 S5)
ACPI: PCI Root Bridge [PCI0] (00:00)
PCI: Probing PCI hardware (bus 00)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.HUB0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.AGPB._PRT]
ACPI: PCI Interrupt Link [LNK1] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNK2] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNK3] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNK4] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNK5] (IRQs 3 4 *5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LUBA] (IRQs 3 4 *5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LUBB] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LMAC] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LAPU] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LACI] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LMCI] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LSMB] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LUB2] (IRQs 3 4 *5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LFIR] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [L3CM] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LIDE] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [APC1] (IRQs 16)
ACPI: PCI Interrupt Link [APC2] (IRQs 17)
ACPI: PCI Interrupt Link [APC3] (IRQs 18)
ACPI: PCI Interrupt Link [APC4] (IRQs 19)
ACPI: PCI Interrupt Link [APC5] (IRQs *16)
ACPI: PCI Interrupt Link [APCF] (IRQs 20 21 22)
ACPI: PCI Interrupt Link [APCG] (IRQs 20 21 22)
ACPI: PCI Interrupt Link [APCH] (IRQs 20 21 22)
ACPI: PCI Interrupt Link [APCI] (IRQs 20 21 22)
ACPI: PCI Interrupt Link [APCJ] (IRQs 20 21 22)
ACPI: PCI Interrupt Link [APCK] (IRQs 20 21 22)
ACPI: PCI Interrupt Link [APCS] (IRQs *23)
ACPI: PCI Interrupt Link [APCL] (IRQs 20 21 22)
ACPI: PCI Interrupt Link [APCM] (IRQs 20 21 22)
ACPI: PCI Interrupt Link [AP3C] (IRQs 20 21 22)
ACPI: PCI Interrupt Link [APCZ] (IRQs 20 21 22)
PCI: Probing PCI hardware
ACPI: PCI Interrupt Link [APCS] enabled at IRQ 23
IOAPIC[0]: Set PCI routing entry (2-23 -> 0xa9 -> IRQ 23 Mode:1 Active:0) 00:00:01[A] -> 2-23 -> IRQ 23
Pin 2-23 already programmed
ACPI: PCI Interrupt Link [APCF] enabled at IRQ 20
IOAPIC[0]: Set PCI routing entry (2-20 -> 0xb1 -> IRQ 20 Mode:1 Active:0) 00:00:02[A] -> 2-20 -> IRQ 20
ACPI: PCI Interrupt Link [APCG] enabled at IRQ 22
IOAPIC[0]: Set PCI routing entry (2-22 -> 0xb9 -> IRQ 22 Mode:1 Active:0) 00:00:02[B] -> 2-22 -> IRQ 22
ACPI: PCI Interrupt Link [APCL] enabled at IRQ 21
IOAPIC[0]: Set PCI routing entry (2-21 -> 0xc1 -> IRQ 21 Mode:1 Active:0) 00:00:02[C] -> 2-21 -> IRQ 21
ACPI: PCI Interrupt Link [APCH] enabled at IRQ 20
Pin 2-20 already programmed
ACPI: PCI Interrupt Link [APCI] enabled at IRQ 22
Pin 2-22 already programmed
ACPI: PCI Interrupt Link [APCJ] enabled at IRQ 21
Pin 2-21 already programmed
ACPI: PCI Interrupt Link [APCK] enabled at IRQ 20
Pin 2-20 already programmed
ACPI: PCI Interrupt Link [APCM] enabled at IRQ 22
Pin 2-22 already programmed
ACPI: PCI Interrupt Link [APCZ] enabled at IRQ 21
Pin 2-21 already programmed
ACPI: PCI Interrupt Link [APC3] enabled at IRQ 18
IOAPIC[0]: Set PCI routing entry (2-18 -> 0xc9 -> IRQ 18 Mode:1 Active:0) 00:01:06[A] -> 2-18 -> IRQ 18
ACPI: PCI Interrupt Link [APC4] enabled at IRQ 19
IOAPIC[0]: Set PCI routing entry (2-19 -> 0xd1 -> IRQ 19 Mode:1 Active:0) 00:01:06[B] -> 2-19 -> IRQ 19
ACPI: PCI Interrupt Link [APC1] enabled at IRQ 16
IOAPIC[0]: Set PCI routing entry (2-16 -> 0xd9 -> IRQ 16 Mode:1 Active:0) 00:01:06[C] -> 2-16 -> IRQ 16
ACPI: PCI Interrupt Link [APC2] enabled at IRQ 17
IOAPIC[0]: Set PCI routing entry (2-17 -> 0xe1 -> IRQ 17 Mode:1 Active:0) 00:01:06[D] -> 2-17 -> IRQ 17
Pin 2-19 already programmed
Pin 2-16 already programmed
Pin 2-17 already programmed
Pin 2-18 already programmed
Pin 2-16 already programmed
Pin 2-17 already programmed
Pin 2-18 already programmed
Pin 2-19 already programmed
ACPI: PCI Interrupt Link [APC5] enabled at IRQ 16
Pin 2-16 already programmed
number of MP IRQ sources: 15.
number of IO-APIC #2 registers: 24.
testing the IO APIC.......................
IO APIC #2......
.... register #00: 02000000
....... : physical APIC id: 02 ....... : Delivery Type: 0 ....... : LTS : 0 .... register #01: 00170011 ....... : max redirection entries: 0017 ....... : PRQ implemented: 0 ....... : IO APIC version: 0011
.... register #02: 00000000
....... : arbitration: 00
.... IRQ redirection table:
NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect:
00 001 01 0 0 0 0 0 1 1 31 01 001 01 0 0 0 0 0 1 1 39 02 000 00 0 0 0 0 0 0 0 00 03 001 01 0 0 0 0 0 1 1 41 04 001 01 0 0 0 0 0 1 1 49 05 001 01 0 0 0 0 0 1 1 51 06 001 01 0 0 0 0 0 1 1 59 07 001 01 0 0 0 0 0 1 1 61 08 001 01 0 0 0 0 0 1 1 69 09 001 01 0 1 0 0 0 1 1 71 0a 001 01 0 0 0 0 0 1 1 79 0b 001 01 0 0 0 0 0 1 1 81 0c 001 01 0 0 0 0 0 1 1 89 0d 001 01 0 0 0 0 0 1 1 91 0e 001 01 0 0 0 0 0 1 1 99 0f 001 01 0 0 0 0 0 1 1 A1 10 001 01 1 1 0 0 0 1 1 D9 11 001 01 1 1 0 0 0 1 1 E1 12 001 01 1 1 0 0 0 1 1 C9 13 001 01 1 1 0 0 0 1 1 D1 14 001 01 1 1 0 0 0 1 1 B1 15 001 01 1 1 0 0 0 1 1 C1 16 001 01 1 1 0 0 0 1 1 B9 17 001 01 1 1 0 0 0 1 1 A9
IRQ to pin mappings:
IRQ0 -> 0:2-> 0:0
IRQ1 -> 0:1
IRQ3 -> 0:3
IRQ4 -> 0:4
IRQ5 -> 0:5
IRQ6 -> 0:6
IRQ7 -> 0:7
IRQ8 -> 0:8
IRQ9 -> 0:9-> 0:9
IRQ10 -> 0:10
IRQ11 -> 0:11
IRQ12 -> 0:12
IRQ13 -> 0:13
IRQ14 -> 0:14
IRQ15 -> 0:15
IRQ16 -> 0:16
IRQ17 -> 0:17
IRQ18 -> 0:18
IRQ19 -> 0:19
IRQ20 -> 0:20
IRQ21 -> 0:21
IRQ22 -> 0:22
IRQ23 -> 0:23
.................................... done.
PCI: Using ACPI for IRQ routing
PCI: if you experience problems, try using option 'pci=noacpi' or even 'acpi=off'
mptable doesn't like my bios
I tried setting bios mp versions to both 1.1 and 1.4
albatron:/usr/src/mptable-2.0.15a # ./mptable -verbose
===============================================================================
MPTable, version 2.0.15 Linux
looking for EBDA pointer @ 0x040e, found, searching EBDA @ 0x0009fc00 searching CMOS 'top of mem' @ 0x0009f800 (638K)
searching default 'top of mem' @ 0x0009fc00 (639K) searching BIOS @ 0x000f0000
MP FPS found in BIOS @ physical addr: 0x000f50b0
-------------------------------------------------------------------------------
MP Floating Pointer Structure:
location: BIOS physical address: 0x000f50b0 signature: '_MP_' length: 16 bytes version: 1.1 checksum: 0x00 mode: Virtual Wire
-------------------------------------------------------------------------------
MP Config Table Header:
physical address: 0x0xf0c00
signature: '$ml$'
base table length: 0
version: 1.6
checksum: 0x00
OEM ID: 'Ä
¸§'
°öProduct ID: '(
m'P
OEM table pointer: 0x12d90e22
OEM table size: 7964
entry count: 7964
local APIC address: 0x1f1c1f1c
extended table length: 65284
extended table checksum: 255-------------------------------------------------------------------------------
MP Config Base Table Entries:
--
MPTABLE HOSED! record type = 55
albatron:/usr/src/mptable-2.0.15a #
Finally others working with kern 2.6 earlier trialled the following patch which may provide some more clues:
retrieved from:
http://www.kernel.org/pub/linux/kernel/people/bart/2.6.0-test11-bart1/broken-out/nforce2-apic.patch
[x86] do not wrongly override mp_ExtINT IRQ
From: Mathieu <[email protected]>.
With this patch timer IRQ0 is correctly set to IO-APIC-edge (not XT-PIC) on nForce2 boards when using APIC and ACPI.
arch/i386/kernel/mpparse.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-)
arch/i386/kernel/mpparse.c renamed from arch/i386/kernel/mpparse.c~nforce2-apic +2 -1
@@ -962,7 +962,8 @@ void __init mp_override_legacy_irq (*/ for (i =0 ; i < mp_irq_entries; i++) {if ((mp_irqs[i].mpc_dstapic == intsrc.mpc_dstapic) - && (mp_irqs[i].mpc_srcbusirq == intsrc.mpc_srcbusirq)) { + && (mp_irqs[i].mpc_srcbusirq == intsrc.mpc_srcbusirq) + && (mp_irqs[i].mpc_irqtype == intsrc.mpc_irqtype)) { mp_irqs[i] = intsrc; found =1 ;break ;
_
however the results were not completely successful as this posting shows it routing through the 8259?
http://linux.derkeiler.com/Mailing-Lists/Kernel/2003-12/1303.html
dmesg differences:
1.
after:
..TIMER: vector=0x31 pin1=2 pin2=0
before:
..TIMER: vector=0x31 pin1=2 pin2=-1
2.
after:
...trying to set up timer (IRQ0) through the 8259A ... ..... (found pin 0) ...works.
number of MP IRQ sources: 16.
before:
...trying to set up timer (IRQ0) through the 8259A ... failed. ...trying to set up timer as Virtual Wire IRQ... failed. ...trying to set up timer as ExtINT IRQ... works. number of MP IRQ sources: 15.
Perhaps someone else could get mptable to run on their machine and send you the result.
Regards
Ross
Quoted 49 lines · Ross Dickson
albatron:/usr/src/mptable-2.0.15a # ./mptable -verbose
===============================================================================
MPTable, version 2.0.15 Linux
looking for EBDA pointer @
0x040e, found, searching EBDA @0x0009fc00searching CMOS 'top of mem' @0x0009f800(638K)
searching default 'top of mem' @0x0009fc00(639K) searching BIOS @0x000f0000MP FPS found in BIOS @ physical addr:
0x000f50b0-------------------------------------------------------------------------------
MP Floating Pointer Structure:
location: BIOS physical address: 0x000f50b0 signature: '_MP_' length: 16 bytes version: 1.1 checksum: 0x00 mode: Virtual Wire-------------------------------------------------------------------------------
MP Config Table Header:
physical address: 0x0xf0c00 signature: '$ml$' base table length: 0 version: 1.6 checksum: 0x00 OEM ID: 'Ä ¸§' °öProduct ID: '( m'P OEM table pointer: 0x12d90e22 OEM table size: 7964 entry count: 7964 local APIC address: 0x1f1c1f1c extended table length: 65284 extended table checksum: 255-------------------------------------------------------------------------------
MP Config Base Table Entries:
Quoted 7 lines
--
MPTABLE HOSED! record type = 55
albatron:/usr/src/mptable-2.0.15a #Perhaps someone else could get mptable to run on their machine and send you the result.
mptable dosn't seem to accept it's own options, anyways, heres the output.
mptable -extra -verbose -pirq
===============================================================================
MPTable, version 2.0.15 Linux
looking for EBDA pointer @ 0x040e, found, searching EBDA @ 0x0009fc00 searching CMOS 'top of mem' @ 0x0009f800 (638K)
searching default 'top of mem' @ 0x0009fc00 (639K) searching BIOS @ 0x000f0000
MP FPS found in BIOS @ physical addr: 0x000f5ce0
-------------------------------------------------------------------------------
MP Floating Pointer Structure:
location: BIOS physical address: 0x000f5ce0 signature: '_MP_' length: 16 bytes version: 1.1 checksum: 0x00 mode: Virtual Wire
-------------------------------------------------------------------------------
MP Config Table Header:
physical address: 0x0xf0c00 signature: '' base table length: 1280 version: 1.7 checksum: 0x00 OEM ID: '' Product ID: '' OEM table pointer: 0x0000ffff OEM table size: 0 entry count: 65535 local APIC address: 0x000000c4 extended table length: 1 extended table checksum: 0
-------------------------------------------------------------------------------
MP Config Base Table Entries:
--
Processors: APIC ID Version State Family Model Step Flags
0 0x 7 BSP, usable 15 15 15 0x1a00c035
0 0x 0 AP, unusable 0 0 10 0x78ffff0a--
MPTABLE HOSED! record type = 15
I couldn't find the source so i used a old RedHat rpm... (Asus A7N8X-X bios 1007)
Signature · 1 line
Ian Kumlien <pomac () vapor ! com> -- http://pomac.netswarm.net
Quoted 110 lines · Ian Kumlien
Quoted 49 lines · Ross Dickson
albatron:/usr/src/mptable-2.0.15a # ./mptable -verbose
===============================================================================
MPTable, version 2.0.15 Linux
looking for EBDA pointer @
0x040e, found, searching EBDA @0x0009fc00searching CMOS 'top of mem' @0x0009f800(638K)
searching default 'top of mem' @0x0009fc00(639K) searching BIOS @0x000f0000MP FPS found in BIOS @ physical addr:
0x000f50b0-------------------------------------------------------------------------------
MP Floating Pointer Structure:
location: BIOS physical address: 0x000f50b0 signature: '_MP_' length: 16 bytes version: 1.1 checksum: 0x00 mode: Virtual Wire-------------------------------------------------------------------------------
MP Config Table Header:
physical address: 0x0xf0c00 signature: '$ml$' base table length: 0 version: 1.6 checksum: 0x00 OEM ID: 'Ä ¸§' °öProduct ID: '( m'P OEM table pointer: 0x12d90e22 OEM table size: 7964 entry count: 7964 local APIC address: 0x1f1c1f1c extended table length: 65284 extended table checksum: 255-------------------------------------------------------------------------------
MP Config Base Table Entries:
Quoted 7 lines
--
MPTABLE HOSED! record type = 55
albatron:/usr/src/mptable-2.0.15a #Perhaps someone else could get mptable to run on their machine and send you the result.
mptable dosn't seem to accept it's own options, anyways, heres the output.
mptable -extra -verbose -pirq
===============================================================================
MPTable, version 2.0.15 Linux
looking for EBDA pointer @
0x040e, found, searching EBDA @0x0009fc00searching CMOS 'top of mem' @0x0009f800(638K)
searching default 'top of mem' @0x0009fc00(639K) searching BIOS @0x000f0000MP FPS found in BIOS @ physical addr:
0x000f5ce0-------------------------------------------------------------------------------
MP Floating Pointer Structure:
location: BIOS physical address: 0x000f5ce0 signature: '_MP_' length: 16 bytes version: 1.1 checksum: 0x00 mode: Virtual Wire-------------------------------------------------------------------------------
MP Config Table Header:
physical address: 0x0xf0c00 signature: '' base table length: 1280 version: 1.7 checksum: 0x00 OEM ID: '' Product ID: '' OEM table pointer: 0x0000ffff OEM table size: 0 entry count: 65535 local APIC address: 0x000000c4 extended table length: 1 extended table checksum: 0-------------------------------------------------------------------------------
MP Config Base Table Entries:
--
Processors: APIC ID Version State Family Model Step Flags
Quoted 11 lines
0 0x 7 BSP, usable 15 15 15 0x1a00c035 0 0x 0 AP, unusable 0 0 10 0x78ffff0a--
MPTABLE HOSED! record type = 15I couldn't find the source so i used a old RedHat rpm... (Asus A7N8X-X bios 1007)
Signature · 1 line
Ian Kumlien <pomac () vapor ! com> -- http://pomac.netswarm.net
Thanks Ian
Also many thanks for pointing out the relevant section to look in with the AMD cpu link that you sent - Credit where credit is due (assuming we are both on the right track).
I had a read and refined your surmisings. I think the
problem appears synchronous with the apic timer because of two reasons.
1) any apic irq can cause re-connection of the system bus after disconnect.
2) the apic timer irq in my examinations has the shortest path to an ack.
I also had a look back through the athlon cooler and power management postings and web site articles. I was blissfully ignorant of these issues when I started and now I wonder what I have stepped into... Yuk
I submitted a support request to AMD, apologies for not cc'ing you, I kept the cc's down to just nvidia and the mailing list. If you have not seen it yet then it is here
http://lkml.org/lkml/2003/12/11/17
We hope....
Regards
Ross
Quoted 6 lines · Ross Dickson
On Thursday 11 December 2003 21:47, Ian Kumlien wrote:
Thanks IanAlso many thanks for pointing out the relevant section to look in with the AMD cpu link that you sent - Credit where credit is due (assuming we are both on the right track).
Heh, thanks, feels nice to have someone who agrees with you =).
Quoted 4 lines
I had a read and refined your surmisings. I think the
problem appears synchronous with the apic timer because of two reasons.
1) any apic irq can cause re-connection of the system bus after disconnect.
2) the apic timer irq in my examinations has the shortest path to an ack.
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/24416.pdf
Page 42 and 94 might help as well. I haven't grasped it all or had any food yet but i hope i'm right =)
Quoted 3 lines
I also had a look back through the athlon cooler and power management postings and web site articles. I was blissfully ignorant of these issues when I started and now I wonder what I have stepped into... Yuk
Heh, yeah, the need for disconnect is somewhat dodgy, i haven't read up on th rest.
Quoted 3 lines
I submitted a support request to AMD, apologies for not cc'ing you, I kept the cc's down to just nvidia and the mailing list. If you have not seen it yet then it is here
Thanks
Quoted 1 line
We hope....
Yup...
Signature · 1 line
Ian Kumlien <pomac () vapor ! com> -- http://pomac.netswarm.net
Quoted 3 lines · Ian Kumlien
Heh, yeah, the need for disconnect is somewhat dodgy, i haven't read up on th rest.
Hmm, weird. I went to go look at the Shuttle motherboard maker's site - maybe so that I can bug them for a bios disconnect option - but I checked for a bios update first. And sure enough like they read my mind, just posted online today, an update. Here are the details of fixes:
" Checksum: 8B00H Date Code: 12/05/03
1.Support 0.18 micron AMD Duron (Palomino) CPU.
2.Add C1 disconnect item."
It's almost as they're reading this list. This disconnect problem was discovered on the 5th (well the 5th in my timezone). Perhaps they're aware of this issue... I'm gonna talk to them.
Jesse
Quoted 8 lines · Jesse Allen
Quoted 3 lines · Ian Kumlien
Heh, yeah, the need for disconnect is somewhat dodgy, i haven't read up on th rest.
Hmm, weird. I went to go look at the Shuttle motherboard maker's site - maybe so that I can bug them for a bios disconnect option - but I checked for a bios update first. And sure enough like they read my mind, just posted online today, an update. Here are the details of fixes:
Quoted 8 lines
" Checksum: 8B00H Date Code: 12/05/03
1.Support 0.18 micron AMD Duron (Palomino) CPU.
2.Add C1 disconnect item."It's almost as they're reading this list. This disconnect problem was discovered on the 5th (well the 5th in my timezone). Perhaps they're aware of this issue... I'm gonna talk to them.
Jesse
A bios update for MSI K7N2 MCP2-T nforce2 board fixed the crashing BEFORE these patches were developed, but there was no documentation that would relate or explain.
http://www.msi.com.tw/program/support/bios/bos/spt_bos_detail.php?UID=436&kind=1
http://download.msi.com.tw/support/bos_exe/6570v76.exe
Award 7.6 at the top of the list. Maybe somebody can figure out what they're doing.
Nvidia X driver for ti4200 agp8 still locks up linux though, but X nv works fine. agp8 3d may expose the timer issue.
-Bob
Working nforce2, was Re: Fixes for nforce2 hard lockup, apic, io-apic, udma133 covered
Quoted 21 lines · Bob
Quoted 19 lines · Jesse Allen
Quoted 3 lines · Ian Kumlien
Heh, yeah, the need for disconnect is somewhat dodgy, i haven't read up on th rest.
Hmm, weird. I went to go look at the Shuttle motherboard maker's site - maybe so that I can bug them for a bios disconnect option - but I checked for a bios update first. And sure enough like they read my mind, just posted online today, an update. Here are the details of fixes:
" Checksum: 8B00H Date Code: 12/05/03
1.Support 0.18 micron AMD Duron (Palomino) CPU.
2.Add C1 disconnect item."It's almost as they're reading this list. This disconnect problem was discovered on the 5th (well the 5th in my timezone). Perhaps they're aware of this issue... I'm gonna talk to them.
Quoted 5 lines
Quoted 2 lines
Jesse
A bios update for MSI K7N2 MCP2-T nforce2 board fixed the crashing BEFORE these patches were developed, but there was no documentation that would relate or explain.
Last night, I updated the bios to the 12-5-03 released yesterday (see above). I looked at the new option under Advanced Chipset Features, "C1 Disconnect". It has three selections: Auto, Enabled, Disabled. There seems to be no default. The item help says:
"Force En/Disabled
or Auto mode:
C17 IGP/SPP NB A03
C18D SPP NM A01 (C01)
enabled C1 disconnect
otherwise disabled it"
Auto sounded nice, so I selected that first. I compiled a new kernel without the disconnect off patch, or the ack delay. These are the exact patches I used on 2.6.0-test11:
patch-2.6.0-test11-bk8.bz2
acpi-2.6.0t11.patch acpi bugfixes from Maciej.
nforce-ioapic-timer-2.6t11.patch from Ross Dickson. Timer patch.
forcedeth.patch Patch stolen from -test10-mm1? Unused.
forcedeth-update-2.patch Same.
Sure enough, under this kernel, no lockups. Athcool reported Disconnect was "on".
I decided to wait till this morning, to try the BIOS "C1 Disconnect" set to enabled. Still no lockups under this kernel. Tried a vanilla kernel, no lockups (but timer and watchdog messed up still). Now that I read your message Bob, I understand what you are saying. Luckily, the updated BIOS changelog states "Add C1 disconnect item." And this exact version seems to have fixed it, and now we have an exact fix (another one?) to refer to.
So the fix was absolutely a BIOS fix. It seems a lot of people have buggy BIOSes on nforce2 boards. Even some that have the option. I guess I haven't proved that it was the BIOS fix, because I haven't stressed it for a long period of time. But I don't believe I have to because I can do grep's and kernel compiles with disconnect on now, where before I couldn't (always been very easy to reproduce lockup).
Quoted 6 lines
http://www.msi.com.tw/program/support/bios/bos/spt_bos_detail.php?UID=436&kind=1
http://download.msi.com.tw/support/bos_exe/6570v76.exeAward 7.6 at the top of the list. Maybe somebody can figure out what they're doing.
I think I'll continue on contacting shuttle and ask them why they added the option, and how they added it. Maybe that will give us the right information.
Quoted 4 lines
Nvidia X driver for ti4200 agp8 still locks up linux though, but X nv works fine. agp8 3d may expose the timer issue.
That's either an nvidia driver problem, or agpgart-nforce problem. I'd try 4x agp, and or NVAGP (or agpgart, if already using NVAGP). If you think it's the timer, try the timer patch, or with nolapic noapic.
Jesse
Re: Working nforce2, was Re: Fixes for nforce2 hard lockup, apic, io-apic, udma133 covered
Oops, typo: NM supposed to be NB
Quoted 5 lines · Jesse Allen
The item help says:
"Force En/Disabled
or Auto mode:
C17 IGP/SPP NB A03
C18D SPP NM A01 (C01)
C18D SPP /NB/ A01 (C01)
Quoted 3 lines
enabled C1 disconnect
otherwise disabled it"
Maybe NB means northbridge?
Re: Working nforce2, was Re: Fixes for nforce2 hard lockup, apic, io-apic, udma133 covered
In reply to Jesse AllenQuoted 45 lines · Jesse Allen
Quoted 21 lines · Bob
Quoted 19 lines · Jesse Allen
Quoted 3 lines · Ian Kumlien
Heh, yeah, the need for disconnect is somewhat dodgy, i haven't read up on th rest.
Hmm, weird. I went to go look at the Shuttle motherboard maker's site - maybe so that I can bug them for a bios disconnect option - but I checked for a bios update first. And sure enough like they read my mind, just posted online today, an update. Here are the details of fixes:
" Checksum: 8B00H Date Code: 12/05/03
1.Support 0.18 micron AMD Duron (Palomino) CPU.
2.Add C1 disconnect item."It's almost as they're reading this list. This disconnect problem was discovered on the 5th (well the 5th in my timezone). Perhaps they're aware of this issue... I'm gonna talk to them.
Quoted 5 lines
Quoted 2 lines
Jesse
A bios update for MSI K7N2 MCP2-T nforce2 board fixed the crashing BEFORE these patches were developed, but there was no documentation that would relate or explain.
Last night, I updated the bios to the 12-5-03 released yesterday (see above). I looked at the new option under Advanced Chipset Features, "C1 Disconnect". It has three selections: Auto, Enabled, Disabled. There seems to be no default. The item help says:
"Force En/Disabled
or Auto mode:
C17 IGP/SPP NB A03
C18D SPP NM A01 (C01)
enabled C1 disconnect
otherwise disabled it"Auto sounded nice, so I selected that first. I compiled a new kernel without the disconnect off patch, or the ack delay. These are the exact patches I used on 2.6.0-test11:
patch-2.6.0-test11-bk8.bz2
acpi-2.6.0t11.patch acpi bugfixes from Maciej.
nforce-ioapic-timer-2.6t11.patch from Ross Dickson. Timer patch.
forcedeth.patch Patch stolen from -test10-mm1? Unused.
forcedeth-update-2.patch Same.Sure enough, under this kernel, no lockups. Athcool reported Disconnect was "on".
<snip>
Quoted 1 line
So the fix was absolutely a BIOS fix. It seems a lot of people have buggy BIOSes on nforce2 boards. Even some that have the option. I guess I haven't proved that it was the BIOS fix, because I haven't stressed it for a long period of time. But I don't believe I have to because I can do grep's and kernel compiles with disconnect on now, where before I couldn't (always been very easy to reproduce lockup).
<snip>
The thing that strikes me funny is that you get no crashes with the updated BIOS and Disconnect on, but without the updated BIOS we have to turn disconnect off with athcool or the patch? This makes me think that there is some voodoo going on in the BIOS update that they aren't saying, surprise surprise, or something is just slowing down the time it takes for it to crash. I say this because I have gone 5+ days without any of the patches from these threads, acpi apic lapic enabled, and CPU disconnect on as stated by athcool. This was with much stress testing, idle time, etc. One day I just ran a grep that I have done probably 30 times and boom, hang.
Good luck, hope the BIOS is the trick, now off to see how I can get ASUS to put the C1 Disconnect in the next revision.
Signature · 6 lines
Josh McKinney | Webmaster: http://joshandangie.org
--------------------------------------------------------------------------
| They that can give up essential liberty
Linux, the choice -o) | to obtain a little temporary safety deserve
of the GNU generation /\ | neither liberty or safety.
_\_v | -Benjamin FranklinRe: Working nforce2, was Re: Fixes for nforce2 hard lockup, apic, io-apic, udma133 covered
Quoted 6 lines · Josh McKinney
The thing that strikes me funny is that you get no crashes with the updated BIOS and Disconnect on, but without the updated BIOS we have to turn disconnect off with athcool or the patch? This makes me think that there is some voodoo going on in the BIOS update that they aren't saying, surprise surprise,
Yes, it is weird. I've now asked shuttle for more information.
Quoted 6 lines
or something is just slowing down the time
it takes for it to crash. I say this because I have gone 5+ days without any of the patches from these threads, acpi apic lapic enabled, and CPU disconnect on as stated by athcool. This was with much stress testing, idle time, etc. One day I just ran a grep that I have done probably 30 times and boom, hang.
I hope this is not the case! The one/two grep test worked flawlessly, but now if it's delayed, then I can't do that anymore.
(but at least I have the bios option now! heh)
I suggest you reference the Shuttle AN35 12-05-2003 BIOS, and maybe Bob's MSI, when you talk to Asus. If they can do it, then Asus should be able as well.
Jesse
Re: Working nforce2, was Re: Fixes for nforce2 hard lockup, apic, io-apic, udma133 covered
In reply to Josh McKinneyQuoted 61 lines · Josh McKinney
Quoted 45 lines · Jesse Allen
Quoted 21 lines · Bob
Quoted 19 lines · Jesse Allen
Quoted 3 lines · Ian Kumlien
Heh, yeah, the need for disconnect is somewhat dodgy, i haven't read up on th rest.
Hmm, weird. I went to go look at the Shuttle motherboard maker's site - maybe so that I can bug them for a bios disconnect option - but I checked for a bios update first. And sure enough like they read my mind, just posted online today, an update. Here are the details of fixes:
" Checksum: 8B00H Date Code: 12/05/03
1.Support 0.18 micron AMD Duron (Palomino) CPU.
2.Add C1 disconnect item."It's almost as they're reading this list. This disconnect problem was discovered on the 5th (well the 5th in my timezone). Perhaps they're aware of this issue... I'm gonna talk to them.
Quoted 5 lines
Quoted 2 lines
Jesse
A bios update for MSI K7N2 MCP2-T nforce2 board fixed the crashing BEFORE these patches were developed, but there was no documentation that would relate or explain.
Last night, I updated the bios to the 12-5-03 released yesterday (see above). I looked at the new option under Advanced Chipset Features, "C1 Disconnect". It has three selections: Auto, Enabled, Disabled. There seems to be no default. The item help says:
"Force En/Disabled
or Auto mode:
C17 IGP/SPP NB A03
C18D SPP NM A01 (C01)
enabled C1 disconnect
otherwise disabled it"Auto sounded nice, so I selected that first. I compiled a new kernel without the disconnect off patch, or the ack delay. These are the exact patches I used on 2.6.0-test11:
patch-2.6.0-test11-bk8.bz2
acpi-2.6.0t11.patch acpi bugfixes from Maciej.
nforce-ioapic-timer-2.6t11.patch from Ross Dickson. Timer patch.
forcedeth.patch Patch stolen from -test10-mm1? Unused.
forcedeth-update-2.patch Same.Sure enough, under this kernel, no lockups. Athcool reported Disconnect was "on".
<snip>
Quoted 1 line
So the fix was absolutely a BIOS fix. It seems a lot of people have buggy BIOSes on nforce2 boards. Even some that have the option. I guess I haven't proved that it was the BIOS fix, because I haven't stressed it for a long period of time. But I don't believe I have to because I can do grep's and kernel compiles with disconnect on now, where before I couldn't (always been very easy to reproduce lockup).
<snip>
The thing that strikes me funny is that you get no crashes with the updated BIOS and Disconnect on, but without the updated BIOS we have to turn disconnect off with athcool or the patch? This makes me think that there is some voodoo going on in the BIOS update that they aren't saying, surprise surprise, or something is just slowing down the time it takes for it to crash. I say this because I have gone 5+ days without any of the patches from these threads, acpi apic lapic enabled, and CPU disconnect on as stated by athcool. This was with much stress testing, idle time, etc. One day I just ran a grep that I have done probably 30 times and boom, hang.
Quoted 2 lines
Good luck, hope the BIOS is the trick, now off to see how I can get ASUS to put the C1 Disconnect in the next revision.
Yes, thats how it was for me.. I was the only one here saying "no problems, la la la", then at about 5.25 days.. boom. Then the next day it crashed twice. Hopefully you make some progress with ASUS.. (for the A7N8X Deluxe as well as you mobo please :) ).
Ive been playing with hardware in the past few days (new quieter Zalman PSU, and Zalman 7000 Cu fan etc) so no uptime to speak of here now. I did compile KDE 3.2 beta 2 last night though.. 6 hours of solid compilation.. no hassles. I have never turned off Disconnect either.
Thanks to all you guys who are working on this one. Seems to be getting somewhere.
Craig
Re: Working nforce2, was Re: Fixes for nforce2 hard lockup, apic, io-apic, udma133 covered
In reply to Josh McKinneyRe: two instances of good but undocumented bios voodoo
Quoted 17 lines · Josh McKinney
Quoted 14 lines · Jesse Allen
Quoted 11 lines · Bob
Quoted 7 lines · Jesse Allen
On Thu, Dec 11, 2003 at 06:52:41PM +0100, Ian Kumlien wrote:
............
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
but I checked for a bios update first. And sure enough like they read my mind, just posted online today, an update. Here are the details of fixes:
" Checksum: 8B00H Date Code: 12/05/03
1.Support 0.18 micron AMD Duron (Palomino) CPU.
2.Add C1 disconnect item."..........Jesse
-Jesse got a bios update that gives him a cpu disconnect option now in setup
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
A bios update for MSI K7N2 MCP2-T nforce2 board fixed the crashing BEFORE these patches were developed, but there was no documentation that would relate or explain.
-Bob said that about his bios update fixing the lockup problem entirely, but no doc, needing no patch except to turn on ioapic edge timer(another clue--without ioapic
edge timer working bios update fixed this nforce2 situation!), no clue as to whether bios update sets cpu disconnect one way or the other, no opt to choose cpu disconnect in new or old setup.
Jesse continues--
Quoted 14 lines
Quoted 14 lines
Last night, I updated the bios to the 12-5-03 released yesterday (see above). I looked at the new option under Advanced Chipset Features, "C1 Disconnect". It has three selections: Auto, Enabled, Disabled. There seems to be no default. The item help says:
"Force En/Disabled or Auto mode:
C17 IGP/SPP NB A03
C18D SPP NM A01 (C01)
enabled C1 disconnect
otherwise disabled it"Auto sounded nice, so I selected that first. I compiled a new kernel without the disconnect off patch, or the ack delay. These are the exact patches I used on 2.6.0-test11:
patch-2.6.0-test11-bk8.bz2
acpi-2.6.0t11.patch acpi bugfixes from Maciej.
nforce-ioapic-timer-2.6t11.patch from Ross Dickson. Timer patch.
forcedeth.patch Patch stolen from -test10-mm1? Unused.
forcedeth-update-2.patch Same.
Quoted 3 lines
Quoted 3 lines
Sure enough, under this kernel, no lockups. Athcool reported Disconnect was "on".
Disconnect was ON!!!
Quoted 1 line
<snip> ...one case the bios update fixed the problem
without needing cpu disconnect off, the other case we don't know how or whether cpu disconnect is on or off now but bios update fixed nforce2 without turning ioapic edge timer on. I guess these two case prove that neither cpu disconnect =on or ioapic timer =off are causing the problem directly.
Quoted 11 lines
The thing that strikes me funny is that you get no crashes with the updated BIOS and Disconnect on, but without the updated BIOS we have to turn disconnect off with athcool or the patch? This makes me think that there is some voodoo going on in the BIOS update that they aren't saying, surprise surprise, or something is just slowing down the time it takes for it to crash. I say this because I have gone 5+ days without any of the patches from these threads, acpi apic lapic enabled, and CPU disconnect on as stated by athcool. This was with much stress testing, idle time, etc. One day I just ran a grep that I have done probably 30 times and boom, hang.
Quoted 3 lines
Good luck, hope the BIOS is the trick, now off to see how I can get ASUS to put the C1 Disconnect in the next revision.
...and at least two motherboard makers have voodoo to fix the problem.
Re: Working nforce2, was Re: Fixes for nforce2 hard lockup, apic, io-apic, udma133 covered
In reply to Jesse Allenhackers be clever--
"system temperature was getting -- above 40 deg C. CPU was getting up to 49 deg C...how poorly it's thermal management was operating then. Now with the new patches, and ultimately, BIOS update, system temperature is about 35 deg C -JesseAllen"
Maybe that tells me that my bios update fixed my lockup problems without turning on cpu disconnect or even by turning it off with no doc as face-saver and not allowing me to see a choice in setup, since like yours before cpu disconnect working my temp is 41C most of the time and 48C under a heavy load, possibly 49C, the exact range you are looking at before you had cpu disconnect working
or they turned cpu disconnect off without saying
anything, buying time, saving embarrassment
anyway it's probably off here since I have exactly the same heat profile
I have 120mm fans one in one out, blowing air
across Zalman cpu and gpu heatsinks, no 80mm
extra Zalman fan. amd xp 3000+ 333mhz 1:1
arctic silver compound on heatsinks
Thermal 1: ok, 41.0 degrees C 105.8 degrees F
- 41C in X, running realplayer
- 48C compile a fat kernel or several heavy tasks
-Bob
Quoted 8 lines · Jesse Allen
....I compiled a new kernel without the disconnect off patch, or the ack delay. These are the exact patches I used on 2.6.0-test11:
patch-2.6.0-test11-bk8.bz2
acpi-2.6.0t11.patch acpi bugfixes from Maciej. nforce-ioapic-timer-2.6t11.patch from Ross Dickson. Timer patch. forcedeth.patch Patch stolen from -test10-mm1? Unused. forcedeth-update-2.patch Same.
Quoted 6 lines
Sure enough, under this kernel, no lockups. Athcool reported Disconnect was "on".
I decided to wait till this morning, to try the BIOS "C1 Disconnect" set to enabled. Still no lockups under this kernel. Tried a vanilla kernel, no lockups (but timer and watchdog messed up still). Now that I read your message Bob, I understand what you are saying. Luckily, the updated BIOS changelog states "Add C1 disconnect item." And this exact version seems to have fixed it, and now we have an exact fix (another one?) to refer to.
So the fix was absolutely a BIOS fix.
...but we're stuck looking at smoke and mirrors,
when the kernel might be able to work around
bioses that have not been "updated". Or to put
it another way, "voodoo" may be done by
kernel if not done by bios. Whatever is being
tweaked may be accessible to kernel code.
I can't read anything useful in my bios flash
file w6570nms.760 which is contained in--
Quoted 9 lines
Quoted 8 lines
http://download.msi.com.tw/support/bos_exe/6570v76.exe
Nvidia X driver for ti4200 agp8 still locks up linux though, but X nv works fine. agp8 3d may expose the timer issue.
Quoted 4 lines
That's either an nvidia driver problem, or agpgart-nforce problem. I'd try 4x agp, and or NVAGP (or agpgart, if already using NVAGP). If you think it's the timer, try the timer patch, or with nolapic noapic.
Jesse
Thanks, I've tried all of those except passing agp4 or agp2 to the nvidia X "nvidia" driver. Another clue that it's related to interrupts or timing of access to interrupts is that before I put another card on the pci bus I could get into X for a few seconds with the nvidia driver before linux locked up, now with an elan pcmcia 32-bit cardbus pci card that claims it needs its own interrupt(can't give it one yet!) X just locks up linux on load.
My mptable output looks pretty weird. (Product ID "ny Key "?) It doesn't even compare to the other two. I have a shuttle AN35N.
===============================================================================
MPTable, version 2.0.15 Linux
-------------------------------------------------------------------------------
MP Floating Pointer Structure:
location: BIOS
physical address: 0x000f5650
signature: '_MP_'
length: 16 bytes
version: 1.1
checksum: 0x00
mode: Virtual Wire
-------------------------------------------------------------------------------
MP Config Table Header:
physical address: 0x0xf0c00
signature: 'N '
base table length: 8224
version: 1.32
checksum: 0x20
OEM ID: ' : '
Product ID: 'ny Key '
OEM table pointer: 0x2031462d
OEM table size: 17152
entry count: 29300
local APIC address: 0x32462d6c
extended table length: 32
extended table checksum: 67
-------------------------------------------------------------------------------
MP Config Base Table Entries:
--
MPTABLE HOSED! record type = 114
Not really sure what I'm looking at here but as you guys are showing this information I thought it might be helpful for those that can use it to have the information run on a Asus A7N8X Deluxe (v2.0 bios 1007) with Athlon XP 2600+.
===============================================================================
MPTable, version 2.0.15 Linux
-------------------------------------------------------------------------------
MP Floating Pointer Structure:
location: BIOS physical address: 0x000f5ce0 signature: '_MP_' length: 16 bytes version: 1.1 checksum: 0x00 mode: Virtual Wire
-------------------------------------------------------------------------------
MP Config Table Header:
physical address: 0x0xf0c00
signature: '
'
base table length: 65287 version: 1.255 checksum: 0x04 OEM ID: '' Product ID: '' OEM table pointer: 0x00000704 OEM table size: 15 entry count: 3896 local APIC address: 0x00070500 extended table length: 3584 extended table checksum: 0
-------------------------------------------------------------------------------
MP Config Base Table Entries:
--
Processors: APIC ID Version State Family Model Step
Flags
13 0x 0 AP, usable 3 0 0
0xff070600
0 0xff BSP, usable 0 12 4 0x0001
--
MPTABLE HOSED! record type = 53
Craig
Quoted 50 lines · Jesse Allen
My mptable output looks pretty weird. (Product ID "ny Key "?) It doesn't even compare to the other two. I have a shuttle AN35N.
===============================================================================
MPTable, version 2.0.15 Linux
-------------------------------------------------------------------------------
MP Floating Pointer Structure:
location: BIOS
physical address:0x000f5650
signature: '_MP_'
length: 16 bytes
version: 1.1
checksum:0x00
mode: Virtual Wire-------------------------------------------------------------------------------
MP Config Table Header:
physical address: 0x0xf0c00
signature: 'N '
base table length: 8224
version: 1.32
checksum:0x20
OEM ID: ' : '
Product ID: 'ny Key '
OEM table pointer:0x2031462d
OEM table size: 17152
entry count: 29300
local APIC address:0x32462d6c
extended table length: 32
extended table checksum: 67-------------------------------------------------------------------------------
MP Config Base Table Entries:
--
MPTABLE HOSED! record type = 114
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 5 lines · Craig Bradney
Not really sure what I'm looking at here but as you guys are showing this information I thought it might be helpful for those that can use it to have the information run on a Asus A7N8X Deluxe (v2.0 bios 1007) with Athlon XP 2600+.
Unfortunately, it looks as all our MP tables are invalid. So I don't think we can use them. I thought mine was especailly weird because of the Product ID seems to be pointing to a "Press Any Key" string which proves that.
Jesse
Quoted 5 lines · Ross Dickson
ACPI: IOAPIC (id[0x02] address[0xfec00000] global_irq_base[0x0]) IOAPIC[0]: Assigned
apic_id2
IOAPIC[0]:apic_id2, version 17, address0xfec00000, IRQ 0-23 Bus #0 is ISA
Int: type 3, pol 0, trig 0, bus 0, irq 0, 2-0
I've browsed the relevant part of the ACPI spec and the above entry is
incorrect. It looks like INTIN0 is now the preferred line for the 8254 timer; at least it is the default one when using ACPI tables. This is a bug in Linux.
Quoted 2 lines
ACPI:
INT_SRC_OVR(bus[0] irq[0x0] global_irq[0x2] polarity[0x0] trigger[0x0])
Int: type 0, pol 0, trig 0, bus 0, irq 0, 2-2
Now this is an explicit entry stating the 8254 timer is connected to
INTIN2. If this is not the case, the BIOS is buggy and the solution is to fix it. I don't consider it possible to be worked around in Linux except maybe with a command line option added manually.
Quoted 2 lines
ACPI:
INT_SRC_OVR(bus[0] irq[0x9] global_irq[0x9] polarity[0x1] trigger[0x3])
Int: type 0, pol 1, trig 3, bus 0, irq 9, 2-9
And yet another explicit entry which has an effect on configuration as
reported below.
Quoted 4 lines
init
IO_APICIRQs
IO-APIC (apicid-pin) 2-0, 2-16, 2-17, 2-18, 2-19, 2-20, 2-21, 2-22, 2-23 not connected.
..TIMER: vector=0x31 pin1=2 pin2=-1
..MP-BIOS bug: 8254 timer not connected to IO-APIC pin2
As reported above, the BIOS explicitly reports the timer is there.
Quoted 4 lines
..TIMER: Is timer irq0 connected to IOAPIC Pin0? ... IOAPIC[0]: Set PCI routing entry (2-0 ->
0x31-> IRQ 0 Mode:0 Active:0) ..TIMER check 8259 ints disabled, imr1:ff, imr2:ff
..TIMER: works OK on apic pin0 irq0
And this may be correct if the default ACPI settings reflect the actual
wiring of this board (but the BIOS says otherwise).
Quoted 2 lines
IRQ to pin mappings:
IRQ0 -> 0:2-> 0:0
[...]
Quoted 1 line
IRQ9 -> 0:9-> 0:9
These two entries are wrong -- the interrupts are set up as if they were
connected to multiple I/O APIC inputs. The first entry is a result of your hack, but the second one suggests a bug somewhere.
Quoted 7 lines
Finally others working with kern 2.6 earlier trialled the following patch which may provide some more clues:
retrieved from:http://www.kernel.org/pub/linux/kernel/people/bart/2.6.0-test11-bart1/broken-out/nforce2-apic.patch
[x86] do not wrongly override
mp_ExtINTIRQ
That's a workaround to the bug in Linux I've mentioned earlier. The bug
should be fixed instead. The ACPI spec doesn't support mixed configurations, so ExtINT is irrelevant.
Quoted 2 lines
Perhaps someone else could get mptable to run on their machine and send you the result.
I wanted it to compare with the ACPI table and possibly to treat as a
reference for a workaround. Since you have no valid MP-table, there's nothing to do.
Here's a patch that fixes a few bugs I've spotted browsing through our
ACPI code. Please try it and report the result. I don't have a system with ACPI available, so I cannot verify the changes at all.
The same bugs are present in 2.4 and I have a corresponding patch
available if some wants to test the changes with that version.
Maciej
Signature · 38 lines
+ Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: [email protected], PGP key available + patch-mips-2.6.0-test11-20031209-acpi-irq0-1 diff -up --recursive --new-file linux-mips-2.6.0-test11-20031209.macro/arch/i386/kernel/mpparse.c linux-mips-2.6.0-test11-20031209/arch/i386/kernel/mpparse.c --- linux-mips-2.6.0-test11-20031209.macro/arch/i386/kernel/mpparse.c 2003-11-25 04:57:01.000000000 +0000 +++ linux-mips-2.6.0-test11-20031209/arch/i386/kernel/mpparse.c 2003-12-11 09:43:26.000000000 +0000 @@ -940,7 +940,7 @@ void __init mp_override_legacy_irq ( * erroneously sets the trigger to level, resulting in a HUGE * increase of timer interrupts! */ - if ((bus_irq == 0) && (global_irq == 2) && (trigger == 3)) + if ((bus_irq == 0) && (trigger == 3)) trigger = 1; intsrc.mpc_type = MP_INTSRC; @@ -961,7 +961,7 @@ void __init mp_override_legacy_irq ( * Otherwise create a new entry (e.g. global_irq == 2). */ for (i = 0; i < mp_irq_entries; i++) { - if ((mp_irqs[i].mpc_dstapic == intsrc.mpc_dstapic) + if ((mp_irqs[i].mpc_srcbus == intsrc.mpc_srcbus) && (mp_irqs[i].mpc_srcbusirq == intsrc.mpc_srcbusirq)) { mp_irqs[i] = intsrc; found = 1; @@ -1008,9 +1008,10 @@ void __init mp_config_acpi_legacy_irqs ( */ for (i = 0; i < 16; i++) { - if (i == 2) continue; /* Don't connect IRQ2 */ + if (i == 2) + continue; /* Don't connect IRQ2 */ - intsrc.mpc_irqtype = i ? mp_INT : mp_ExtINT; /* 8259A to #0 */ + intsrc.mpc_irqtype = mp_INT; intsrc.mpc_srcbusirq = i; /* Identity mapped */ intsrc.mpc_dstirq = i;
Trying to get a grasp on the all the fixes floating around. I have been running the first "timer" patch, the two liner to mpparse.c, for about five days until I made it crash with by catting 4 drives to /dev/null. It crashed after I turned on disconnect with athcool, so that may be related, because I could crash it with disconnect off. Now I am running both of Ross's patches for 2.6 for just 10 hours, but disconnect is still enabled, so far so good.
So the consensus seems to be that Ross's timer patch and the disconnect OR delay ACK patch is the mostly *correct* fix? As of right now I am compiling kernels with the disconnect patch and ross's timer patch, and one with those fixes and Maciej's acpi fixes below. Should I try it with just the acpi fixes sent by Maciej or are these just general fixes?
I also tried running mptable, but the output is "hosed".
Thanks
Quoted 124 lines · Maciej W. Rozycki
Quoted 5 lines · Ross Dickson
ACPI: IOAPIC (id[0x02] address[0xfec00000] global_irq_base[0x0]) IOAPIC[0]: Assigned
apic_id2
IOAPIC[0]:apic_id2, version 17, address0xfec00000, IRQ 0-23 Bus #0 is ISA
Int: type 3, pol 0, trig 0, bus 0, irq 0, 2-0I've browsed the relevant part of the ACPI spec and the above entry is
incorrect. It looks like INTIN0 is now the preferred line for the 8254 timer; at least it is the default one when using ACPI tables. This is a bug in Linux.Quoted 2 lines
ACPI:
INT_SRC_OVR(bus[0] irq[0x0] global_irq[0x2] polarity[0x0] trigger[0x0])
Int: type 0, pol 0, trig 0, bus 0, irq 0, 2-2Now this is an explicit entry stating the 8254 timer is connected to
INTIN2. If this is not the case, the BIOS is buggy and the solution is to fix it. I don't consider it possible to be worked around in Linux except maybe with a command line option added manually.Quoted 2 lines
ACPI:
INT_SRC_OVR(bus[0] irq[0x9] global_irq[0x9] polarity[0x1] trigger[0x3])
Int: type 0, pol 1, trig 3, bus 0, irq 9, 2-9And yet another explicit entry which has an effect on configuration as
reported below.Quoted 4 lines
init
IO_APICIRQs
IO-APIC (apicid-pin) 2-0, 2-16, 2-17, 2-18, 2-19, 2-20, 2-21, 2-22, 2-23 not connected.
..TIMER: vector=0x31 pin1=2 pin2=-1
..MP-BIOS bug: 8254 timer not connected to IO-APIC pin2As reported above, the BIOS explicitly reports the timer is there.
Quoted 4 lines
..TIMER: Is timer irq0 connected to IOAPIC Pin0? ... IOAPIC[0]: Set PCI routing entry (2-0 ->
0x31-> IRQ 0 Mode:0 Active:0) ..TIMER check 8259 ints disabled, imr1:ff, imr2:ff
..TIMER: works OK on apic pin0 irq0And this may be correct if the default ACPI settings reflect the actual
wiring of this board (but the BIOS says otherwise).Quoted 2 lines
IRQ to pin mappings:
IRQ0 -> 0:2-> 0:0[...]
Quoted 1 line
IRQ9 -> 0:9-> 0:9
These two entries are wrong -- the interrupts are set up as if they were
connected to multiple I/O APIC inputs. The first entry is a result of your hack, but the second one suggests a bug somewhere.Quoted 7 lines
Finally others working with kern 2.6 earlier trialled the following patch which may provide some more clues:
retrieved from:http://www.kernel.org/pub/linux/kernel/people/bart/2.6.0-test11-bart1/broken-out/nforce2-apic.patch
[x86] do not wrongly override
mp_ExtINTIRQThat's a workaround to the bug in Linux I've mentioned earlier. The bug
should be fixed instead. The ACPI spec doesn't support mixed configurations, so ExtINT is irrelevant.Quoted 2 lines
Perhaps someone else could get mptable to run on their machine and send you the result.
I wanted it to compare with the ACPI table and possibly to treat as a
reference for a workaround. Since you have no valid MP-table, there's nothing to do.Here's a patch that fixes a few bugs I've spotted browsing through our
ACPI code. Please try it and report the result. I don't have a system with ACPI available, so I cannot verify the changes at all.The same bugs are present in 2.4 and I have a corresponding patch
available if some wants to test the changes with that version.Maciej
(quoted diff) +3
-0+ Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: [email protected], PGP key available +patch-mips-2.6.0-test11-20031209-acpi-irq0-1
diff -up --recursive --new-filelinux-mips-2.6.0-test11-20031209.macro/arch/i386/kernel/mpparse.clinux-mips-2.6.0-test11-20031209/arch/i386/kernel/mpparse.carch/i386/kernel/mpparse.c +5
-5@@ -940,7 +940,7 @@ void __init mp_override_legacy_irq (* erroneously sets the trigger to level, resulting in a HUGE * increase of timer interrupts! */ -if ((bus_irq ==0 ) && (global_irq ==2 ) && (trigger ==3 )) +if ((bus_irq ==0 ) && (trigger ==3 )) trigger =1 ; intsrc.mpc_type =MP_INTSRC ;@@ -961,7 +961,7 @@ void __init mp_override_legacy_irq (* Otherwise create a new entry (e.g. global_irq == 2). */ for (i =0 ; i < mp_irq_entries; i++) { -if ((mp_irqs[i].mpc_dstapic == intsrc.mpc_dstapic) +if ((mp_irqs[i].mpc_srcbus == intsrc.mpc_srcbus) && (mp_irqs[i].mpc_srcbusirq == intsrc.mpc_srcbusirq)) { mp_irqs[i] = intsrc; found =1 ;@@ -1008,9 +1008,10 @@ void __init mp_config_acpi_legacy_irqs (*/ for (i =0 ; i <16 ; i++) { -if (i ==2 )continue ;/* Don't connect IRQ2 */ +if (i ==2 ) +continue ;/* Don't connect IRQ2 */ - intsrc.mpc_irqtype = i ? mp_INT : mp_ExtINT;/* 8259A to #0 */ + intsrc.mpc_irqtype = mp_INT; intsrc.mpc_srcbusirq = i;/* Identity mapped */ intsrc.mpc_dstirq = i; -To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 6 lines
Josh McKinney | Webmaster: http://joshandangie.org
--------------------------------------------------------------------------
| They that can give up essential liberty
Linux, the choice -o) | to obtain a little temporary safety deserve
of the GNU generation /\ | neither liberty or safety.
_\_v | -Benjamin FranklinQuoted 2 lines · Josh McKinney
Should I try it with just the acpi fixes sent by Maciej or are these just general fixes?
They should make (at least some of) the reported problems go away,
superseding the respective workarounds.
Signature · 3 lines
+ Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: [email protected], PGP key available +
Quoted 8 lines · Maciej W. Rozycki
Quoted 2 lines · Josh McKinney
Should I try it with just the acpi fixes sent by Maciej or are these just general fixes?
They should make (at least some of) the reported problems go away,
superseding the respective workarounds.
As far as I can tell, your patch _alone_ doesn't prevent the lockup, fix the timer, or nmi_watchdog. I have attached a dmesg of my current running kernel that includes Ross' io_apic patch, the disconnect quirk patch, your acpi patch, and other minor patches. ACPI and APIC debugging are on.
Linux version 2.6.0-test11 (jesse@tesore) (gcc version 3.3.2) #2 Thu Dec 11 09:45:15 MST 2003 BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 00000000000a0000 (usable)
BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000000fff0000 (usable)
BIOS-e820: 000000000fff0000 - 000000000fff3000 (ACPI NVS)
BIOS-e820: 000000000fff3000 - 0000000010000000 (ACPI data)
BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
255MB LOWMEM available.
On node 0 totalpages: 65520
DMA zone: 4096 pages, LIFO batch:1
Normal zone: 61424 pages, LIFO batch:14
HighMem zone: 0 pages, LIFO batch:1
DMI 2.2 present.
ACPI: RSDP (v000 Nvidia ) @ 0x000f6f60
ACPI: RSDT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x0fff3000
ACPI: FADT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x0fff3040
ACPI: MADT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x0fff7880
ACPI: DSDT (v001 NVIDIA AWRDACPI 0x00001000 MSFT 0x0100000e) @ 0x00000000
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
Processor #0 6:10 APIC version 16
ACPI: LAPIC_NMI (acpi_id[0x00] polarity[0x1] trigger[0x1] lint[0x1])
ACPI: IOAPIC (id[0x02] address[0xfec00000] global_irq_base[0x0])
IOAPIC[0]: Assigned apic_id 2
IOAPIC[0]: apic_id 2, version 17, address 0xfec00000, IRQ 0-23
ACPI: INT_SRC_OVR (bus[0] irq[0x0] global_irq[0x2] polarity[0x0] trigger[0x0])
ACPI: INT_SRC_OVR (bus[0] irq[0x9] global_irq[0x9] polarity[0x1] trigger[0x3])
ACPI: INT_SRC_OVR (bus[0] irq[0xe] global_irq[0xe] polarity[0x1] trigger[0x1])
ACPI: INT_SRC_OVR (bus[0] irq[0xf] global_irq[0xf] polarity[0x1] trigger[0x1]) Enabling APIC mode: Flat. Using 1 I/O APICs
Using ACPI (MADT) for SMP configuration information
Building zonelist for node : 0
Kernel command line: BOOT_IMAGE=Linux-2.6 ro root=301
Initializing CPU#0
PID hash table entries: 1024 (order 10: 8192 bytes)
Detected 1913.621 MHz processor.
Console: colour VGA+ 80x25
Memory: 256144k/262080k available (1611k kernel code, 5212k reserved, 693k data, 128k init, 0k highmem) Calibrating delay loop... 3784.70 BogoMIPS
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) CPU: After generic identify, caps: 0383fbff c1c3fbff 00000000 00000000 CPU: After vendor identify, caps: 0383fbff c1c3fbff 00000000 00000000 CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line) CPU: L2 Cache: 512K (64 bytes/line) CPU: After all inits, caps: 0383fbff c1c3fbff 00000000 00000020
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU: AMD Athlon(tm) XP 2600+ stepping 00
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
enabled ExtINT on CPU#0
ESR value before enabling vector: 00000000
ESR value after enabling vector: 00000000
ENABLING IO-APIC IRQs
init IO_APIC IRQs
IO-APIC (apicid-pin) 2-0, 2-16, 2-17, 2-18, 2-19, 2-20, 2-21, 2-22, 2-23 not connected.
..TIMER: vector=0x31 pin1=2 pin2=-1
..MP-BIOS bug: 8254 timer not connected to IO-APIC
..TIMER: Is timer irq0 connected to IOAPIC Pin0? ...
IOAPIC[0]: Set PCI routing entry (2-0 -> 0x31 -> IRQ 0 Mode:0 Active:0) ..TIMER: works OK on apic pin0 irq0
number of MP IRQ sources: 15.
number of IO-APIC #2 registers: 24.
testing the IO APIC.......................
IO APIC #2......
.... register #00: 02000000
....... : physical APIC id: 02 ....... : Delivery Type: 0 ....... : LTS : 0 .... register #01: 00170011 ....... : max redirection entries: 0017 ....... : PRQ implemented: 0 ....... : IO APIC version: 0011
.... register #02: 00000000
....... : arbitration: 00
.... IRQ redirection table:
NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect:
00 001 01 0 0 0 0 0 1 1 31 01 001 01 0 0 0 0 0 1 1 39 02 000 00 0 0 0 0 0 0 0 00 03 001 01 0 0 0 0 0 1 1 41 04 001 01 0 0 0 0 0 1 1 49 05 001 01 0 0 0 0 0 1 1 51 06 001 01 0 0 0 0 0 1 1 59 07 001 01 0 0 0 0 0 1 1 61 08 001 01 0 0 0 0 0 1 1 69 09 001 01 1 1 0 0 0 1 1 71 0a 001 01 0 0 0 0 0 1 1 79 0b 001 01 0 0 0 0 0 1 1 81 0c 001 01 0 0 0 0 0 1 1 89 0d 001 01 0 0 0 0 0 1 1 91 0e 001 01 0 0 0 0 0 1 1 99 0f 001 01 0 0 0 0 0 1 1 A1 10 000 00 1 0 0 0 0 0 0 00 11 000 00 1 0 0 0 0 0 0 00 12 000 00 1 0 0 0 0 0 0 00 13 000 00 1 0 0 0 0 0 0 00 14 000 00 1 0 0 0 0 0 0 00 15 000 00 1 0 0 0 0 0 0 00 16 000 00 1 0 0 0 0 0 0 00 17 000 00 1 0 0 0 0 0 0 00
IRQ to pin mappings:
IRQ0 -> 0:2-> 0:0
IRQ1 -> 0:1
IRQ3 -> 0:3
IRQ4 -> 0:4
IRQ5 -> 0:5
IRQ6 -> 0:6
IRQ7 -> 0:7
IRQ8 -> 0:8
IRQ9 -> 0:9
IRQ10 -> 0:10
IRQ11 -> 0:11
IRQ12 -> 0:12
IRQ13 -> 0:13
IRQ14 -> 0:14
IRQ15 -> 0:15
.................................... done.
Using local APIC timer interrupts.
calibrating APIC timer ...
..... CPU clock speed is 1912.0861 MHz.
..... host bus clock speed is 332.0671 MHz.
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfb590, last bus=2
PCI: Using configuration type 1
mtrr: v2.0 (20020519)
ACPI: Subsystem revision 20031002
tbxface-0117 [03] acpi_load_tables : ACPI Tables successfully acquired
Parsing all Control Methods:........................................................................................................................................................................................................................................................................................ Table [DSDT](id F004) - 761 Objects with 78 Devices 280 Methods 30 Regions
ACPI Namespace successfully loaded at root c0378d3c
IOAPIC[0]: Set PCI routing entry (2-9 -> 0x71 -> IRQ 9 Mode:1 Active:0)
evxfevnt-0093 [04] acpi_enable : Transition to ACPI mode successful evgpeblk-0748 [06] ev_create_gpe_block : GPE 00 to 31 [_GPE] 4 regs at 0000000000004020 on int 9 evgpeblk-0748 [06] ev_create_gpe_block : GPE 32 to 95 [_GPE] 8 regs at 00000000000044A0 on int 9
Completing Region/Field/Buffer/Package initialization:................................................................................................. Initialized 30/30 Regions 9/9 Fields 31/31 Buffers 27/27 Packages (769 nodes)
Executing all Device _STA and_INI methods:...............................................................................
79 Devices found containing: 79 _STA, 2 _INI methods
ACPI: Interpreter enabled
ACPI: Using IOAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (00:00)
PCI: Probing PCI hardware (bus 00)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.HUB0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.AGPB._PRT]
ACPI: PCI Interrupt Link [LNK1] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNK2] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNK3] (IRQs 3 4 5 6 7 10 11 *12 14 15)
ACPI: PCI Interrupt Link [LNK4] (IRQs 3 4 *5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNK5] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LUBA] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LUBB] (IRQs 3 4 *5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LMAC] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LAPU] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LACI] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LMCI] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LSMB] (IRQs 3 4 5 6 7 10 11 *12 14 15)
ACPI: PCI Interrupt Link [LUB2] (IRQs 3 4 5 6 7 10 11 *12 14 15)
ACPI: PCI Interrupt Link [LFIR] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [L3CM] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LIDE] (IRQs 3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [APC1] (IRQs 16)
ACPI: PCI Interrupt Link [APC2] (IRQs 17)
ACPI: PCI Interrupt Link [APC3] (IRQs *18)
ACPI: PCI Interrupt Link [APC4] (IRQs *19)
ACPI: PCI Interrupt Link [APC5] (IRQs 16)
pci_link-0262 [40] acpi_pci_link_get_curr: No IRQ resource found
ACPI: PCI Interrupt Link [APCF] (IRQs 20 21 22)
pci_link-0262 [42] acpi_pci_link_get_curr: No IRQ resource found
ACPI: PCI Interrupt Link [APCG] (IRQs 20 21 22)
pci_link-0262 [44] acpi_pci_link_get_curr: No IRQ resource found
ACPI: PCI Interrupt Link [APCH] (IRQs 20 21 22)
ACPI: PCI Interrupt Link [APCI] (IRQs 20 21 22)
pci_link-0262 [47] acpi_pci_link_get_curr: No IRQ resource found
ACPI: PCI Interrupt Link [APCJ] (IRQs 20 21 22)
ACPI: PCI Interrupt Link [APCK] (IRQs 20 21 22)
ACPI: PCI Interrupt Link [APCS] (IRQs *23)
pci_link-0262 [52] acpi_pci_link_get_curr: No IRQ resource found
ACPI: PCI Interrupt Link [APCL] (IRQs 20 21 22)
ACPI: PCI Interrupt Link [APCM] (IRQs 20 21 22)
ACPI: PCI Interrupt Link [AP3C] (IRQs 20 21 22)
ACPI: PCI Interrupt Link [APCZ] (IRQs 20 21 22)
ACPI: PCI Interrupt Link [APCS] enabled at IRQ 23
IOAPIC[0]: Set PCI routing entry (2-23 -> 0xa9 -> IRQ 23 Mode:1 Active:0)
00:00:01[A] -> 2-23 -> IRQ 23
Pin 2-23 already programmed
ACPI: PCI Interrupt Link [APCF] enabled at IRQ 20
IOAPIC[0]: Set PCI routing entry (2-20 -> 0xb1 -> IRQ 20 Mode:1 Active:0)
00:00:02[A] -> 2-20 -> IRQ 20
ACPI: PCI Interrupt Link [APCG] enabled at IRQ 22
IOAPIC[0]: Set PCI routing entry (2-22 -> 0xb9 -> IRQ 22 Mode:1 Active:0)
00:00:02[B] -> 2-22 -> IRQ 22
ACPI: PCI Interrupt Link [APCL] enabled at IRQ 21
IOAPIC[0]: Set PCI routing entry (2-21 -> 0xc1 -> IRQ 21 Mode:1 Active:0)
00:00:02[C] -> 2-21 -> IRQ 21
ACPI: PCI Interrupt Link [APCH] enabled at IRQ 20
Pin 2-20 already programmed
ACPI: PCI Interrupt Link [APCI] enabled at IRQ 22
Pin 2-22 already programmed
ACPI: PCI Interrupt Link [APCJ] enabled at IRQ 21
Pin 2-21 already programmed
ACPI: PCI Interrupt Link [APCK] enabled at IRQ 20
Pin 2-20 already programmed
ACPI: PCI Interrupt Link [APCM] enabled at IRQ 22
Pin 2-22 already programmed
ACPI: PCI Interrupt Link [APCZ] enabled at IRQ 21
Pin 2-21 already programmed
ACPI: PCI Interrupt Link [APC1] enabled at IRQ 16
IOAPIC[0]: Set PCI routing entry (2-16 -> 0xc9 -> IRQ 16 Mode:1 Active:0)
00:01:08[A] -> 2-16 -> IRQ 16
ACPI: PCI Interrupt Link [APC2] enabled at IRQ 17
IOAPIC[0]: Set PCI routing entry (2-17 -> 0xd1 -> IRQ 17 Mode:1 Active:0)
00:01:08[B] -> 2-17 -> IRQ 17
ACPI: PCI Interrupt Link [APC3] enabled at IRQ 18
IOAPIC[0]: Set PCI routing entry (2-18 -> 0xd9 -> IRQ 18 Mode:1 Active:0)
00:01:08[C] -> 2-18 -> IRQ 18
ACPI: PCI Interrupt Link [APC4] enabled at IRQ 19
IOAPIC[0]: Set PCI routing entry (2-19 -> 0xe1 -> IRQ 19 Mode:1 Active:0)
00:01:08[D] -> 2-19 -> IRQ 19
Pin 2-17 already programmed
Pin 2-18 already programmed
Pin 2-19 already programmed
Pin 2-16 already programmed
Pin 2-18 already programmed
Pin 2-19 already programmed
Pin 2-16 already programmed
Pin 2-17 already programmed
Pin 2-19 already programmed
Pin 2-16 already programmed
Pin 2-17 already programmed
Pin 2-18 already programmed
Pin 2-16 already programmed
Pin 2-17 already programmed
Pin 2-18 already programmed
Pin 2-19 already programmed
Pin 2-19 already programmed
PCI: Using ACPI for IRQ routing
PCI: if you experience problems, try using option 'pci=noacpi' or even 'acpi=off'
Machine check exception polling timer started.
ACPI: Power Button (FF) [PWRF]
ACPI: Sleep Button (CM) [SLPB]
ACPI: Fan [FAN] (on)
ACPI: Processor [CPU0] (supports C1)
ACPI: Thermal Zone [THRM] (38 C)
pty: 256 Unix98 ptys configured
Real Time Clock Driver v1.12
Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
Using anticipatory io scheduler
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
loop: loaded (max 8 devices)
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
NFORCE2: IDE controller at PCI slot 0000:00:09.0
NFORCE2: chipset revision 162
NFORCE2: not 100% native mode: will probe irqs later
NFORCE2: BIOS didn't set cable bits correctly. Enabling workaround.
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
NFORCE2: 0000:00:09.0 (rev a2) UDMA133 controller
ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:DMA
ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:DMA, hdd:DMAhda: WDC WD200BB-00DEA0, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: MATSHITA CR-585, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: 39102336 sectors (20020 MB) w/2048KiB Cache, CHS=38792/16/63, UDMA(100)
hda: hda1 hda2 hda3
hdc: ATAPI 24X CD-ROM drive, 128kB Cache, DMA
Uniform CD-ROM driver Revision: 3.12
mice: PS/2 mouse device common for all mice
input: PC Speaker
serio: i8042 AUX port at 0x60,0x64 irq 12
input: AT Translated Set 2 keyboard on isa0060/serio0
serio: i8042 KBD port at 0x60,0x64 irq 1
NET: Registered protocol family 2
IP: routing cache hash table of 2048 buckets, 16Kbytes
TCP: Hash tables configured (established 16384 bind 32768)
NET: Registered protocol family 1
NET: Registered protocol family 17
found reiserfs format "3.6" with standard journal
Reiserfs journal params: device hda1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
reiserfs: checking transaction log (hda1) for (hda1)
Using r5 hash to sort names
VFS: Mounted root (reiserfs filesystem) readonly.
Freeing unused kernel memory: 128k freed
Adding 377516k swap on /dev/hda2. Priority:-1 extents:1
found reiserfs format "3.6" with standard journal
Reiserfs journal params: device hda3, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
reiserfs: checking transaction log (hda3) for (hda3)
Using r5 hash to sort names
Linux agpgart interface v0.100 (c) Dave Jones
8139too Fast Ethernet driver 0.9.27
eth0: RealTek RTL8139 at 0xd09a1000, 00:40:c7:77:0a:d5, IRQ 18
eth0: Identified 8139 chip type 'RTL-8139 rev K'
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
agpgart: Detected NVIDIA nForce2 chipset
agpgart: Maximum main memory to use for agp memory: 203M
agpgart: AGP aperture is 64M @ 0xe8000000
PCI: Setting latency timer of device 0000:00:06.0 to 64
intel8x0: clocking to 47451/home/jesse/linux/drivers/usb/core/usb.c: registered new driver hubohci_hcd: 2003 Oct 13 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)ohci_hcd: block sizes: ed 64 td 64ohci_hcd 0000:00:02.0: OHCI Host Controller
PCI: Setting latency timer of device 0000:00:02.0 to 64ohci_hcd 0000:00:02.0: irq 20, pci mem d0a17000ohci_hcd 0000:00:02.0: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detectedohci_hcd 0000:00:02.1: OHCI Host Controller
PCI: Setting latency timer of device 0000:00:02.1 to 64ohci_hcd 0000:00:02.1: irq 22, pci mem d0a20000ohci_hcd 0000:00:02.1: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 3 ports detectedehci_hcd 0000:00:02.2: EHCI Host Controller
PCI: Setting latency timer of device 0000:00:02.2 to 64ehci_hcd 0000:00:02.2: irq 21, pci mem d0a2e000ehci_hcd 0000:00:02.2: new USB bus registered, assigned bus number 3
PCI: cache line size of 64 is not supported by device 0000:00:02.2ehci_hcd 0000:00:02.2: USB 2.0 enabled, EHCI 1.00, driver 2003-Jun-13
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 6 ports detected
parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
parport0: cpp_daisy: aa5500ff(38)
parport0: assign_addrs: aa5500ff(38)
parport0: cpp_daisy: aa5500ff(38)
parport0: assign_addrs: aa5500ff(38)i2c_adapter i2c-0: nForce2 SMBus adapter at 0x5000i2c_adapter i2c-1: nForce2 SMBus adapter at 0x5100
Hi Ross,
I have rediffed your two patches for vanilla 2.6.0-test11. Briefly, I tried the apic patch first, and found that there are no lockups so far; well it passed my grep tests and even a kernel compile =). Then I tried your io_apic patch + apic patch. With nmi_watchdog=1 "NMI:" in /proc/interrupts increments alot compared to nmi_watchdog=2 before (as much as the timer). So I believe your two patches are more correct than the other two. Especially the fact I can run with CPU Disconnect and not lock up just like windows ... for people that have windows (I dont have windows =) plus a probably working nmi_watchdog.
And for comparison, my setup:
Shuttle AN35N Ultra v 1.1 (Nforce2 400 ultra), bios updated Athlon Barton 2600+ (1.9 Ghz)
256 MB PC3200, single stick.
The patches are included in this mail. I suppose the next thing to do is get out of nvidia the corresponding information. And then clean up the patch for inclusion.
Jesse
arch/i386/kernel/apic.c +10 -0
@@ -1089,6 +1089,16 @@*/ irq_stat[cpu].apic_timer_irqs++; +#ifdef CONFIG_MK7 &&CONFIG_BLK_DEV_AMD74XX + +/* +* on 2200XP & nforce2 chipset we need at least 500ns delay here +* to stop lockups with udma100 drive. try to scale delay time +* with cpu speed. Ross Dickson. + */ +ndelay ((cpu_khz >>12 )+200 );/* don't ack too soon or hard lockup */ +#endif +/* * NOTE! We'd better ACK the irq immediately, * because timer handling can be slow.
arch/i386/kernel/io_apic.c +35 -0
@@ -2128,6 +2128,41 @@printk (KERN_ERR "..MP-BIOS bug: 8254 timer not connected to IO-APIC\n" ); } +#ifdef CONFIG_ACPI_BOOT &&CONFIG_X86_UP_IOAPIC +/* for nforce2 try vector 0 on pin0 +* Note the io_apic_set_pci_routing call disables the 8259 irq 0 +* so we must be connected directly to the 8254 timer if this works +* Note2: this violates the above comment re Subtle but works! + */ +printk (KERN_INFO "..TIMER: Is timer irq0 connected to IOAPIC Pin0? ...\n" ); +if ( pin1 !=-1 && nr_ioapics ) { +int saved_timer_ack = timer_ack; +/* next call also disables 8259 irq0 */ +int result =io_apic_set_pci_routing (0 ,0 ,0 ,0 ,0 ); +/* +* Ok, does IRQ0 through the IOAPIC work? +*/ +unmask_IO_APIC_irq (0 ); + timer_ack =0 ; +if (timer_irq_works ()) { +if (nmi_watchdog ==NMI_IO_APIC ) { +disable_8259A_irq (0 ); +setup_nmi (); +enable_8259A_irq (0 ); +check_nmi_watchdog (); + } +printk (KERN_INFO "..TIMER: works OK on apic pin0 irq0\n" ); +return ; + } +/* failed */ + timer_ack = saved_timer_ack; +clear_IO_APIC_pin (0 ,0 ); + result =io_apic_set_pci_routing (0 , pin1,0 ,0 ,0 ); +printk (KERN_ERR "..MP-BIOS bug: 8254 timer not connected to IO-APIC Pin 0\n" ); + } +#endif +/* end new stuff for nforce2 */ +printk (KERN_INFO "...trying to set up timer (IRQ0) through the 8259A ... " );if (pin2 !=-1 ) {printk ("\n..... (found pin %d) ..." , pin2);
Quoted 9 lines · Jesse Allen
arch/i386/kernel/apic.c +3
-0@@ -1089,6 +1089,16 @@*/ irq_stat[cpu].apic_timer_irqs++; +#ifdef CONFIG_MK7 &&CONFIG_BLK_DEV_AMD74XX + +/*
arch/i386/kernel/apic.c line 1104
Quoted 10 lines
arch/i386/kernel/apic.c +7
-0+* on 2200XP & nforce2 chipset we need at least 500ns delay here +* to stop lockups with udma100 drive. try to scale delay time +* with cpu speed. Ross Dickson. +*/ +ndelay ((cpu_khz >>12 )+200 );/* don't ack too soon or hard lockup */ +#endif +/* * NOTE! We'd better ACK the irq immediately, * because timer handling can be slow.
This is too much of a kludge. APIC timer ACKing is supposed to be fast. Please try without this delay but with the disconnect PCI quirk.
If the delay is still needed even when disconnect is disabled, _then_ can discuss how to do the delay properly.
/Mikael
Quoted 24 lines · Mikael Pettersson
Quoted 9 lines · Jesse Allen
arch/i386/kernel/apic.c +3
-0@@ -1089,6 +1089,16 @@*/ irq_stat[cpu].apic_timer_irqs++; +#ifdef CONFIG_MK7 &&CONFIG_BLK_DEV_AMD74XX + +/* arch/i386/kernel/apic.c line 1104
Quoted 10 lines
arch/i386/kernel/apic.c +7
-0+* on 2200XP & nforce2 chipset we need at least 500ns delay here +* to stop lockups with udma100 drive. try to scale delay time +* with cpu speed. Ross Dickson. +*/ +ndelay ((cpu_khz >>12 )+200 );/* don't ack too soon or hard lockup */ +#endif +/* * NOTE! We'd better ACK the irq immediately, * because timer handling can be slow. This is too much of a kludge. APIC timer ACKing is supposed to be fast. Please try without this delay but with the disconnect PCI quirk.
Quoted 7 lines
If the delay is still needed even when disconnect is disabled, _then_ can discuss how to do the delay properly.
/Mikael
Thanks Mikael, I think the more heads on this problem the better.
I don't like timing kludges either such as this existing one in ide-iops.c in kernel 2.4.23
hwif->OUTBSYNC(drive, cmd, IDE_COMMAND_REG); /* Drive takes 400nS to respond, we must avoid the IRQ being serviced before that. FIXME: we could skip this delay with care on non shared devices For DMA transfers highpoint have a neat trick we could use. When they take an IRQ they check STS but also that the DMA count is not zero (see hpt's own driver) */ ndelay(400); spin_unlock_irqrestore(&io_request_lock, flags); }
But does anyone exactly know what nvidia and the bios writer are doing - why the cpu-disconnect is an issue for the nforce2 boards?
Is it technically correct in their view to turn off features that some pci or other device they have made may expect? I wonder about their
ram devices because I note after some more testing that without any lockup fixes the lockups were spaced a lot further apart in time when I used a pair of KINGMAX 256MB DDR-333 then when I used a pair of SEITEC 256MB DDR-400 memory. The cpu used XP2500 has a 333 fsb. Is the ram driver chip core enforcing the disconnect for a reason?
When using the ack delay, lockups with both memory types ceased - as they may also cease with the disconnect patch. So the disconnect cycles seem related to the nforce2 ram driver circuitry. (See Ian's take towards end of this email)
The reason why I put the ack delay in only the apic timer servicing path is that I think it is the only commonly traversed path which acks the apic so quickly. If we end up stuck with a delay then we could probably make it more accurate by reading the apic timer withinin the delay and using the counts down from the reload value because if our irq was already pre delayed then no additional delay would be required. I am sure many clever programmers can improve on it - not that we want it at all.
I note the following comments in 2.2.23 io_apic.c
/*
* Level triggered interrupts can just be masked,
* and shutting down and starting up the interrupt
* is the same as enabling and disabling them -- except
* with a startup need to return a "was pending" value.
*
* Level triggered interrupts are special because we
* do not touch any IO-APIC register while handling
* them. We ack the APIC in the end-IRQ handler, not
* in the start-IRQ-handler. Protection against reentrance
* from the same interrupt is still provided, both by the
* generic IRQ layer and by the fact that an unacked local
* APIC does not accept IRQs.
*/
If I am reading this correctly then PCI interrupts which are level triggered are processed with the equivalent of a global (maskable) hardware interrupt disable (on a uniprocessor machine) if all hardware interrupts are routed via the APIC. Chances are that we have more than 500ns irq off times occurring with these servicing routines especially if several handlers are chained on the one pirq.
Another clue may have just come to light, does the ack in this routine (io_apic.c) usually get done within the 500ns or so from its activation? If it does then either the mask_IO_APIC_irq() has a positive effect on the lockups or alternately the problem is synchronous with, or inherent to the apic timer.
/*
* Once we have recorded IRQ_PENDING already, we can mask the
* interrupt for real. This prevents IRQ storms from unhandled
* devices.
*/
static void ack_edge_ioapic_irq(unsigned int irq)
{
if ((irq_desc[irq].status & (IRQ_PENDING | IRQ_DISABLED))
== (IRQ_PENDING | IRQ_DISABLED))
mask_IO_APIC_irq(irq);
ack_APIC_irq();
}How slow can timer handling be?
When I was debugging with my CRO on the LPT port and turning a bit on going into the smp_apic_timer_interrupt() routine and turning the bit off when exiting I saw times of greater than 0.5ms for the routine to complete. Thats milliseconds!. I certainly agree with the comment regarding the ack immediately and think it means before 0.5ms instead of after 0.5ms because 0.5ms is an eternity to have interrupts disabled in a hardware interrupt context.
/*
* NOTE! We'd better ACK the irq immediately,
* because timer handling can be slow.
I am not too crazy about having them off for 500ns to 1000ns either but until I know for certain that the cpu disconnect issue is a non issue then I will choose to suffer a time hit, and leave the hardware run as the maker intended.
BIG HINT TO THOSE IN THE KNOW.
If we had the docs from nvidia regarding the unknown pci devices?
00:00.0 Host bridge: nVidia Corporation: Unknown device 01e0 (rev a2) 00:00.1 RAM memory: nVidia Corporation: Unknown device 01eb (rev a2) 00:00.2 RAM memory: nVidia Corporation: Unknown device 01ee (rev a2) 00:00.3 RAM memory: nVidia Corporation: Unknown device 01ed (rev a2) 00:00.4 RAM memory: nVidia Corporation: Unknown device 01ec (rev a2) 00:00.5 RAM memory: nVidia Corporation: Unknown device 01ef (rev a2)
then perhaps the underlying cause would present itself. Then we could properly deal with the issue because we would know why we should do whatever it is we should do. If the disconnect should be left on then hopefully we could test a register somewhere to know when it is safe to ack or not - something like that.
I think Ian is heading in the right direction with his comments:
Quoted 17 lines · Ian Kumlien
Hi, again.
I did some reading on amd's site, and if the disconnect + apic fixed the same problem as the ~500ns delay, then it could be as i suspect...
I suspect that something goes wrong with apic ack when the cpu is disconnected and according to the amd docs we could check the Northbridge's CLKFWDRST or isn't that avail on the outside? (It would be interesting to see if that fixes the problem as well.)
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/26237.PDF
I don't really have the knowledge but it would sure be nicer to fix this by checking this than to just disable it. I dunno if there is something we could do from within the kernel aswell with the sending of HLT but i doubt it.
Quoted 8 lines
Anyways, we need a generalized patch that does better checking on the NMI bit (like Ross' patch).
PS. Anyone that can point me to northbridge tech docks? and CC
Signature · 1 line
Ian Kumlien <pomac () vapor ! com> -- http://pomac.netswarm.net
Regards
Ross.
Quoted 2 lines · Mikael Pettersson
Please try without this delay but with the disconnect PCI quirk.
OK, I have tried it without the delay, and with Ross' timer patch. It will obviously lockup, and nmi_watchdog doesn't work. Added the disconnect quirk patch, and lockups are gone and nmi_watchdog works. So there is no difference between the disconnect patch or the ACK delay patch. Though I found nmi_watchdog does depend on having either the disconnect patch or the delay patch (not an io_apic patch). You think the disconnect patch is better? In any event, they both indicate a behavior, and there maybe a better solution to all of it.
Jesse
Quoted 4 lines · Jesse Allen
Hi Ross,
I have rediffed your two patches for vanilla 2.6.0-test11. Briefly, I tried the apic patch first, and found that there are no lockups so far; well it passed my grep tests and even a kernel compile =). Then I tried your
io_apicpatch + apic patch. With nmi_watchdog=1 "NMI:" in/proc/interruptsincrements alot compared to nmi_watchdog=2 before (as much as the timer). So I believe your two patches are more correct than the other two. Especially the fact I can run with CPU Disconnect and not lock up just like windows ... for people that have windows (I dont have windows =) plus a probably workingnmi_watchdog.
Quoted 11 lines
And for comparison, my setup:
Shuttle AN35N Ultra v 1.1 (Nforce2 400 ultra), bios updated Athlon Barton 2600+ (1.9 Ghz)
256 MB PC3200, single stick.The patches are included in this mail. I suppose the next thing to do is get out of nvidia the corresponding information. And then clean up the patch for inclusion.
Jesse
Thank Jesse
It is interesting that the lockup problems also occur with a single memory stick, I have only tried dual sticks.
Regards
Ross.