Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jan 2005 11:49:11 -0500
From:      Jung-uk Kim <jkim@niksun.com>
To:        freebsd-amd64@freebsd.org
Subject:   nForce3 (Compaq R3000) timer fix
Message-ID:  <200501261149.11530.jkim@niksun.com>

next in thread | raw e-mail | index | archive | help

--Boundary-00=_Ho89Bj21fUgiL1X
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--Boundary-00=_Ho89Bj21fUgiL1X
Content-Type: text/plain;
  charset="us-ascii";
  name="io_apic.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="io_apic.diff"

--- src/sys/amd64/amd64/io_apic.c.orig	Fri Oct  8 01:21:14 2004
+++ src/sys/amd64/amd64/io_apic.c	Tue Jan 25 21:49:50 2005
@@ -148,6 +148,9 @@
 #endif
 TUNABLE_INT("hw.apic.mixed_mode", &mixed_mode_active);
 
+static int skip_set_extint = 0;
+TUNABLE_INT("hw.apic.skip_set_extint", &skip_set_extint);
+
 static __inline void
 _ioapic_eoi_source(struct intsrc *isrc)
 {
@@ -551,7 +554,7 @@
 		 * and that pins 1-15 are ISA interrupts.  Assume that all
 		 * other pins are PCI interrupts.
 		 */
-		if (intpin->io_vector == 0)
+		if (intpin->io_vector == 0 && skip_set_extint != 1)
 			ioapic_set_extint(io, i);
 		else if (intpin->io_vector < IOAPIC_ISA_INTS) {
 			intpin->io_bus = APIC_BUS_ISA;

--Boundary-00=_Ho89Bj21fUgiL1X--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501261149.11530.jkim>