Subject: Re: bus.h style question
To: None <>
From: Bill Studenmund <>
List: tech-kern
Date: 08/15/1997 09:11:58
> On Thu, 14 Aug 1997 15:56:41 -0500 (CDT) 
>  Scott Reynolds <scottr@Plexus.COM> wrote:
>  > There is no byte swapping done by bus_space.  As Leo (I think) points out,
>  > you may or may not need it for some hardware.  A simple example that
>  > hasn't been mentioned is the DP8390 Ethernet controller; it can be
>  > configured for either big- or little-endian modes.
> For some busses, the only sane way to treat them is their "native" byte
> order.  I.e. ISA, EISA, and PCI should all be considered "little endian".
> It's my opinion that the bus_space_* functions _should_ perform the
> necessary byte swapping, and the components on boards should always
> be configured for the byte order they'd be configured if the processor
> were little-endian.

What about the case (which I think exists for the Atari's) where
interveening hardware does the byte swapping? Also, what about PCI
Powermacs? I'm not sure if the hardware there does swapping, but all of
the docs I've seen for the MacIO stuff (Mac IO ports off the PCI bus)
haven't spoken about enianisms, and Apple runs the CPU as big-endian.

That gives me the idea that either the peripherals are BE, or the bus drivers
are doing byte swapping. In which case it'd be wrong for the bus_space_*
routines to add byte swapping.

> Of course, this makes using the 16-bit or 32-bit methods for octet streams
> a bit difficult...

Since having the swapping DOES make sense for a lot (most maybe?) of cases,
maybe it should be some sort of option? Maybe set when the space is

Take care,