Subject: Re: Machine-independent device drivers
To: Charles M. Hannum <mycroft@ai.mit.edu>
From: Bakul Shah <bakul@netcom.com>
List: tech-kern
Date: 04/12/1995 22:31:02
> Does anyone have comments about this, or should I `just do it', as a
> proof of concept?

I think this is a neat idea!

For maintaining source compatibility you can also use MACROs
or __inline__ routines to isolate machine dependencies
instead of millicode.

If the MI/MD interface is very fat (lots of little
routines), it becomes very hard for a new person to
understand it well enough.  The MI/MD `cut' needs to be
carefully chosen to make the interface easy to grasp.

To gain back performance, in one system we built the serial
IO interrupt handler at runtime from a simple code template.
This allowed us to use constant addresses and more efficient
instructions (since we knew at runtime which SIO was at what
address).  Something worth looking at if that gains you
better overall modularity without any loss of performance.

If the MD part is done right it becomes possible to atleast
test a new MI driver in user mode (a very desirable goal
since you don't have to take the machine down many times
during development).  We had a small support library to make
this possible.

Go for it!

--bakul