From owner-freebsd-amd64@FreeBSD.ORG Tue Nov 15 18:08:34 2005 Return-Path: X-Original-To: freebsd-amd64@freebsd.org 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 E794216A41F for ; Tue, 15 Nov 2005 18:08:34 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (66-23-216-219.clients.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6016A43D45 for ; Tue, 15 Nov 2005 18:08:34 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 2011085 for multiple; Tue, 15 Nov 2005 13:08:38 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id jAFI8L2f087883; Tue, 15 Nov 2005 13:08:21 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-amd64@freebsd.org Date: Tue, 15 Nov 2005 13:08:24 -0500 User-Agent: KMail/1.8.2 References: <1131641262.99700.3.camel@triton.mcneil.com> <200511101420.04967.jhb@freebsd.org> In-Reply-To: <200511101420.04967.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_ZQieDd8YNe9kuRO" Message-Id: <200511151308.25729.jhb@freebsd.org> X-Spam-Status: No, score=-2.8 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: Roman Neuhauser Subject: Re: problems booting recompiled 5.4-kernel (Was: amd64 does not see all 4 GB RAM on tyan GT24) X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Nov 2005 18:08:35 -0000 --Boundary-00=_ZQieDd8YNe9kuRO Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Thursday 10 November 2005 02:20 pm, John Baldwin wrote: > On Thursday 10 November 2005 11:47 am, Sean McNeil wrote: > > On Thu, 2005-11-10 at 11:11 -0500, John Baldwin wrote: > > > On Wednesday 09 November 2005 04:12 pm, Sean McNeil wrote: > > > > On Wed, 2005-11-09 at 16:04 -0500, John Baldwin wrote: > > > > > On Wednesday 09 November 2005 02:47 pm, Roman Neuhauser wrote: > > > > > > # jhb@freebsd.org / 2005-11-09 10:22:07 -0500: > > > > > > > On Wednesday 09 November 2005 04:22 am, Claus Guttesen wrote: > > > > > > > > I tried FreeBSD 6.0 a few days ago and I seem to recall that > > > > > > > > the above mentioned line is not needed in FreeBSD 6.0, but my > > > > > > > > (own) memory is probably corrupt :-) > > > > > > > > > > > > > > That's correct. > > > > > > > > > > > > EAMBIGUOUS. > > > > > > > > > > > > Which part is correct? "mentioned line is not needed in > > > > > > FreeBSD 6.0" or "my (own) memory is probably corrupt"? > > > > > > > > > > You don't need atpic on 6.0. > > > > > > > > Not true. My Athlon 2x Gigabyte K8 Triton (GA-K8NSC-939) requires > > > > atpic or it will not boot. This is an nVidia nForce3-Pro250 board. > > > > > > You need to post a problem report about it then since we are probably > > > going to remove atpic in 7.0. When atpic was taken out of GENERIC in > > > HEAD recently no one said it broke for them. What problems do you see > > > with atpic taken out on 6.0? > > > > Again, not true. When it was asked in email subject > > > > Re: [PATCH] remove 'device atpic' > > > > I responded at that time with: > > > > On Thu, 2005-10-20 at 10:40 -0400, John Baldwin wrote: > > > On Wednesday 19 October 2005 05:28 pm, Sean McNeil wrote: > > > > Just recently fried my MSI MB and got a new one with an Athlon 64x2. > > > > The following setup still requires the 'device atpic' or it will > > > > fault > > > > > > with an unknown/reserved trap of 30: > > > > > > > > GigaByte K8 Triton Series GA-K8NSC-939 BIOS rev. F5 > > > > AMD Athlon 64 X2 Dual-Core Processor 3800+ > > > > > > > > It works perfectly fine as a single core without the atpic device > > > > and as > > > > > > a dual-cpu with the atpic device. This board has the nForce3 250Gb > > > > chipset. > > > > > > What version(s) of FreeBSD does it fail on? > > > > This was/is 6-current RC1. > > Ok, can you get a stack trace? The only time I've seen these recently was > when the 8259A wasn't truly shut down correctly during boot and it fired an > interrupt before it was shut up. Hmm, I thought Peter had added some hack > code to just shut the 8259As up during boot, but now I can't find it. Ah, > it's earlier in that function. It might be that his hack is incomplete as > it assumes the 8259As are in a certain state, and if they aren't then his > hack won't work. I'll try to flesh it out some more. Here's a patch you can test. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org --Boundary-00=_ZQieDd8YNe9kuRO Content-Type: text/x-diff; charset="iso-8859-6"; name="amd64_atpic.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="amd64_atpic.patch" --- //depot/vendor/freebsd/src/sys/amd64/amd64/machdep.c 2005/10/26 22:21:00 +++ //depot/user/jhb/acpipci/amd64/amd64/machdep.c 2005/11/15 16:41:07 @@ -124,6 +124,7 @@ #include #endif +#include #include #include @@ -1126,9 +1127,22 @@ char *env; #ifdef DEV_ISA - /* Preemptively mask the atpics and leave them shut down */ +#if !defined(DEV_ATPIC) + /* Preemptively reset and mask the atpics and leave them shut down */ + outb(IO_ICU1, ICW1_RESET | ICW1_IC4); + outb(IO_ICU1 + ICU_IMR_OFFSET, IDT_IO_INTS); + outb(IO_ICU1 + ICU_IMR_OFFSET, 1 << 2); + outb(IO_ICU1 + ICU_IMR_OFFSET, ICW4_8086); outb(IO_ICU1 + ICU_IMR_OFFSET, 0xff); + outb(IO_ICU1, OCW3_SEL | OCW3_RR); + + outb(IO_ICU2, ICW1_RESET | ICW1_IC4); + outb(IO_ICU2 + ICU_IMR_OFFSET, IDT_IO_INTS + 8); + outb(IO_ICU2 + ICU_IMR_OFFSET, 2); + outb(IO_ICU2 + ICU_IMR_OFFSET, ICW4_8086); outb(IO_ICU2 + ICU_IMR_OFFSET, 0xff); + outb(IO_ICU2, OCW3_SEL | OCW3_RR); +#endif #else #error "have you forgotten the isa device?"; #endif --Boundary-00=_ZQieDd8YNe9kuRO--