Subject: bus_space_read problems
To: None <port-sparc@netbsd.org>
From: Ingolf Koch <ingolf@knuut.de>
List: port-sparc
Date: 12/30/1999 23:18:23
Hi,

in dbri_attach_sbus(), I have the following piece of code:

--------------------------------
...
sc->sc_bustag = sa->sa_bustag;
sc->sc_dmatag = sa->sa_dmatag;
if (sa->sa_npromvaddrs) {
        sc->sc_reg = (bus_space_handle_t)sa->sa_promvaddrs[0];
} else {
        if (sbus_bus_map(sa->sa_bustag,
                        sa->sa_slot,
                        sa->sa_offset,
                        sa->sa_size,
                        BUS_SPACE_MAP_LINEAR,
                        0, &sc->sc_reg) != 0) {
                printf("%s @ sbus: cannot map registers\n",
                                self->dv_xname);
                return;
        }
}
printf("\nat location 0: %04x\n", bus_space_read_2(sc->sc_bustag, sc->sc_reg, 0x0));
...
--------------------------------

I get a trap 0x29 with the bus_space_read_2() call. What am I
doing wrong?

    Ingolf
-- 

Ingolf Koch                      Beste Kneipe in Jena-Ost
PGP: 0x7B3B5661  213C 828E 0C92 16B5  05D0 4D5B A324 EC04