Subject: Re: architecture independent device drivers
To: None <>
From: Charles M. Hannum <>
List: tech-kern
Date: 04/13/1995 15:22:52
   Others have mentioned various ways it may get uglier. I will note that for
   the DECstations, there are three different ways the cpu sees memory that
   apears contiguous to the LANCE. (alternate 16bit word, 16bit gap,...)

   I handled it with macros and architecture dependent memory copy functions,
   but this isn't necessarily a good way to do it.

I've already thought about this; I simply didn't mention it, since it
has a couple of trivial solutions.

The approach currently used in the pmax port is: a) use function
pointers for the routines to copy and zero data, and b) use ugly
macros for register access.  It should be obvious that this is not
really extensible in a machine-independent way.  What I've done is to
have message descriptors copied in and out in a similar manner to
buffers, and (though I haven't done this part yet) implement two
`millicode' functions for the register accesses done during normal