kc@rna.UUCP (Kaare Christian) (09/17/86)
I am about to write a device driver for a very odd I/O device, a QVI. The QVI is a QBUS to VME bus device. It lets a Qbus master access VME bus memory by mapping a chunk of VME memory into a chunk of the Qbus. In part the device is very ordinary -- a bunch of registers in the Qbus IO page -- and in part it is weird -- it can be programmed to respond to various blocks of addresses in the Qbus memory space. My goal is a QVI device driver that will map a portion of the QBUS address space into the local address space of a program running on a uVAXii. I plan to use system calls to set up the mapping, but I need to accessed the mapped VME memory from within a user program. I am aware of the maptouser() facility in the Ikonas driver, but it seems to solve only a part of the problem. From looking at the BSD42 code it seems that I have to do somewhat the opposite of what is done in the ubasetup() routine. I need to grab the resource from the resource map so noone else uses it; I need to somehow disable any mapping of the Qbus space to uVAXii memory space; do something with the Sysmap pte to allow access; and generate a token that the user program can use to get at that address. I imagine with sufficient work and sweat I'll get there but I would really appreciate guidance from anyone who knows about BSD System Resources and VAX inter-bus mappin. Best would be some code that does this, or something close to this. BTW. If someone wants a (weak) commercial reason to do this, how bout a RAM disk. QBUS memory is cheap, and 22 bits gives you 4 megs less the 256K that seems to be used by device drivers for dma. You could make an almost 4 MEG ram disk given a device driver similar to what I describe and some Qbus memory. If you would have time to chat, call me (or send mail with your number and I'll call you). If you have suggestions, code samples, insights, etc. please let me know. Kaare Christian Rockefeller U. Neurobiology cmcl2!rna!kc 212-570-7669