Path: utzoo!utgpu!attcan!uunet!husc6!uwvax!oddjob!mimsy!eneevax!umd5!decuac!felix!info-ultrix From: jbm@eos.UUCP (Jeffrey Mulligan) Newsgroups: comp.unix.ultrix Subject: Re: Device Drivers for MicroVax under Ultrix Message-ID: <52120@felix.UUCP> Date: 4 Aug 88 13:50:21 GMT References: <51452@felix.UUCP> Sender: info-ultrix@felix.UUCP Reply-To: jbm@eos.UUCP (Jeffrey Mulligan) Organization: NASA Ames Research Center, California Lines: 39 Approved: zemon@felix.UUCP Reply-Path: >From article <51452@felix.UUCP>, by nelson@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@aurora.arc.nasa.gov) NASA/Ames Research Ctr., Mail Stop 239-3, Moffet Field CA, 94035 (415) 694-6290