From owner-freebsd-questions Sun Oct 13 13:43:48 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA05017 for questions-outgoing; Sun, 13 Oct 1996 13:43:48 -0700 (PDT) Received: from inficad.com (straka@inficad.com [207.19.74.3]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id NAA05011 for ; Sun, 13 Oct 1996 13:43:45 -0700 (PDT) Received: (from straka@localhost) by inficad.com (8.7.4/8.7.3) id NAA04214; Sun, 13 Oct 1996 13:47:16 -0700 (MST) Date: Sun, 13 Oct 1996 13:47:15 -0700 (MST) From: Richard Straka To: questions@FreeBSD.ORG Subject: Registering ISR for LKM Device Driver Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk I am in the process of writing several device drivers for FreeBSD to interact with custom realtime test equipment. This hardware is interrupt driven and hence, I have to register the interrupt service routines with the kernel. It is highly desirable to use the Loadable Module mechanism for inclusion of the device drivers into the kernel. I have the following questions. - Where can I get a template of an LKM device driver that uses interrupts? - What is the relationship between register_intr(), register_imask(), and update_intr_masks() in /sys/i386/isa/isa.c? Can I use these calls in some sequence to register my LKM ISR's? Looking at the code, some of the functionality of these 3 routines look redundant. - How do I unregister the interrupts and clean up the interrupt masks when I unload the module. Does the function unregister_intr() from isa.c take care of this for me? - What is the distinction between a fast and slow interrupt? Some of the interrupts from my test equipment may be rather high frequency >1000HZ and require low latency. Do I need to take additional precautions in my drivers if I use fast interrupts? Any help on these issues would be greatly appreciated. Thanks in advance. Richard Straka straka@inficad.com