From owner-freebsd-amd64@FreeBSD.ORG Wed Jan 26 16:49:16 2005 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A0A316A4CE for ; Wed, 26 Jan 2005 16:49:16 +0000 (GMT) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F11043D1F for ; Wed, 26 Jan 2005 16:49:15 +0000 (GMT) (envelope-from jkim@niksun.com) Received: from [10.70.0.244] (daemon.mj.niksun.com [10.70.0.244]) by anuket.mj.niksun.com (8.13.1/8.12.11) with ESMTP id j0QGnESq010199 for ; Wed, 26 Jan 2005 11:49:14 -0500 (EST) (envelope-from jkim@niksun.com) From: Jung-uk Kim Organization: Niksun, Inc. To: freebsd-amd64@freebsd.org Date: Wed, 26 Jan 2005 11:49:11 -0500 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_Ho89Bj21fUgiL1X" Message-Id: <200501261149.11530.jkim@niksun.com> X-Virus-Scanned: clamd / ClamAV version 0.75.1, clamav-milter version 0.75c on anuket.mj.niksun.com X-Virus-Status: Clean Subject: nForce3 (Compaq R3000) timer fix X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jan 2005 16:49:16 -0000 --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--