[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: calling all ports: what is your endianness?

On Sat, Feb 02, 2002 at 08:30:25AM -0500, Steve M. Robbins wrote:
> > moreover, a PowerPC can be run big or little endian. this *should* be a
> > dynamic test, which is so trivial to write...
> On an architecture like this that can be run in either mode, is the
> mode set at boot and never changed?  If so, is it fixed for all Debian
> systems?  Or can a process switch the mode for itself?  Or can it be
> switched globally while the system is running?

That's an amusing idea.  Can you imagine what would happen to an OS
that switched endianness once it was running?  How would the software
respond?  IIRC, there is a control bit in the CPU that determines
which endianness the processor honors.  As there is no mention of
setting this bit in the kernel source, it must be true that the boot
PROM performs this initialization.

Even if I misssed the reference to that bit in the startup code, using
configure (or a similar test) is the most portable and most reliable
method for determining endianness.

> Idly yours,
> -Steve
> -- 
> by Rocket to the Moon,
> by Airplane to the Rocket,
> by Taxi to the Airport,
> by Frontdoor to the Taxi,
> by throwing back the blanket and laying down the legs ...
> - They Might Be Giants
> -- 
> To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: