Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site redwood.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!genrad!mit-eddie!godot!harvard!seismo!hao!hplabs!hpda!fortune!rhino!redwood!rpw3 From: rpw3@redwood.UUCP (Rob Warnock) Newsgroups: net.unix-wizards Subject: Re: How do *you* debug device drivers? Message-ID: <105@redwood.UUCP> Date: Fri, 4-Jan-85 22:43:49 EST Article-I.D.: redwood.105 Posted: Fri Jan 4 22:43:49 1985 Date-Received: Tue, 8-Jan-85 03:08:14 EST References: <541@vu44.UUCP>, <895@dual.UUCP> <4855@utzoo.UUCP> Organization: [Consultant], Foster City, CA Lines: 36 +--------------- | ... However, note | that Rob Warnock gave a paper on this very subject at Salt Lake, and | there is at least a summary of it in the proceedings. His conclusion | was that you can do a lot of debugging in user mode if you really try. | Henry Spencer | {allegra,ihnp4,linus,decvax}!utzoo!henry +--------------- As I already sent a copy to the original requestor, I will not post it here (~200 lines) unless the demand warrents. Henry states my general position well: You can do a lot, actually nearly all, from user mode. CAVEAT: The devices you're trying to talk to must not permanently lose data if you don't service them speedily. What this means is that debugging disks, Ethernets, streamer cartridge tapes, and other block-at-a-time devices is easy; debugging synchronous comm lines is o.k. if you put the packet frame level (NOT the protocol, just the frame) in the kernel and leave the protocol in user mode; debugging speech processors is a bit harder (but I'm doing it anyway these days). Debugging byte-at-a-time disk controllers (like an Apple "Woz chip" controller) is asking for your disk to be erased the first time "cron" wakes up while you have the write gate open! ;-} What lets user-mode debugging work in general is that IN MOST CASES the time-critical part of the driver ("catch the interrupt") is not the algorithmically complex part of the driver ("what do I do with THIS frame?"), so you can separate them. Put just a stub in the kernel to "break the interrupt latency" and work on the hard stuff in user mode. Rob Warnock Systems Architecture Consultant UUCP: {ihnp4,ucbvax!dual}!fortune!redwood!rpw3 DDD: (415)572-2607 USPS: 510 Trinidad Lane, Foster City, CA 94404