Date: Thu, 31 Aug 2006 15:28:13 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-current@freebsd.org, pyunyh@gmail.com Cc: David Christensen <davidch@broadcom.com>, LI Xin <delphij@delphij.net> Subject: Re: Simplified Steps for Building a Loadable module on -CURRENT Message-ID: <200608311528.14556.jhb@freebsd.org> In-Reply-To: <20060831102213.GD52038@cdnetworks.co.kr> References: <09BFF2FA5EAB4A45B6655E151BBDD90301E2F278@NT-IRVA-0750.brcm.ad.broadcom.com> <44F6AC9D.1080906@delphij.net> <20060831102213.GD52038@cdnetworks.co.kr>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 31 August 2006 06:22, Pyun YongHyeon wrote: > On Thu, Aug 31, 2006 at 05:32:13PM +0800, LI Xin wrote: > > Pyun YongHyeon wrote: > > > On Wed, Aug 30, 2006 at 03:12:59PM -0700, David Christensen wrote: > > > > I've been able to successfully build drivers in the past as > > > > loadable modules but I'm getting some kernel panics with -CURRENT > > > > when installing a module using kldload now where things used to > > > > > > I wonder you encountered the same panic I have been seeing on CURRENT. > > > I get "Fatal trap 30" message when I load em(4) module with kldload. > > > > What does Fatal trap 30 mean in these places? I get some strange fatal > > trap 30's in acpi_cpi_idle, but I can not imagine how can these happen :-( > > > > Don't know what's cause of the panic since it used to work ok. > See http://lists.freebsd.org/pipermail/freebsd-current/2006-August/065243.html Trap 30 means an IDT vector fired that we didn't expect. In this case, I think it may only happen on SMP, and it maybe that the interrupt gets sent to a CPU that hasn't seen the update to the IDT yet. Try this patch: Index: amd64/amd64/local_apic.c =================================================================== RCS file: /usr/cvs/src/sys/amd64/amd64/local_apic.c,v retrieving revision 1.26 diff -u -r1.26 local_apic.c --- amd64/amd64/local_apic.c 12 Jul 2006 21:22:42 -0000 1.26 +++ amd64/amd64/local_apic.c 31 Aug 2006 19:27:12 -0000 @@ -721,6 +721,7 @@ KASSERT(ioint_handlers[vector / 32] != NULL, ("No ISR handler for vector %u", vector)); setidt(vector, ioint_handlers[vector / 32], SDT_SYSIGT, SEL_KPL, 0); + smp_rendezvous(NULL, NULL, NULL, NULL); } /* Release an APIC vector when it's no longer in use. */ Index: i386/i386/local_apic.c =================================================================== RCS file: /usr/cvs/src/sys/i386/i386/local_apic.c,v retrieving revision 1.28 diff -u -r1.28 local_apic.c --- i386/i386/local_apic.c 12 Jul 2006 21:22:43 -0000 1.28 +++ i386/i386/local_apic.c 31 Aug 2006 19:26:54 -0000 @@ -724,6 +724,7 @@ ("No ISR handler for vector %u", vector)); setidt(vector, ioint_handlers[vector / 32], SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); + smp_rendezvous(NULL, NULL, NULL, NULL); } /* Release an APIC vector when it's no longer in use. */ -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608311528.14556.jhb>