Subject: bus_space_* on sbus question
To: None <current-users@netbsd.org>
From: john heasley <heas@shrubbery.net>
List: current-users
Date: 05/23/2002 16:05:17
if i have a fddi sbus card that i'm messing around with.  it's properties
are

local-mac-address        08 00 20 82 a2 b7
burst-sizes              00f8007f
pver                     00 00 00 52
device_type              network
intr                     00000004 00000000
interrupts               00000004
reg                      00000001 00007ff0 00000110  
model                    SUNW,595-3444,595-3445,595-3446
name                     nf

am i correct that this means that there is 1 register bank 00007ff0h
from the bus (parent's, sbus0) registers and 110h bytes in length?

assuming so, i guess that i should be able to sbus_bus_map() that
space, then use the handle to bus_space{read,write}_1() to read/write
the individual 8-bit registers.  correct?

i get the following when i attempt to write reg[0], while reading
returns without error (though i am unsure what i should expect from the
device at power-on).

cpu0: NMI: system interrupts: 20040000<VME=0,SBUS=0,SC,I>
sbus error:
        AFSR a181220e<PAH=e,SSIZ=1,SA=12,FAV,MID=2,S,SIZ=0,TO,ERR>
        address: 0xe10007ff2