Subject: Re: Do we need new MACHINE_ARCH for Dreamcast?
To: bsh@grotto.iijnet.or.jp, SAITOH Masanobu <masanobu@iij.ad.jp>
From: Todd Vierling <tv@wasabisystems.com>
List: port-sh3
Date: 09/18/2000 09:53:30
On 18 Sep 2000 bsh@grotto.iijnet.or.jp wrote:
: + MACHINE_ARCH=sh3 is for big endian since evbsh3 and mmeye are big
: endian platform, while dreamcast is little endian. We need new
: MACHINE_ARCH, say sh3el.
: + Do we want sh3eb when we have sh3el?
If there is precedent on another platform, we should adopt those names.
: + Is it OK to set MACHINE_ARCH=sh3el and MACHINE=evbsh3 for dreamcast,
: and MACHINE_ARCH=sh3 MACHINE=evbsh3 for evbsh3? It looks bad.
: We need MACHINE=dreamcast.
This is fine. MACHINE describes the hardware architecture; MACHINE_ARCH
describes the object format (and CPU types used in the object format).
=====
On Mon, 18 Sep 2000, SAITOH Masanobu wrote:
: The reason of why I don't split it is:
:
: 1) the difference of "eb" and "el" in evbsh3 is
: include/endian_machdep.h only.
The difference is in object format. This is why mipseb and mipsel split.
This split is _required_ before 1.6, if both little and big endian sh
systems will be releasing 1.6 binaries.
: 2) I don't want to modify many Makefiles like:
:
: SUBDIR= ${MACHINE:C/evbsh3e[bl]/evbsh3/} (see below)
: .if ${MACHINE} != ${MACHINE_ARCH}
: ARCHSUBDIR= ${MACHINE_ARCH:C/mipse[bl]/mips/:C/sh3e[bl]/sh3/}
There is discussion about simplifying this with a "cpu" naming scheme. The
way this currently works for mips is a hack, too. 8-(
: And more, MACHINE (not MACHINE_ARCH) can split into evbsh3eb and evbsh3el,
: too. Most evaluation board can select the byte order by DIP switch.
Only one primary object format is in use at any time (opposite-endian
binaries need to run under emulation). The correct MACHINE and MACHINE_ARCH
definitions could be provided with "#ifdef" supplied by the config file.
Userland code should not rely on <sys/param.h> for the proper values;
uname() and sysctl() exist for that.
: #if 1
: #define _BYTE_ORDER _BIG_ENDIAN
: #else
: #define _BYTE_ORDER _LITTLE_ENDIAN
: #endif
This could use same #ifdef as MACHINE and MACHINE_ARCH.
=====
On Mon, 18 Sep 2000, David Brownlee wrote:
: Maybe this would be a good time to move to /sys/cpu/sh3 - I
: believe port-arm32 is discussing splitting arch/arm32 into
: individual kernel directories (which is somewhat related)
And, additionally, we need a MACHINE_CPU definition (long ago proposed by
jonathan when mipse[bl] split), inherited by make, which can make using
unified cpu source less painful.
I'm not sure that a separate "cpu" subdirectory is necessary; we've had
powerpc, m68k, and mips for some time. But a way to identify the CPU type
name (where MACHINE_ARCH specifies things like word-size and endianness)
would be useful.
--
-- Todd Vierling <tv@wasabisystems.com> * http://www.wasabisystems.com/
-- Speed, stability, security, and support. Wasabi NetBSD: Run with it.