- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: OpenVMS driver in C
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-08-2008 01:33 PM
тАО02-08-2008 01:33 PM
Re: OpenVMS driver in C
I've read your response of
"My driver should create a file with size of 0 blocks and append it. looks like TAR but should be a driver."
It's still not clear (to me) how you want to do this. Do you want to replace the existing SCSI stack on VMS? Do you want to use some never-before connected device? There may be more easily-attainable ways to do this.
The Sherlock/Szubowicz book is quite good at what it purports to do, which is explain the nuts and bolts of writing a VMS device driver in C. The book is largely aimed at those who
already understand the VMS driver environment and attempts to document the kernel routines one would use. It's not for someone who doesn't already understand things like IRP, UCB, DDB, DDT, FDT, STARTIO, KP_STARTIO, etc ...
If you've got the source, take a look at DQDRIVER (the IDE driver). It's a monolithic class/port driver.
As said before, if you think LRDRIVER is too complex, then you are likely over your head already.
-- Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-08-2008 06:29 PM
тАО02-08-2008 06:29 PM
Re: OpenVMS driver in C
Here's an I/O intro:
http://64.223.189.234/node/114
Notes on driver debugging (started this just yesterday; very preliminary)
http://64.223.189.234/node/753
An older version of DQDRIVER is on Freeware V6.0.
http://64.223.189.234/node/750
Ancillary Control Processes (ACPs):
http://64.223.189.234/node/213
(I wrote my first ACP a couple of months before Lee & Jamie published the book. Grumble. I do have a copy of the original book, picked up when a corporate library closed and dispersed its books.)
Getting from kernel-mode to disk is going to involve either an ACP, or some fancy footwork with mapping the file akin to what Jur does with LD. RMS and kernel-mode at IPL are incompatible, hence the ACP.
Of the various OpenVMS ACPs present in the source listings, MTAACP is one of the easiest to read. Stay away from the DECnet ACPs; those are really twisty, due to the way they have to work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-09-2008 01:14 AM
тАО02-09-2008 01:14 AM
Re: OpenVMS driver in C
>what it purports to do, which is explain the
>nuts and bolts of writing a VMS device driver
>in C. The book is largely aimed at those who
>already understand the VMS driver environment
>and attempts to document the kernel routines
>one would use. It's not for someone who
>doesn't already understand things like IRP,
>UCB, DDB, DDT, FDT, STARTIO, KP_STARTIO, etc
True.
So where I can study what is DDb,DDT, etc,etc,etc with clear examples of using?
Unfortunately I cant be at the Bootcamp (it is VERY hard for me, or impossible even).
May be, it is a good idea to put examples from VMS guru in the web if such theme will be in the meeting? I'm sure not only I am is interested in it.
NL: driver (/dev/null) is a good start may be.
I dont know can ACP help me.
I wish to create a device named, VTP: for example, then I'll can do:
$COPY file.ext VTP0:
or
$BACKUP [...]*.* VTP0:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-09-2008 01:26 AM
тАО02-09-2008 01:26 AM
Re: OpenVMS driver in C
If you think that LRdriver in sys$examples is difficult then you may want to re-think your approach. You may be better of with a simple skeleton driver and an acp, or just plain usermode application code. A driver can be very efficient for heavy duty use, but it may not be the best solution. There are other ways.
I've been writing VMS drivers for more than 25 years and it's easy once you know the inner workings of VMS. :-). But it takes time to learn that.
Jur.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-09-2008 01:56 AM
тАО02-09-2008 01:56 AM
Re: OpenVMS driver in C
How about "Writing OpenVMS device drivers in C" chapter 2, specifically look at 2.8 Example of an I/O request" starting on page 19.
After you read chapter 2, then look at lrdriver.c again, and see if you can then follow what is in it.
What will you do with this "virtual tar tape" once you have it? And why can't you use something like VMSTAR instead? If you are looking for something to exchange files between Linux and VMS, why not use zip/unzip?
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-09-2008 05:13 AM
тАО02-09-2008 05:13 AM
Re: OpenVMS driver in C
Put simply, an ACP does processing that it is possible (or at least not easily possible) from within the limited context of a driver.
Drivers operate effectively as subroutines of the executive, not independent processes. As Hoff has noted, for example, a driver cannot directly use RMS or for that matter, the file system.
An ACP (ancillary control process) on the other hand, is a full, albeit privileged, process. Its function is to take an IO Packet and do some supplemental (or complete processing) to it. For many years, all file system processing was done using F11BACP, the Files-11 Level 2 ACP. This was reimplemented as the XQP to improve performance. On magnetic tape, the ANSI processing is performed by the ACP.
In your case, the ACP could accept the packet from the driver, do the necessary processing (including, for example, any buffering or time consuming compression calculations), and then signal the completion of the operation. It would also write buffers to the actual file.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2008 10:58 PM
тАО02-10-2008 10:58 PM
Re: OpenVMS driver in C
WG
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2008 01:48 AM
тАО02-11-2008 01:48 AM
Re: OpenVMS driver in C
They are in the archived documents page http://h71000.www7.hp.com/doc/archived.html with the exception of the Digital Press book "Writing OpenVMS Alpha Device Drivers in C", which was only released in printed form (that I am aware of).
All of the following pdf documents were released in 1994 with VMS 6.1
As such they are quite dated, but the basic principles are the same. At that time VMS on Alpha was essentially a 32 bit operating system, the high longword of addresses were sign extended from the lower 32 bits.
All of the device support manuals are written for system's programmer's, i.e. you are expected to understand VMS internals, how synchronization is maintained with IPL and spinlocks, etc.
The "Writing OpenVMS Alpha Device Drivers in C" book was released in 1996, and describes the VMS 7.0 environment, including 64 bit address space. But many things have been added since 1996 and 7.0. As far as I am aware, there is no external documentation on writing device drivers for the IA64.
----------
OpenVMS VAX Device Support Manual
http://h71000.www7.hp.com/doc/73final/documentation/pdf/OVMS_VAX_SUP_GD.pdf
OpenVMS VAX Device Support Reference Manual
http://h71000.www7.hp.com/doc/73final/documentation/pdf/OVMS_VAX_SUP_REF.pdf
OpenVMS Alpha Device Support: Developer's Guide
http://h71000.www7.hp.com/doc/73final/documentation/pdf/OVMS_DEVGD_VMSINSTAL.pdf
OpenVMS Alpha Device Support: Reference
http://h71000.www7.hp.com/doc/73final/documentation/pdf/OVMS_ALPHA_DEV_SUP_REF.pdf
Creating an OpenVMS AXP Step 2 Device Driver from a Step 1 Device
http://h71000.www7.hp.com/doc/73final/documentation/pdf/CR_AXP_STEP2_DR_FR_STEP1.pdf
Creating an OpenVMS AXP Step 2 Device Driver from an OpenVMS VAX Device Driver
http://h71000.www7.hp.com/doc/73final/documentation/pdf/CR_AXP_STEP2_DR_FR_VAX_DR.pdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2008 02:41 AM
тАО02-11-2008 02:41 AM
Re: OpenVMS driver in C
have you looked at the Archived Manuals at the OpenVMS Documentation Site?
http://ftp.openvms.compaq.com/doc/archived.html
OpenVMS AXP Device Support: Developer's Guide
Describes how to write a driver for OpenVMS Alpha for a device not supplied by Compaq.
OpenVMS AXP Device Support: Reference
Provides the reference material for the Writing OpenVMS Alpha Device Drivers in C by describing the data structures, macros, and routines used in device-driver programming.
OpenVMS VAX Device Support Manual
Describes how to write an OpenVMS VAX driver for a device not supplied by Compaq.
OpenVMS VAX Device Support Reference Manual
Provides the reference material for the OpenVMS VAX Device Support Manual by describing the data structures, macros, and routines used in device-driver programming.
Creating an OpenVMS Alpha Device Driver from an OpenVMS VAX Device Driver
Describes the procedures for converting a device driver used on OpenVMS VAX to a device driver that runs on OpenVMS Alpha. This book also contains data structures, routines, and macros for maintaining an Alpha driver written in Macro-32.
Creating an OpenVMS AXP Step 2 Device Driver from a Step 1 Device Driver
Provides information for upgrading a Step 1 device driver (used in earlier versions of OpenVMS AXP) to a Step 2 device driver. A Step 2 device driver is required for OpenVMS AXP Version 6.1.
Creating an OpenVMS AXP Step 2 Device Driver from an OpenVMS VAX Device Driver
Provides information for migrating a device driver used on OpenVMS VAX to a Step 2 device driver used on OpenVMS AXP Version 6.1.
I took the above descriptions from the following URL...
http://ftp.openvms.compaq.com/doc/83FINAL/6679/6679pro_014.html
Other potentially relevant URLs...
VAX/VMS Realtime Programming
An Application Note by Bill Forbes
http://www.ibiblio.org/pub/academic/computer-science/history/pdp-11/hardware/micronotes/numerical/micronote44.txt
AXP-DRIVER-EXAMPLE
http://h71000.www7.hp.com/freeware/freeware80/AXP-DRIVER-EXAMPLE/
Cheers!
Keith
Consultant
Wipro Technologies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2008 02:52 AM
тАО02-11-2008 02:52 AM
Re: OpenVMS driver in C
An Application Note by Bill Forbes
http://www.ibiblio.org/pub/academic/computer-science/history/pdp-11/hardware/micr
onotes/numerical/micronote44.txt"
This is in interesting read from a historical perspective, as it was written over 21 years ago (in 1986). One thing described is the connect to interrupt driver, which on the VAX allowed you to redirect a hardware interrupt to your code, without having to write a device driver. That functionality never moved to the Alpha, i.e. there is no connect-to-interrupt driver on Alpha. So you won't be able to use that as a shortcut for a simple driver.
Jon