Subject: Re: loading real device drivers?
To: None <jtk@atria.com>
From: Charles M. Hannum <mycroft@gnu.ai.mit.edu>
List: port-i386
Date: 12/05/1994 14:25:31
   Has anybody worked on loading a real device driver (one that uses I/O
   ports and handles interrupts) into an i386 NetBSD/1.0 kernel?

No, but...

   I'd like to do that (to make debugging easier), but I don't have any
   examples to follow of something that can at load time probe and attach,
   and later return the interrupt handler to the stray handler and unload.

You'd probably want to use a probe and attach similar to what's
currently done.  You'll need an extra routine to shut down the driver,
but ultimately such a routine should exist for every driver whether
it's loadable or not.  intr_establish() and intr_disestablish() should
work fine any time.

The only additional constraint that comes to mind is that you want to
be Really Bloody Careful (tm) to not stomp on an existing device.