lkml.org 
[lkml]   [1999]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux/IA-64 byte order
Richard B. Johnson writes:
> On Tue, 9 Mar 1999, Richard Gooch wrote:
>
> > Hi, all. I've been discussing the byte order that Linux/IA-64 will
> > have with David Mosberger from HP. I'm arguing for big-endian to be
> > used.
[...]
> Little/big endian is determined by hardware.

Erm, yes, I did know that.

> It is not a software issue.

Yes it is, assuming the CPU can be switched from BE to LE mode. Which
it can. As Linus said, we could use BE and swap bytes for the x86
compatibility mode. But that's ugly.

> Suppose you have a magic switch that allows the CPU to fetch
> instructions and manipulate data in any byte order. The problem
> still lies with hardware. You need perhipherals for screen, disk,
> network, etc. These would then determine the byte-order.

Those issues are already dealt with, since the BE ports (Sparc, MIPS)
have to talk to PCI devices which are generally LE. Some devices
(framebuffers) map their memory twice: once for LE and again for
BE. But you can't rely on that.

Anyway, the point is that you can switch the CPU behaviour in
software, and you then have to deal with the implications of that. For
example, if you had the kernel LE but allowed user space to switch to
BE, you would have to swap bytes when transferring between kernel and
user spaces. Ugly in the extreme.

Regards,

Richard....

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.268 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site