[PATCH] Add support for Altera's Nios-II softcore architecture
Ezequiel García
ezequiel at vanguardiasur.com.ar
Mon Jan 27 22:58:11 UTC 2014
Hey Mike,
Thanks for the feedback.
On 27 January 2014 17:54, Mike Frysinger <vapier at gentoo.org> wrote:
> On Sunday, January 26, 2014 21:59:07 Ezequiel Garcia wrote:
>> --- a/syscall.c
>> +++ b/syscall.c
>>
>> +#elif defined(NIOS2)
>> + (void)i;
>> + (void)nargs;
>> + tcp->u_arg[0] = nios2_regs.uregs[4];
>> + tcp->u_arg[1] = nios2_regs.uregs[5];
>> + tcp->u_arg[2] = nios2_regs.uregs[6];
>> + tcp->u_arg[3] = nios2_regs.uregs[7];
>> + tcp->u_arg[4] = nios2_regs.uregs[8];
>> + tcp->u_arg[5] = nios2_regs.uregs[9];
>
> for (i = 0; i < nargs; ++i)
> tcp->u_arg[i] = nios2_regs.uregs[i + 4];
>
Right. Was my first attempt, but somehow I ended up with the unrolled
loop version.
>> --- a/system.c
>> +++ b/system.c
>>
>> +int sys_getpagesize(struct tcb *tcp)
>> +{
>> + return 0;
>> +}
>
> that can't possibly be correct ?
Hm... why? The syscall receives no args and returns the page size through the
get_error() path which retrieves the syscall result.
After talking to Arnd Bergmann, we might rework the whole syscall thing
for this arch to implement the generic syscall ABI.
Therefore, I'm not really sure what to do with this patch, as it works
fine with current nios2 available kernel and toolchain.
Is it possible to take this and then change the implementation once
the generic syscall ABI is implemented? Also, notice I'm doing this on
my own time so such rework might actually never happen.
--
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar
More information about the Strace-devel
mailing list