Subject: Re: bus question
To: Tim Newsham <newsham@lava.net>
From: Johnny Billquist <bqt@update.uu.se>
List: port-vax
Date: 06/14/2004 11:33:42
On Sun, 13 Jun 2004, Tim Newsham wrote:

> I'm trying to understand the configuration and device code for
> NetBSD under vax.  On my system:
>
>    ibus0 at mainbus0
>    uba0 at ibus0: Q22
>    uda0 at uba0 csr 172150 vec 774 ipl 15    (csr = hex 0xf468)
>    qe0 at uba0 csr 174440 vec 770 ipl 15     (csr = hex 0xf920)
>
> uba_ibus.c sets up the uba0 with address 0x20000000.  As far
> as I can tell this should mean that the bus_space_write_*
> commands should write to 0x2000f468 + off and
> 0x2000f920 + off for the uda0 and qe0 devices.  This doesn't
> match up with where my devices really are:
>
>     RQ, address=20001468-2000146B
>     XQ, address=20001920-2000192F
>
> these addresses are both 0xe000 lower than I would expect them
> to be.  What am I missing here?

The CSR is a 16 bit address. On the Q-bus, the I/O page is at the last
8Kbyte (that is, from 0xe000 and up).
On a VAX (except the uVAX I), the I/O page is the only part of the Q-bus
you are interested in accessing. So, all access goes there.

All this from memory. There might be some tricks and details in the uba
that also relate to this, but I think that is more or less where your
0xe000 comes from.

	Johnny

Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt@update.uu.se           ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol