From: David Daney <ddaney@caviumnetworks.com>
To: linux-mips <linux-mips@linux-mips.org>, GCC <gcc@gcc.gnu.org>,
binutils <binutils@sourceware.org>,
Prasun Kapoor <prasun.kapoor@caviumnetworks.com>
Subject: RFC: A new MIPS64 ABI
Date: Mon, 14 Feb 2011 12:29:24 -0800 [thread overview]
Message-ID: <4D5990A4.2050308@caviumnetworks.com> (raw)
Background:
Current MIPS 32-bit ABIs (both o32 and n32) are restricted to 2GB of
user virtual memory space. This is due the way MIPS32 memory space is
segmented. Only the range from 0..2^31-1 is available. Pointer
values are always sign extended.
Because there are not already enough MIPS ABIs, I present the ...
Proposal: A new ABI to support 4GB of address space with 32-bit
pointers.
The proposed new ABI would only be available on MIPS64 platforms. It
would be identical to the current MIPS n32 ABI *except* that pointers
would be zero-extended rather than sign-extended when resident in
registers. In the remainder of this document I will call it
'n32-big'. As a result, applications would have access to a full 4GB
of virtual address space. The operating environment would be
configured such that the entire lower 4GB of the virtual address space
was available to the program.
At a low level here is how it would work:
1) Load a pointer to a register from memory:
n32:
LW $reg, offset($reg)
n32-big:
LWU $reg, offset($reg)
2) Load an address constant into a register:
n32:
LUI $reg, high_part
ORI $reg, low_part
n32-big:
ORI $reg, high_part
DSLL $reg, $reg, 16
ORI $reg, low_part
Q: What would have to change to make this work?
o A new ELF header flag to denote the ABI.
o Linker support to use proper library search paths, and linker scrips
to set the INTERP program header, etc.
o GCC has to emit code for the new ABI.
o Could all existing n32 relocation types be used? I think so.
o Runtime libraries would have to be placed in a new location
(/lib32big, /usr/lib32big ...)
o The C library's ld.so would have to use a distinct LD_LIBRARY_PATH
for n32-big code.
o What would the Linux system call interface be? I would propose
using the existing Linux n32 system call interface. Most system
calls would just work. Some, that pass pointers in in-memory
structures, might require kernel modifications (sigaction() for
example).
next reply other threads:[~2011-02-14 20:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-14 20:29 David Daney [this message]
2011-02-15 17:56 ` RFC: A new MIPS64 ABI Alexandre Oliva
2011-02-15 18:08 ` David Daney
2011-05-06 8:29 ` Alexandre Oliva
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=4D5990A4.2050308@caviumnetworks.com \
--to=ddaney@caviumnetworks.com \
--cc=binutils@sourceware.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox