nForce3 (Compaq R3000) timer fix

Jung-uk Kim jkim at niksun.com
Wed Jan 26 12:40:23 PST 2005


On Wednesday 26 January 2005 02:37 pm, Peter Wemm wrote:
> On Wednesday 26 January 2005 08:49 am, Jung-uk Kim wrote:
> > This is (hopefully) the last patch of the series, which fixes
> > infamous '8254 timer not connected to IO-APIC' problem for
> > nForce2+. Linux people had a hack here:
> >
> > http://lkml.org/lkml/2003/12/21/7
> >
> > (Note: 2.6.10 has more refined version.)
> >
> > The attached patch requires the previous 'skip_timer_override'
> > hack posted here:
> >
> > http://docs.freebsd.org/cgi/mid.cgi?200501192214.27401.jkim
> >
> > After the patch, you need to set 'hw.apic.skip_set_extint=1' from
> > loader or loader.conf.  Be careful with spelling; this is 'apic',
> > not 'acpi' this time. ;-)
> >
> > With verbose boot logging, we should see:
> >
> > 	ioapic0: intpin 0 -> ISA IRQ 0 (edge, high)
> >
> > instead of:
> >
> > 	ioapic0: Routing external 8259A's -> intpin 0
> > 	ioapic0: intpin 0 -> ExtINT (edge, high)
> >
> > I was able to run this laptop overnight without 'device atpic'.
> > ;-) I think somebody (jhb and peter, I guess) should double check
> > if this is okay.  I tried many combinations including 'options
> > SMP' and all seemed to be fine so far.
> >
> > Finally I can run this laptop at full speed (2 GHz) under heavy
> > load with 'acpi_ppc' driver!
> >
> > http://www.spa.is.uec.ac.jp/~nfukuda/software/
> >
> > Enjoy,
> >
> > Jung-uk Kim
>
> Whoo!  It sounds like you're onto something there!

:-)

> I have one question though.. Can you think of a way of automating
> this? Perhaps we could blacklist the extint mode by detecting
> whether the nforce2+ chipset is present?

In fact, I thought about that.  Linux blacklists all NVIDIA chipsets 
for 'skip_timer_override':

http://lxr.linux.no/source/arch/i386/kernel/acpi/earlyquirk.c#L11
http://lxr.linux.no/source/arch/x86_64/kernel/io_apic.c#L260

This is easy but I don't like the idea because BIOS vendor can fix it 
later.

Linux detects '8254 timer not connected to IO-APIC' case by looking at 
MPTable:

http://lxr.linux.no/source/arch/i386/kernel/io_apic.c#L2128
http://lxr.linux.no/source/arch/x86_64/kernel/io_apic.c#L1574

Unfortunately it doesn't cover non-SMP case and MPTable can be wrong, 
too.

That's why I just added the knobs.  I hope you guys have better idea.

Thanks,

Jung-uk Kim


More information about the freebsd-amd64 mailing list