Device Drivers for MicroVax under Ultrix

Jeffrey Mulligan jbm at eos.UUCP
Thu Aug 4 23:50:21 AEST 1988


>From article <51452 at felix.UUCP>, by nelson at kodak.com (bruce nelson):
 
> We are contemplating purchase of a display device for which we will be
> able to obtain an already written device driver for 4.3 BSD on a VAX 750.
 
> What will be necessary to convert this device driver code to run on
> a MicroVax under Ultrix? Is it a trivial (change a few addresses) or
> hard (reinvent the wheel) kind of a task.

I have just done something like this; I'm not quite through, though.
(The driver I started with may have been 4.2 instead of 4.3, I think
the Ultrix was 1.2 but I'm not positive.)

There was only one real hitch.  When I tried to relink the new kernel,
the symbols spl6(), splx(), (set processor priority) came up
undefined.  By doing "nm /vmunix | grep pri" I discovered the two
symbols getpriority and setpriority.  I substituted these in the
appropriate places, but the job is still not finished.  Unfortunately,
I don't know what is the proper calling syntax of these routines.
The spl? routines return the current priority, but it is in the form
of a processor status word; thus if you do "splx( n=spl6())" the
processor priority gets set to 6, but the value of n is not six,
it is some PS word.  So my question is, does getpriority() return
a small integer, a PS word or something else?  (I put printf's
at the points where the calls occurred, but that section of the driver
hasn't been activated by my activities yet.)

If anyone can answer this question I will be very grateful.
To the original poster, with that exception, our driver was up
and running with no problem.


v
-- 

	Jeff Mulligan (jbm at aurora.arc.nasa.gov)
	NASA/Ames Research Ctr., Mail Stop 239-3, Moffet Field CA, 94035
	(415) 694-6290



More information about the Comp.unix.ultrix mailing list