Subject: Re: tlp or de?
To: Manuel Bouyer <>
From: Nathan J. Williams <>
List: port-alpha
Date: 11/30/2003 20:19:00
Manuel Bouyer <> writes:

> Can you give more details on what BWX is ?
> Maybe it could be the cause of some IDE controller sometimes failing on
> my 21064 ...

BWX ("Byte-Word eXtensions") is a set of instructions for doing 8- and
16-bit loads and stores. Prior to BWX, such small objects in memory
could only be handled by loading 32- or 64-bit values and the use of
shifts and masks.

Most programs don't care; the compiler takes care of this. For OS code
that talks to devices where bigger reads or writes have side effects,
there's a problem, though. Alpha systems handled this with the
invention of "sparse space" mappings, where the memory controller
mapped a range of memory for each usable I/O address - with different
32-bit words to access different 8- and 16-bit addresses.

For example, the CIA system controller found on pc164 boards has a
sparse PCI I/O mapping where address bits <4:3> select the access size
(00 for byte, 01 for word, 10 for for tribyte, and 11 for longword),
and bits <6:5> select the offset within the addressed longword. Eating
up address bits like this means that it takes 16GB of address space in
the pc164 memory map to address 512MB of PCI memory. There are also
BWX-capable mapping regions for PCI I/O and memory - but there were
bugs in different revisions as to whether sparse space or dense space
worked better.

However, the bus_space_*() routines are supposed to take care of all
of this (I believe that Alpha sparse-space complexity was part of the
motivation for bus_space, in fact), so the suggestions of drivers
failing because of side-effect reads on an Alpha that don't happen on
other systems smells fishy to me.

        - Nathan