From: Carsten Langgaard <carstenl@mips.com>
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: Re: 64-bit and N32 kernel interfaces
Date: Thu, 05 Sep 2002 08:40:43 +0200 [thread overview]
Message-ID: <3D76FC6B.C9AA72F3@mips.com> (raw)
In-Reply-To: Pine.GSO.3.96.1020904170056.10619H-100000@delta.ds2.pg.gda.pl
"Maciej W. Rozycki" wrote:
> On Wed, 4 Sep 2002, Ralf Baechle wrote:
>
> > > It would be nice if we could keep a single set of syscalls for both (n)64
> > > and n32. The address crop for n32 may be handled the Alpha way. I will
> > > investigate the topic soon.
> >
> > Can you describe how this is handled on the Alpha?
>
> I'm referring mostly to OSF/1 here as it was first to implement it.
> Linux followed it in the sense it is able to execute OSF/1 binaries marked
> as "32-bit", but native ELF binaries used to be fully 64-bit always. I
> think by a popular demand GNU binutils are now able to create "cropped"
> Alpha/Linux ELF binaries as well, but this is unverified for sure. The
> implementation is two-fold.
>
> First, the static linker (if given the "-taso" option) maps an executable
> into the low 31-bit address space (coincidentally, this will probably be
> suitable for MIPS as well) and sets a special flag in the executable (it
> does it in a weird place, but this is ECOFF and we have suitable flags in
> the ELF header already).
>
> Second, seeing the "31-bit" flag set, the kernel returns any maps
> requested within the low 31-bit address space. This way both shared
> libraries (which thus need not be special, i.e. may be regular 64-bit
> ones) and areas allocated by mmap() are addressable by the executable.
>
> To summarize, nothing much complicated.
>
> > The primary problem is the differnet calling sequence for o32 and N64.
>
> But we handle that already.
>
> > As it looks we'll be able to use either the o32 function or the native
> > syscall to implement all of the necessary N32 syscalls.
>
> The (n)64 versions seem suitable and the o32 ones do not as n32 only
> crops addresses to 32-bit -- data may still be 64-bit (e.g. file position
> pointers).
>
Please notice, that a 'long' is 32-bit for n32, so we need to do the same
conversion for a lot of syscalls, as we already do for o32.
>
> > The question is if we want to reserve another 1000 entries in our already
> > huge syscall table for N32 or if we got a better solution ...
>
> Aaarrgh, no more entries, please...
>
> --
> + Maciej W. Rozycki, Technical University of Gdansk, Poland +
> +--------------------------------------------------------------+
> + e-mail: macro@ds2.pg.gda.pl, PGP key available +
--
_ _ ____ ___ Carsten Langgaard Mailto:carstenl@mips.com
|\ /|||___)(___ MIPS Denmark Direct: +45 4486 5527
| \/ ||| ____) Lautrupvang 4B Switch: +45 4486 5555
TECHNOLOGIES 2750 Ballerup Fax...: +45 4486 5556
Denmark http://www.mips.com
next prev parent reply other threads:[~2002-09-05 6:41 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-04 13:56 64-bit and N32 kernel interfaces Ralf Baechle
2002-09-04 14:14 ` Maciej W. Rozycki
2002-09-04 14:31 ` Ralf Baechle
2002-09-04 15:19 ` Maciej W. Rozycki
2002-09-04 18:46 ` Ralf Baechle
2002-09-05 9:53 ` Maciej W. Rozycki
2002-09-05 6:40 ` Carsten Langgaard [this message]
2002-09-05 9:23 ` Maciej W. Rozycki
2002-09-05 13:41 ` Daniel Jacobowitz
2002-09-04 17:32 ` Jun Sun
2002-09-04 17:56 ` Maciej W. Rozycki
2002-09-04 18:40 ` Ralf Baechle
2002-09-05 10:15 ` Kjeld Borch Egevang
2002-09-05 10:15 ` Kjeld Borch Egevang
2002-09-09 20:20 ` Jay Carlson
2002-09-16 13:01 ` Ralf Baechle
2002-09-16 15:40 ` Ralf Baechle
-- strict thread matches above, loose matches on Subject: below --
2002-09-05 9:30 Tor Arntsen
2002-09-05 11:47 ` Maciej W. Rozycki
2002-09-05 12:48 ` Kevin D. Kissell
2002-09-05 12:48 ` Kevin D. Kissell
2002-09-05 14:09 ` Maciej W. Rozycki
2002-09-05 14:20 ` Hartvig Ekner
2002-09-05 14:20 ` Hartvig Ekner
2002-09-05 14:54 ` Maciej W. Rozycki
2002-09-05 14:59 ` Daniel Jacobowitz
2002-09-05 15:10 ` Maciej W. Rozycki
2002-09-05 15:14 ` Daniel Jacobowitz
2002-09-05 16:16 ` Maciej W. Rozycki
2002-09-05 16:19 ` Daniel Jacobowitz
2002-09-05 16:33 ` Maciej W. Rozycki
2002-09-05 16:39 ` Daniel Jacobowitz
2002-09-05 17:16 ` Maciej W. Rozycki
2002-09-05 17:29 ` Kevin D. Kissell
2002-09-05 17:29 ` Kevin D. Kissell
2002-09-05 19:34 ` Maciej W. Rozycki
2002-09-06 9:42 ` Ralf Baechle
2002-09-05 18:07 ` Hartvig Ekner
2002-09-05 18:07 ` Hartvig Ekner
2002-09-05 18:54 ` Maciej W. Rozycki
2002-09-05 19:16 ` Thiemo Seufer
2002-09-06 9:30 ` Ralf Baechle
2002-09-05 14:22 ` Daniel Jacobowitz
2002-09-05 15:08 ` Maciej W. Rozycki
2002-09-05 15:14 ` Daniel Jacobowitz
2002-09-05 16:28 ` Maciej W. Rozycki
2002-09-05 16:30 ` Thiemo Seufer
2002-09-05 16:54 ` Maciej W. Rozycki
2002-09-05 17:44 ` Thiemo Seufer
2002-09-05 19:50 ` Maciej W. Rozycki
2002-09-05 22:12 ` Thiemo Seufer
2002-09-09 17:39 ` Maciej W. Rozycki
2002-09-06 10:14 ` Ralf Baechle
2002-09-09 14:01 ` Dominic Sweetman
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=3D76FC6B.C9AA72F3@mips.com \
--to=carstenl@mips.com \
--cc=linux-mips@linux-mips.org \
--cc=macro@ds2.pg.gda.pl \
--cc=ralf@linux-mips.org \
/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.