Subject: 64-bit on Cobalt?

From: John Tobey <[email-masked]>
Date: Sun, 8 Apr 2001 18:42:41 -0400

Hi folks,

I keep having this fantasy that I will one day make my old Cobalt RaQ
run a Debian system including 64-bit apps.  I've got a copy of _See
MIPS Run_ (wonderful book) and a working system based on Cobalt's
hacked-up kernel 2.0.34 and Red Hat 5.x.  I am comfortable using
cross-gcc and messing with glibc.

It seems that I have all the information required to do it all myself,
but perhaps I might save a few years of work (or rid myself of this
delusion) by consulting with you all first.

The CPU is a QED RM5231 (CONFIG_NEVADA) 150MHz.  May I assume that
nobody has run a 64-bit kernel on this thing?  The RaQ has no video
card but a serial console, PCI, IDE, Ethernet, and special LEDs, panel
buttons, and LCD display.  If I can get a 64-bit kernel to boot and
prove its existence through any of these devices, I will be drunk with
power.

The reason I want 64 bits is that I (a) want a challenge, (b) plan to
write an application that uses a sparse address space (40 bits is
better than 31), (c) plan to outlive the 31-bit time_t, and (d) am
p.o.ed at having bought the thing based on misleading advertising that
mentioned a 64-bit processor but not the 32-bit OS.

Big/little endian macht nichts.  I guess big will be easier, and I'm
not concerned with running any existing 32-bit binaries.

I imagine that I would start by grafting Cobalt's peripheral support
code from arch/mips/cobalt (now defunct) and include/asm-mips/cobalt.h
into the mips64 tree from [email-masked]:/cvs/linux.

I will appreciate your advice.

-John

-- 
John Tobey, late nite hacker <[email-masked]>
\\\                                                               ///
]]]             With enough bugs, all eyes are shallow.           [[[
///                                                               \\\

---

From: Ralf Baechle <[email-masked]>
Date: Mon, 9 Apr 2001 03:54:53 +0200

> prove its existence through any of these devices, I will be drunk with

So far the only supported machine by the mips64 kernel is the SGI Origin
200 / 2000 series.

> not concerned with running any existing 32-bit binaries.

Go for little endian because the firmware is little endian; supporting
``other-endian'' for userspace would be unecessary extra pain.  We already
have suport for 32-bit binaries in the 64-bit kernel; in fact ALL
software we run on 64-bit kernels is 32-bit.

32-bit wasn't only the easy thing to do - it's also the more efficient
thing for most software which doesn't need 64-bit registers or 64-bit
address space.  For a system with a dog slow 32-bit memory bus such as
the Qube 64-bit kernels would mean a dramatic slowdown.

I admit it's interesting though, mostly for engineering reasons, not
as a platform.

> into the mips64 tree from [email-masked]:/cvs/linux.

Somebody else was already working on upgrading the Cobalt kernel to 2.4.

  Ralf

---

From: Carsten Langgaard <[email-masked]>
Date: Mon, 09 Apr 2001 11:37:59 +0200

> So far the only supported machine by the mips64 kernel is the SGI Origin

I have a QED RM5261 running a bigendian 64-bit kernel on our Malta board (it
got a serial console, PCI, IDE, Ethernet).
I haven't send the patch to Ralf yet, but you can get a snapshot at our
kernel sources at
ftp://ftp.mips.com/pub/linux/mips/kernel/2.4/src/linux-2.4.1.mips-src-01.00.tar.gz

Hope it helps you.

--
_    _ ____  ___   Carsten Langgaard   Mailto:[email-masked]
|\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
| \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
  TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556
                   Denmark             http://www.mips.com

---

From: John Tobey <[email-masked]>
Date: Mon, 9 Apr 2001 12:57:04 -0400

> ftp://ftp.mips.com/pub/linux/mips/kernel/2.4/src/linux-2.4.1.mips-src-01.00.tar.gz

Wow, thanks!  It sure looks like it will.

---

From: John Tobey <[email-masked]>
Date: Tue, 10 Apr 2001 14:02:21 -0400

> Somebody else was already working on upgrading the Cobalt kernel to 2.4.

Hey, thanks for the advice!  If anyone's interested, here's a mailing
list for porting recent kernels to Cobalt/MIPS:
http://devel.alal.com/mailman/listinfo/cobalt-22

Best.
-John

---

From: Lukas Hejtmanek <[email-masked]>
Date: Fri, 13 Apr 2001 00:06:12 +0200

> So far the only supported machine by the mips64 kernel is the SGI Origin

So it is possible to run 64-bit application on Origin 200?

What's the state of user-land 64-bit applications for that?
(gcc, binutils, glibc)

We have Origin 200 at university and my diploma thesis could be to run true
64-bit linux on it. Anyone interested?

-- 
Lukáš Hejtmánek

---

From: Ralf Baechle <[email-masked]>
Date: Fri, 13 Apr 2001 01:25:10 +0200

> So it is possible to run 64-bit application on Origin 200?

In theory yes - if you have any ...

> What's the state of user-land 64-bit applications for that?

gcc - should work.  Binutils - major brain surgery required.  glibc -
64-bit support practically non-existant.

  Ralf

---

From: Lukas Hejtmanek <[email-masked]>
Date: Fri, 13 Apr 2001 00:50:25 +0200

> In theory yes - if you have any ...

I ment something like this:
file mipstest.o
mipstest.o: ELF 64-bit MSB mips-3 relocatable, MIPS R3000_BE, version 1, not
stripped

> 64-bit support practically non-existant.

So as and/or ld generates bad code?

Does anyone already work on it?

And if binutils are broken that means kernel is 32-bit as well?

Anyway 32-bit applications should run pretty fine?

-- 
Lukáš Hejtmánek

---

From: Ralf Baechle <[email-masked]>
Date: Fri, 13 Apr 2001 02:48:36 +0200

> So as and/or ld generates bad code?

Both know fairly little about 64-bit ELF atm.

> Does anyone already work on it?

Thiemo Seufer <[email-masked]> is working on it; it's
quite an effort to get it right so if you want to work on this you should
probably team up with him.

> And if binutils are broken that means kernel is 32-bit as well?

Yes but that's more a feature than a bug.  All intra-kernel references are
now only 32-bit therefore we've got more compact, faster code as result.

The boot file is a 64-bit ELF kernel, though.  That's because the ARC
firmware of the Origin will accept nothing else so we cheat by converting
the 32-bit vmlinux into a 64-bit file using objcopy.

> Anyway 32-bit applications should run pretty fine?

Most of them.  Now and then we find bugs in the binary compatibility code
but these are usually easy to squash.

   Ralf