Re: Linux/IA-64 byte order

Craig Milo Rogers (rogers@ISI.EDU)
Tue, 09 Mar 1999 11:48:55 -0800


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

Uh, *who* would have to swap bytes? Why should it have to be
the kernel?

We've already discussed on this list that the real kernel API
need not be the same as the perceived user-level API. The libc (or
equivalent) library may need to map system calls, signal names,
etc. from one form to the other. Why couldn't it swab data, too?
glibc-BE and glibc-LE?

If the BE/LE mode flag is unprivileged (which we might not
know until the IA64 NDAs expire), then libc can manage the flag on
entry/exit from the kernel. If it's privileged, there might need to
be some small involvement by the kernel to manage the flag.

It may be ugly, but at least its ugliness is (mainly) confined
to user space.

Craig Milo Rogers

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