2005-03-15 12:09:16

by Jerome Lacoste

[permalink] [raw]
Subject: enabling IOAPIC on C3 processor?

I have a VIA Epia M10000 board that crashes very badly (and pretty
often, especially when using DMA). I want to fix that.

Serial console + magic SysRQ didn't help so I am going the nmi
watchdog way. But in order to have nmi watchdog I need APIC, right?

The C3 processor seems to support IOAPIC.
(http://www.via.com.tw/en/products/processors/c3/specs.jsp)

But:
- I don't see anything in the BIOS related to APIC.
- grep APIC /lib/modules/`uname -r`/build/.config shows me that all
APIC options are 'y'.
- dmesg | grep APIC tells me "no local APIC present or hardware disabled".
- adding lapic kernel parameter doesn't change that.
- and of course, nmi_watchdog=1 or 2 gives me NMI count 0 in /proc/interrupts.

Did I miss something when it comes to enabling IOAPIC support on C3 processor?

Note: I also see a lot an increasing ERR count in /proc/interrupts,
especially when I put my box in conditions that make it also more
unstable (i.e. sending files on the network while using the PVR-350
using mythtv). Not sure if it is related.

Jerome

medios@medios:~$ dmesg | grep APIC
No local APIC present or hardware disabled
mapped APIC to ffffd000 (013c1000)

medios@medios:~$ grep APIC /lib/modules/`uname -r`/build/.config
CONFIG_X86_UP_APIC=y
CONFIG_X86_UP_IOAPIC=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y

Grub options
[...]
kernel /vmlinuz-2.6.11-medios1 root=/dev/hda1 ro
console=ttyS0,57600n8 console=tty0 nmi_watchdog=1 lapic
[...]


2005-03-15 12:35:13

by Mikael Pettersson

[permalink] [raw]
Subject: Re: enabling IOAPIC on C3 processor?

jerome lacoste writes:
> I have a VIA Epia M10000 board that crashes very badly (and pretty
> often, especially when using DMA). I want to fix that.
>
> Serial console + magic SysRQ didn't help so I am going the nmi
> watchdog way. But in order to have nmi watchdog I need APIC, right?
>
> The C3 processor seems to support IOAPIC.
> (http://www.via.com.tw/en/products/processors/c3/specs.jsp)
>
> But:
> - I don't see anything in the BIOS related to APIC.
> - grep APIC /lib/modules/`uname -r`/build/.config shows me that all
> APIC options are 'y'.
> - dmesg | grep APIC tells me "no local APIC present or hardware disabled".
> - adding lapic kernel parameter doesn't change that.
> - and of course, nmi_watchdog=1 or 2 gives me NMI count 0 in /proc/interrupts.
>
> Did I miss something when it comes to enabling IOAPIC support on C3 processor?

Unless you have a pre-release engineering part for a future product,
then your C3 has no local APIC, and hence no I/O APIC functionality.

I know some C3 specs pages list I/O APIC support, but if you look in
the datasheets for current products you find zero APIC support.

2005-03-15 12:53:15

by Jerome Lacoste

[permalink] [raw]
Subject: Re: enabling IOAPIC on C3 processor? (how to investigate hangs without nmi watchdog)

On Tue, 15 Mar 2005 13:34:55 +0100, Mikael Pettersson <[email protected]> wrote:
> jerome lacoste writes:
> > I have a VIA Epia M10000 board that crashes very badly (and pretty
> > often, especially when using DMA). I want to fix that.
> >
> > Serial console + magic SysRQ didn't help so I am going the nmi
> > watchdog way. But in order to have nmi watchdog I need APIC, right?
> >
> > The C3 processor seems to support IOAPIC.
> > (http://www.via.com.tw/en/products/processors/c3/specs.jsp)
> >
> > But:
> > - I don't see anything in the BIOS related to APIC.
> > - grep APIC /lib/modules/`uname -r`/build/.config shows me that all
> > APIC options are 'y'.
> > - dmesg | grep APIC tells me "no local APIC present or hardware disabled".
> > - adding lapic kernel parameter doesn't change that.
> > - and of course, nmi_watchdog=1 or 2 gives me NMI count 0 in /proc/interrupts.
> >
> > Did I miss something when it comes to enabling IOAPIC support on C3 processor?
>
> Unless you have a pre-release engineering part for a future product,
> then your C3 has no local APIC, and hence no I/O APIC functionality.
>
> I know some C3 specs pages list I/O APIC support, but if you look in
> the datasheets for current products you find zero APIC support.

My board is 2 years old (May 2003).

I've checked the specs [2] and they say (page 17 out of 83)
"APIC will be available in future steppings." Yeah right...

Mine is stepping 1 according to /proc/cpuinfo.

So if I don't have APIC, that means I cannot use nmi_watchdog to
investigate the problem, right?

Do I have any alternative to investigate this hang or should I just
give up and smash my board?

Cheers,

Jerome

[2] http://www.via.com.tw/en/downloads/datasheets/processors/c3_nehemiah.zip

2005-03-15 12:58:13

by Mikael Pettersson

[permalink] [raw]
Subject: Re: enabling IOAPIC on C3 processor? (how to investigate hangs without nmi watchdog)

jerome lacoste writes:
> So if I don't have APIC, that means I cannot use nmi_watchdog to
> investigate the problem, right?

Correct.

> Do I have any alternative to investigate this hang or should I just
> give up and smash my board?

I can't help you with that one.

2005-03-15 14:41:06

by Dave Jones

[permalink] [raw]
Subject: Re: enabling IOAPIC on C3 processor? (how to investigate hangs without nmi watchdog)

On Tue, Mar 15, 2005 at 01:52:47PM +0100, jerome lacoste wrote:

> Do I have any alternative to investigate this hang or should I just
> give up and smash my board?

If you have the longhaul cpufreq driver enabled, turn it off.
It's currently broken for some reason, and I've not had time to
figure out why.

Dave

2005-03-15 20:26:17

by Lee Revell

[permalink] [raw]
Subject: Re: enabling IOAPIC on C3 processor?

On Tue, 2005-03-15 at 13:09 +0100, jerome lacoste wrote:
> I have a VIA Epia M10000 board that crashes very badly (and pretty
> often, especially when using DMA). I want to fix that.
>

Are the crashes associated with any particular workload or device? My
M6000 works perfectly.

The one big problem I had with is is the VIA Unichrome XAA driver had a
FIFO related bug that caused it to stall the PCI bus, delaying
interrupts for tens of ms unless "Option NoAccel" was used.

This bug was fixed over 6 months ago though.

Lee

2005-03-16 15:11:20

by Jerome Lacoste

[permalink] [raw]
Subject: Re: enabling IOAPIC on C3 processor?

On Tue, 15 Mar 2005 15:22:36 -0500, Lee Revell <[email protected]> wrote:
> On Tue, 2005-03-15 at 13:09 +0100, jerome lacoste wrote:
> > I have a VIA Epia M10000 board that crashes very badly (and pretty
> > often, especially when using DMA). I want to fix that.
> >
>
> Are the crashes associated with any particular workload or device? My
> M6000 works perfectly.
>
> The one big problem I had with is is the VIA Unichrome XAA driver had a
> FIFO related bug that caused it to stall the PCI bus, delaying
> interrupts for tens of ms unless "Option NoAccel" was used.
>
> This bug was fixed over 6 months ago though.

It crashes my box within minutes if not seconds when using mythtv
(tuner using ivtv driver) while using my network card. If I disable
DMA on the disk and don't use my card, it's much more stable (several
hours without problem).

See this for more details:
http://forums.viaarena.com/messageview.aspx?catid=28&threadid=60131&enterthread=y

J

2005-03-16 20:48:26

by Lee Revell

[permalink] [raw]
Subject: Re: enabling IOAPIC on C3 processor?

On Wed, 2005-03-16 at 16:11 +0100, jerome lacoste wrote:
> On Tue, 15 Mar 2005 15:22:36 -0500, Lee Revell <[email protected]> wrote:
> > On Tue, 2005-03-15 at 13:09 +0100, jerome lacoste wrote:
> > > I have a VIA Epia M10000 board that crashes very badly (and pretty
> > > often, especially when using DMA). I want to fix that.
> > >
> >
> > Are the crashes associated with any particular workload or device? My
> > M6000 works perfectly.
> >
> > The one big problem I had with is is the VIA Unichrome XAA driver had a
> > FIFO related bug that caused it to stall the PCI bus, delaying
> > interrupts for tens of ms unless "Option NoAccel" was used.
> >
> > This bug was fixed over 6 months ago though.
>
> It crashes my box within minutes if not seconds when using mythtv
> (tuner using ivtv driver) while using my network card. If I disable
> DMA on the disk and don't use my card, it's much more stable (several
> hours without problem).
>

Well, you might have better luck capturing the Oops with kdb. At the
very least it might drop you into the debugger instead of locking up the
machine.

Lee

2005-03-17 15:27:18

by Jerome Lacoste

[permalink] [raw]
Subject: Re: enabling IOAPIC on C3 processor?

On Wed, 16 Mar 2005 15:48:21 -0500, Lee Revell <[email protected]> wrote:
> On Wed, 2005-03-16 at 16:11 +0100, jerome lacoste wrote:
> > On Tue, 15 Mar 2005 15:22:36 -0500, Lee Revell <[email protected]> wrote:
> > > On Tue, 2005-03-15 at 13:09 +0100, jerome lacoste wrote:
> > > > I have a VIA Epia M10000 board that crashes very badly (and pretty
> > > > often, especially when using DMA). I want to fix that.
> > > >
> > >
> > > Are the crashes associated with any particular workload or device? My
> > > M6000 works perfectly.
> > >
> > > The one big problem I had with is is the VIA Unichrome XAA driver had a
> > > FIFO related bug that caused it to stall the PCI bus, delaying
> > > interrupts for tens of ms unless "Option NoAccel" was used.
> > >
> > > This bug was fixed over 6 months ago though.
> >
> > It crashes my box within minutes if not seconds when using mythtv
> > (tuner using ivtv driver) while using my network card. If I disable
> > DMA on the disk and don't use my card, it's much more stable (several
> > hours without problem).
> >
>
> Well, you might have better luck capturing the Oops with kdb. At the
> very least it might drop you into the debugger instead of locking up the
> machine.

It doesn't.
I patched and recompiled my kernel and made sure the
/proc/sys/kernel/kdb is set to 1.
Machine dies with no kdb started.

I guess I just need for VIA to wake up now, right? No more bullets in my gun?

Jerome