Date: Tue, 15 Nov 2005 13:08:24 -0500 From: John Baldwin <jhb@freebsd.org> To: freebsd-amd64@freebsd.org Cc: Roman Neuhauser <neuhauser@sigpipe.cz> Subject: Re: problems booting recompiled 5.4-kernel (Was: amd64 does not see all 4 GB RAM on tyan GT24) Message-ID: <200511151308.25729.jhb@freebsd.org> In-Reply-To: <200511101420.04967.jhb@freebsd.org> References: <b41c75520511081016l3bf7156fk@mail.gmail.com> <1131641262.99700.3.camel@triton.mcneil.com> <200511101420.04967.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <jhb@FreeBSD.org> <>< 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 <machine/smp.h> #endif +#include <dev/ic/i8259.h> #include <amd64/isa/icu.h> #include <isa/isareg.h> @@ -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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511151308.25729.jhb>