This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH, nios2] Nios2 Linux emulation (for 2.24)
- From: Chung-Lin Tang <cltang at codesourcery dot com>
- To: Sandra Loosemore <sandra at codesourcery dot com>
- Cc: "binutils at sourceware dot org Development" <binutils at sourceware dot org>
- Date: Tue, 19 Nov 2013 11:52:32 +0800
- Subject: Re: [PATCH, nios2] Nios2 Linux emulation (for 2.24)
- Authentication-results: sourceware.org; auth=none
- References: <5289E483 dot 3010102 at codesourcery dot com> <528A3FE2 dot 3070507 at codesourcery dot com>
On 13/11/19 12:27 AM, Sandra Loosemore wrote:
> On 11/18/2013 02:57 AM, Chung-Lin Tang wrote:
>> Hi Sandra,
>> As I told you earlier in the internal list, I'm shifting the start of
>> the .text location by one page on Nios2 Linux; I'm trying to not touch
>> the bare-metal nios2-elf config, so the logical thing to do is to
>> separate the emulations.
> This is OK, but for the public record, can you explain more about the
> motivation for doing this? From what I recall of our internal
> discussion, it is because the new Linux kernel ABI needs to map some
> additional system calls at a fixed address, but I'm not able to find the
> thread in my mailbox. :-(
We're implementing a fixed address kernel helper page for implementing
cmpxchg in Nios II Linux, similar to ARM. Due to nios2 ISA restrictions,
it would be faster (less instructions) if we can place the page near the
start of the address space (e.g. a small, less then 32K constant).
The nios2elf emulation maps text starting at 0x1000. We've decided on
using this 0x1000 4KB frame for the kernel page on nios2 Linux now,
hence the separation of nios2elf/nios2linux emulations, plus .text shift
to 0x2000 on nios2linux.