Subject: Re: Bi-endian NetBSD/mips
To: Matt Thomas <matt@lkg.dec.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-mips
Date: 03/23/1997 12:52:00
On Sun, 23 Mar 1997 15:42:55 +0000,
Matt Thomas <matt@lkg.dec.com> writes:


>> I'm confused. Does "bi-endian" mean that /sys/arch mips supports
>> either big- or little-endian kernels, configured statically; or does
>> it mean support for running big-endian binaries on a machine with a
>> little-endian kernel(or vice-versa?)

>Since the former is pretty much there, I assumed it was the latter.

Oh.  I was looking at the referneces to the SONY NEWS port and thought
it was the former ;).

>ioctl is a pain but then if you treat this like an emulation, you 
>only allow the ioctl's you understand.  The real nasty one's are things
>like SIOGIFCONF.


Most of the emulation code I've seen translates a small number of
known-to-be-different ioctl calls, and hands the rest, unmodified, to
the native NetBSD ioctl handler.  (this is why some Ultrix binaries
didn't/don't work: they make Ultrix interface ioctls that cause
ifioctl() to make bad memory references!)

I guess this could be made to work for a bi-endian machine, but it's a
little more work than you might think at first.

And for the record, anyone wanting bi-endian LKMs is strictly on their own.


> >BTW, did you know that ULTRIX actually run big-endian at the start
> >of MIPS port?

>It was really ULTRIX and it was really on a MIPS machine (big ugly
>ones the size of small refrigerators and they were white).  I was one
>of those lucky folks who actually was in on the port in the early days.

Gosh, lucky you. Was the mipsCo locore already bi-endian at that point?