Re: Linux/IA-64 byte order

Jeremy Fitzhardinge (jeremy@goop.org)
Wed, 10 Mar 1999 12:42:08 -0800 (PST)


On 10-Mar-99 Zygo Blaxell wrote:
> The one caveat is that you can't do a memcpy() from BE to LE and
> vice-versa. If you do, then you have BE data on an LE page and the magic
> translation doesn't work properly any more.

It's worse than that. A simple byte-at-a-time memcpy will work OK in some
predictable way, but optimised memcpy implementation will use a mixture of
byte, word and even cache line memory reads/writes depending on the CPU and
memory architecture. This will completely confuse the hardware byte-swizzler
and you end up with a complete mess.

The solution, I suppose, is to have memory instructions with always use a fixed
endianness, regardless of what the page endianness properties are, but "clean"
and "elegant" are long gone.

J

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/