making VME "data" references rather than "supervisor" references

Steve Dyer dyer at spdcc.com
Sat Dec 3 05:07:07 AEST 1988


I've come up against the limits of my knowledge of the VME bus and its
manipulation under Sun OS, not that it was extensive to begin with.

I am writing a device driver for a Q-bus SCSI controller.  Wrong group,
you suddenly say?  No, the device will be installed on a Sun 4/260, with
the Q-bus peripheral sitting in a card cage connected to the VME bus
through a BIT3 VME-2-Qbus converter.  (The rationale for this is
completely irrelevant to this discussion, and although it may seem like an
exercise in masochism, believe me, there are reasons...)

Briefly, the BIT3 card has its own VME bus and Q-bus registers which are
accessible to the Sun processor, and the Q-bus registers of the SCSI
controller *should* also be accessible to the Sun processor.  However,
after all the switch settings are checked and rechecked, I find that I
cannot access the Q-bus device registers when I access
xxinfo[unit]->mb_addr as a pointer to a template of device registers
(struct xxaddr *).

I understand the reason for this, but I am not sure what I can do to get
around it.  In brief, the VMEbus specifies 6 "address modifier lines"
which are asserted when an address is asserted.  BIT3 interface is
designed to present the local BIT3 VME and Qbus registers (i.e. the
interface's own special registers) when an address is modified with the
"supervisor" state (VMEbus address modifier lines set to hex 2D, I
believe).  Only when the address is asserted with the VME address modifier
lines set to "data" (hex 29), are the boards on the Q bus accessed.

Of course, in my driver, I just say something like:
	addr = xxinfo[unit]->mb_addr;
	if (addr->csr)
		...
but whenever I do that, I keep getting copies of the BIT3 registers and
not the registers of the Q-bus device.  I don't have the faintest idea how
I tell the Sun to generate a "data" reference rather than a "supervisor"
reference when I reference a device register on the VMEbus.  Does anyone
have a clue?

I might mention that the BIT3 folks are extremely knowledgable and
conscientious and helpful.  At least, for people who don't know anything
about, nor have any Suns.  (Their clientele has usually been going from a
Qbus processor to a VMEbus cardcage.) They will be getting Suns shortly,
and will be learning slowly, but I need a solution now.

Thanks for any pointers you have.

---
Steve Dyer
dyer at harvard.harvard.edu
dyer at spdcc.COM aka {harvard,husc6,linus,ima,bbn,m2c,mipseast}!spdcc!dyer



More information about the Comp.sys.sun mailing list