Subject: Re: Endianess of linear PCI mappings
To: Martin Husemann <martin@duskware.de>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 10/27/2002 18:43:15
On Sun, Oct 27, 2002 at 06:20:42PM +0100, Martin Husemann wrote:
> Hmm, the overwhelming number of responses seem to indicate noone is realy
> sure - or in other words: there is no well defined endianess guarantee.

Thinking at it a bit more: I think it should be in the bus endianess
(like the bus_dma interface does). Otherwise it would cause different
problems, when host and bus endianess are differents:
- the host hardware has to support endian swapping "on the fly". Other
  bus_space* functions can do it in software as all accesses go though these
  funtions, but in case of mapping in virtual address space bus_space
  doesn't control access.
- endian swapping is dependant on the way you access the mapped
  area (in 16, 32 or 64 bit quantities). The current bus_space_map() interface
  doesn't allow to specify this, and we probably don't want to have such
  restrictions anyway.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
--