Subject: Re: bus.h style question
To: Wolfgang Solfrank <firstname.lastname@example.org>
From: Ignatios Souvatzis <email@example.com>
Date: 08/20/1997 14:14:21
Wolfgang Solfrank wrote:
> [i.s. wrote:]
> > a) On machines, which _can_ have alien-endianness busses (more corretly:
> > busses handled by bus_space_xxx of different endiannesses), the only
> > functions which _can_ be implemented as efficient inline macros are
> > bus_space_xxx_1().
> Well, this depends on the implementation, as there are cpus that can access
> memory (or io for that matter) with special instructions that do the byte
> swapping on the fly.
I don't believe its possible at all. How do you propose to switch the
accesses byte-swapping between the ISA and the, say, ZBUS incantation of
the chipset driver? (Except, of course, if _all_ your bus bridges do provide
all necessary byte swapping functions in hardware))
> > b) Independent of CPU endianness, the normal ISA bus bus_space_read_2(t, h, o)
> > function is equivalent to
> > (bus_space_read_1(t, h, o) | (bus_space_read_1(t, h, (o)+1)<<8))
> > that is, it reads little-endian data items.
> Depending on the bus this wouldn't work. Consider for example the isa bus
> where accessing 16-bit values might do something totally different from
> accessing 8-bit values. One prominent example is the ide (or even the old
Yesyes... this further complicates the matter. *sigh*
Apply my example to the BUS_SPACE_MAP_LINEAR case.