From owner-freebsd-hackers Mon Jun 23 11:23:52 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA19771 for hackers-outgoing; Mon, 23 Jun 1997 11:23:52 -0700 (PDT) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id LAA19756 for ; Mon, 23 Jun 1997 11:23:44 -0700 (PDT) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id UAA09049; Mon, 23 Jun 1997 20:23:42 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.8.5/8.8.5) id UAA27843; Mon, 23 Jun 1997 20:20:14 +0200 (MET DST) Message-ID: <19970623202014.WQ44135@uriah.heep.sax.de> Date: Mon, 23 Jun 1997 20:20:14 +0200 From: j@uriah.heep.sax.de (J Wunsch) To: freebsd-hackers@freebsd.org (FreeBSD hackers) Cc: un_x@anchorage.net (Steve Howe) Subject: Re: direct access References: <199706231157.VAA18802@genesis.atrad.adelaide.edu.au> X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199706231157.VAA18802@genesis.atrad.adelaide.edu.au>; from Michael Smith on Jun 23, 1997 21:27:39 +0930 Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk As Michael Smith wrote: > Joerg talked about the "ISA hole"; let's clarify a little. ... > One of these mappings arranges pages so that kernel virtual addresses > in the range 0xa0000-0xfffff refer to physical addresses > 0xa0000-0xfffff, in order to make life slightly easier for ISA > drivers. It doesn't apply to user processes, which have their own > mappings. I think it's mapped to the kernel virtual addresses (KVA) 0xf00a0000 and above, not to the low addresses. That is, right below the kernel text (0xf0100000). But again, this knowledge is useful inside device drivers, not user programs. > An LKM is just a slab of code that gets loaded into the kernel. You > can write device drivers; they're not rocket science. I also always felt that it was easier to write a device driver, than a devicer driver LKM. :) After all, Steve, a Unix device driver is just a piece of C code, nothing else. It's only that it is linked into another executable, the kernel, and normally uses a standardized set of functions to talk to the environment. Layering the implementation is one of the wonderful things in Unix (and not only there). You can usually divide your task into three layers: the device driver, abstracting the hardware for you into read/write/ioctl system calls. Then comes backend layers, userland programs to manipulate device drivers. To pick an example device driver i'm confident with, the CD-R driver, this is things like the `wormcontrol' utility that allows you to manipulate some driver stuff, and/or simple things like a `dd' command doing the basic IO. On top of all this, there's the user interface, something that makes every- thing usable at all. It can be a simple shell script glueing all the pieces together, which gives you a quick start. Or it could be a fancy graphical user interface with one of the graphical toolkits. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)