All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Stanislaw Skowronek <sskowron@ET.PUT.Poznan.PL>
Cc: linux-mips@linux-mips.org
Subject: Re: 32-bit ABI
Date: Sat, 24 Apr 2004 09:17:52 +0200	[thread overview]
Message-ID: <20040424071751.GA561@linux-mips.org> (raw)
In-Reply-To: <Pine.GSO.4.10.10404240825540.10762-100000@helios.et.put.poznan.pl>

On Sat, Apr 24, 2004 at 08:28:09AM +0200, Stanislaw Skowronek wrote:

> why do we attempt to compile the kernel with 32-bit GAS abi and 64-bit GCC
> abi? Is it because the module loader is broken and supports only 32-bit
> ELFs? Then what about machines which load their kernels at weird 64-bit
> addresses, like 0xa800000020004000 (Octane)?

The whole thing was born as a dirty hack back in '99 or so to avoid the
totally broken and imcomplete implementation of 64-bit MIPS ELF in binutils.
By using these options we run the kernel in CKSEG0 which means 32-bit ELF
will suffice.  A nice side effect if a reduction of kernel size - this in
the end made the code model which was born as a hack the way of choice.

So there is no relation at all to modules.  You btw. can load 64-bit ELF
modules into a kernel which was built using above trick as 32-bit ELF.
That's necessary because modules are currently allocated through vmalloc
which allocates space in XKSEG.

A code model which I'm considering as alternative is -G optimization but
that will require a good bit of work; we would have to free up $28 which
right now we're already using for the current pointer.  A bunch of
declaration would simply need to be fixed.  Module loaders would need
support for R_MIPS_GPREL16 and we'd need a solution for the problem of
the kernel being too large, therefore overflowing the small data section.
Th latter is probably going to require binutils hacking, so non-trivial.

> I have changed it to 64-bit abi in my Octane kernel, because it won't even
> compile otherwise. I've got gcc 3.3.2, gas 2.14.

Octane has no memory at all in CKSEG0?

>   Paranoid: one who is truly in touch with reality.

The fact that you're paranoid doesn't meant they're not out to get you.

  Ralf

  parent reply	other threads:[~2004-04-24  7:18 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-23  8:02 MC Parity Error Florian Lohoff
2004-04-23 13:11 ` Maciej W. Rozycki
2004-04-23 16:45   ` Ralf Baechle
2004-04-23 17:11     ` Maciej W. Rozycki
2004-04-23 20:43       ` Dominic Sweetman
2004-04-23 21:06         ` Maciej W. Rozycki
2004-04-24  6:28       ` 32-bit ABI Stanislaw Skowronek
2004-04-24  7:09         ` Thiemo Seufer
2004-04-24  7:17         ` Ralf Baechle [this message]
2004-04-24  7:31           ` Stanislaw Skowronek
2004-04-24  7:38             ` Ralf Baechle
2004-04-24  7:46               ` Stanislaw Skowronek
2004-04-24  7:51                 ` Maciej W. Rozycki
2004-04-24  7:55                   ` Ralf Baechle
2004-04-24  8:07                     ` Maciej W. Rozycki
2004-04-24  8:14                       ` Stanislaw Skowronek
2004-04-24  8:18                       ` Ralf Baechle
2004-04-24  8:23                         ` Maciej W. Rozycki
2004-04-24  8:26                           ` Ralf Baechle
2004-04-24  8:49                             ` Maciej W. Rozycki
2004-04-24  8:14                 ` Ralf Baechle
2004-04-24  8:17                   ` Stanislaw Skowronek
2004-04-24  8:26                     ` Thiemo Seufer
2004-04-24  7:37           ` Thiemo Seufer
2004-04-24  7:18         ` Maciej W. Rozycki
2004-04-24  7:34           ` Stanislaw Skowronek
2004-04-24  7:44             ` Ralf Baechle
2004-04-24  7:47               ` Stanislaw Skowronek
2004-04-24  7:48             ` Maciej W. Rozycki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040424071751.GA561@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=linux-mips@linux-mips.org \
    --cc=sskowron@ET.PUT.Poznan.PL \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.