All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@redhat.com>
To: David Daney <ddaney@caviumnetworks.com>
Cc: linux-mips <linux-mips@linux-mips.org>, GCC <gcc@gcc.gnu.org>,
	binutils <binutils@sourceware.org>,
	Prasun Kapoor <prasun.kapoor@caviumnetworks.com>
Subject: Re: RFC: A new MIPS64 ABI
Date: Fri, 06 May 2011 05:29:16 -0300	[thread overview]
Message-ID: <or7ha4cjvn.fsf@livre.localdomain> (raw)
In-Reply-To: <4D5AC12D.3080108@caviumnetworks.com> (David Daney's message of "Tue, 15 Feb 2011 10:08:45 -0800")

On Feb 15, 2011, David Daney <ddaney@caviumnetworks.com> wrote:

> On 02/15/2011 09:56 AM, Alexandre Oliva wrote:
>> On Feb 14, 2011, David Daney<ddaney@caviumnetworks.com>  wrote:

>> So, sorry if this is a dumb question, but wouldn't it be much easier to
>> keep on using sign-extended addresses, and just make sure the kernel
>> never allocates a virtual memory range that crosses a sign-bit change,

> No, it is not possible.  The MIPS (and MIPS64) hardware architecture
> does not allow userspace access to addresses with the high bit (two
> bits for mips64) set.

Interesting.  I guess this makes it far easier to transition to the u32
ABI: n32 addresses all have the 32-bit MSB bit clear, so n32 binaries
can be used within u32 environments, as long as the environment refrains
from using addresses that have the MSB bit set.

So we could switch lib32 to u32, have a machine-specific bit set for u32
binaries, and if the kernel starts an executable or interpreter that has
that bit clear, it will refrain from allocating any n32-invalid address
for that process.  Furthermore, libc, upon loading a library, should be
able to notify the kernel when an n32 library is to be loaded, to which
the kernel would respond either with failure (if that process already
uses u32-valid but n32-invalid addresses) or success (switching to n32
mode if not in it already).

Am I missing any other issues?

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer

  reply	other threads:[~2011-05-06  8:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14 20:29 RFC: A new MIPS64 ABI David Daney
2011-02-15 17:56 ` Alexandre Oliva
2011-02-15 18:08   ` David Daney
2011-05-06  8:29     ` Alexandre Oliva [this message]
2011-05-06 17:00       ` David Daney
2011-02-18  1:02 ` David Daney
     [not found] <4D5990A4.2050308__41923.1521235362$1297715435$gmane$org@caviumnetworks.com>
2011-02-21 19:45 ` Richard Sandiford
2011-05-09 14:28   ` Ralf Baechle
2011-05-09 17:47     ` David Daney

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=or7ha4cjvn.fsf@livre.localdomain \
    --to=aoliva@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=ddaney@caviumnetworks.com \
    --cc=gcc@gcc.gnu.org \
    --cc=linux-mips@linux-mips.org \
    --cc=prasun.kapoor@caviumnetworks.com \
    /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.