From owner-freebsd-hackers Fri Oct 3 23:35:31 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id XAA00970 for hackers-outgoing; Fri, 3 Oct 1997 23:35:31 -0700 (PDT) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id UAA00553 for ; Fri, 3 Oct 1997 20:40:13 -0700 (PDT) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id UAA21124; Fri, 3 Oct 1997 20:31:51 -0700 (PDT) Received: from current1.whistle.com(207.76.205.22) via SMTP by alpo.whistle.com, id smtpd021120; Sat Oct 4 03:31:41 1997 Message-ID: <3435B860.19A13460@whistle.com> Date: Fri, 03 Oct 1997 20:30:40 -0700 From: Julian Elischer Organization: Whistle Communications X-Mailer: Mozilla 3.0Gold (X11; I; FreeBSD 2.2-CURRENT i386) MIME-Version: 1.0 To: mdean CC: freebsd-hackers@freebsd.org Subject: Re: lkms versus hard linked drivers References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk mdean wrote: > > My question is very simple: What can't be a lkm? > For instance if I have some intel 8255As that I am going to use to produce > a 500hz pulse train for stepper motor control. These chips aren't stateless > and need to be intialized and mostly need to be kernel code to access > change of state interrupts and the high frequency clock (obviously). Can I > do all this from an lkm? yes sure. the only function that MUST be done at bootup is allocation of LARGE physically contiguous buffers of ram. because after running a few seconds ram get's fragmented.. large VIRTUALLY contiguous buffers are ok. I'm not sure about interrupts in the present code.. > > Will everything except the boot device driver and microkernel eventually be > an lkm? yes > Is it undesirable or something, because the only module that I am > using on my system is for the screensaver? no there are a few pieces of the puzzle still not quite ready. check the LKM examples in /usr/share/exaples/lkm as well. > > What about this: I am pretty sure I cannot do this inside the kernel. What > if I want my device driver for the stepper motor to socket(2) since it is > really not going to have any ioctls. This way controlling motor position > can be done from any machine on the network. of course it can be done.. but it may be better to have a daemon do that part.. > > Can I use any system call in a) device driver in the kernel tree b) lkm? no, and no.