From owner-freebsd-questions@FreeBSD.ORG Fri Apr 4 16:34:01 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA55737B401; Fri, 4 Apr 2003 16:34:01 -0800 (PST) Received: from bluejay.mail.pas.earthlink.net (bluejay.mail.pas.earthlink.net [207.217.120.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4236F43F3F; Fri, 4 Apr 2003 16:34:01 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0021.cvx22-bradley.dialup.earthlink.net ([209.179.198.21] helo=mindspring.com) by bluejay.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 191bd9-0003Hs-00; Fri, 04 Apr 2003 16:34:00 -0800 Message-ID: <3E8E2418.9B46EBDD@mindspring.com> Date: Fri, 04 Apr 2003 16:32:24 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Kan Cai References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a43d55dd39a296e4a370d6d792df2fb12a3ca473d225a0f487350badd9bab72f9c350badd9bab72f9c cc: freebsd-hackers@freebsd.org cc: freebsd-questions@freebsd.org Subject: Re: the CPU interrupt handler X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2003 00:34:02 -0000 Kan Cai wrote: > I am trying to locate the CPU interrupt handler, but with no luck. I > guess it is somewhere in the "1386" folder, but not sure which file is > doing the job. Could someone there shed some lights on this? > > Since I am trying to capture the NIC interrupts, so it should not be > exceptions. Thanks a lot. You need to look at an existing NIC driver to see how it grabs interrupts. The functions you are probably interested in are bus_setup_intr() and bus_teardown_intr(). If you are trying to do this in an evil, i386 way, because you want to intercept the interrupt path for some legitimate instrumentation purpose, or because you have some wrong idea that this will make your networking product run faster, then you could do worse than to look at the functions "inthand_*" in /usr/src/sys/i386/isa/intr_machdep.c. -- Terry