[Info-vax] VMS device drivers
Simon Clubley
clubley at remove_me.eisner.decus.org-Earth.UFP
Tue Sep 19 13:40:10 EDT 2023
On 2023-09-18, Single Stage to Orbit <alex.buell at munted.eu> wrote:
> On Mon, 2023-09-18 at 17:04 +0200, Johnny Billquist wrote:
>> > It should be straightforward to port the existing X11 driver for
>> > Virtualbox or VMware to OpenVMS. The x86 driver already exists for
>> > Linux.
>>
>> Uh? How did you come to the conclusion that some driver from Linux
>> would be straight forward to port to VMS? There aren't exactly much
>> commonality between the internals in Linux and VMS...
>
> The driver model in VMS may be very different to what is expected in
> Linux but the basics of controlling the device itself does't change.
> Likewise for X11.
>
Understanding how a device works is only one part of writing a successful
device driver, especially on VMS.
I wrote a VMS device driver once for VMS about 20 years ago just for fun,
and it was such a painful exercise compared to writing a device driver
for Linux, that I _never_ did it again. :-)
[It was back in the days of analogue TV, and I put a WinTV PCI card into
an AlphaStation and wrote a device driver to pull the teletext data stream
out of the video signal and display teletext pages on a VT emulator.
Like I said above, this was just for fun.]
For one thing, unlike Linux, there is absolutely _no_ kernel module
support in VMS. On VMS, when you need to reload your device driver
while trying to get things to work, you need to reboot your system
_every_ _single_ _time_ you want to load an updated device driver. :-( :-(
Also, unless things have changed in recent years, the only example
device driver provided is LRDRIVER, which doesn't even begin to address
a wide range of more advanced topics. On Linux, if you want to understand
some complex or subtle device driver concept, you can just pick a device
driver that uses this concept and study how that device driver did it.
Oh, and don't even _think_ about trying to write your own filesystem
driver for VMS unless you are willing to purchase the VMS source code kit,
as there's absolutely no public documentation on that.
On Linux however, the VFS infrastructure is beautifully elegant:
https://docs.kernel.org/filesystems/vfs.html
Wish you could do _that_ on VMS.
> Hopefully VSI has documentation on implementing drivers in x86_64 on
> their website, I would definitely take a look.
I doubt it.
When sanity prevailed, and DEC allowed you to write VMS device drivers
in C, it became its own book that you had to purchase. That was for Alpha,
and I never saw anything for Itanium, and IIRC, it's been mentioned that
there will not be a device driver book for x86-64 as well.
Simon.
--
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
More information about the Info-vax
mailing list