[PATCH] Add support for Altera's Nios-II softcore architecture

Ezequiel Garcia ezequiel at vanguardiasur.com.ar
Tue Apr 21 18:18:23 UTC 2015



On 04/20/2015 06:29 PM, Dmitry V. Levin wrote:
> On Sun, Apr 19, 2015 at 03:36:31PM -0300, Ezequiel Garcia wrote:
>> On 04/18/2015 06:56 PM, Dmitry V. Levin wrote:
>>> On Sat, Apr 18, 2015 at 05:46:19PM -0300, Ezequiel Garcia wrote:
>>>> On 04/18/2015 05:33 PM, Ezequiel Garcia wrote:
>>>>> This commit adds strace support for Altera's Nios-II. The architecture
>>>>> is supported by Linux since v3.19, and it implements the generic syscall ABI.
>>>>>
>>>>> * Makefile.am, configure.ac: add nios2 files and support
>>>>> * cacheflush.c: support nios2 cacheflush syscall
>>>>> * linux/nios2/: arch-specific port
>>>>>
>>>>> Signed-off-by: Ezequiel Garcia <ezequiel at vanguardiasur.com.ar>
>>>>> ---
>>>>>  Makefile.am                    |  8 ++++++++
>>>>>  cacheflush.c                   | 12 ++++++++++++
>>>>>  configure.ac                   |  5 +++++
>>>>>  linux/nios2/arch_regs.c        |  2 ++
>>>>>  linux/nios2/get_error.c        | 14 ++++++++++++++
>>>>>  linux/nios2/get_scno.c         |  1 +
>>>>>  linux/nios2/get_syscall_args.c |  6 ++++++
>>>>>  linux/nios2/ioctls_arch0.h     |  1 +
>>>>>  linux/nios2/ioctls_inc0.h      |  1 +
>>>>>  linux/nios2/print_pc.c         |  1 +
>>>>>  linux/nios2/syscallent.h       |  4 ++++
>>>>>  11 files changed, 55 insertions(+)
>>>>
>>>> BTW, forgot to version this correctly. Current patch
>>>> is v4. For those interested, here's a link to the previous
>>>> version:
>>>>
>>>>   http://marc.info/?l=strace&m=139170929111223&w=2
>>>>
>>>> This v4 patch had to be completely re-written, for two reasons.
>>>> First, the Nios-II Linux port landed in mainline and now uses the
>>>> generic syscall ABI. And also, strace arch-specific code was re-organized.
>>>>
>>>> The diffstat speaks for itself about the advantages of using the generic
>>>> syscall ABI and the impact of the strace cleanup (consider v3 had roughly
>>>> 500 insertions!).
>>>
>>> That's nice.
>>>
>>>> Finally, here's a tiny example of strace running Nios-II:
>>>>
>>>> # strace ls
>>>> execve("/bin/ls", ["ls"], [/* 16 vars */]) = 0
>>>
>>> Does it pass "make check" tests?
>>
>> Hm... I have a very limited test platform here.
>>
>> Can only boot limited size initramfs. I could try to fix my bootloader
>> to allow bigger initramfs, but this might take a lot of time.
>>
>> Am I required to run 'make check' to merge this?
> 
> No, this is not a strict requirement, but how do you know
> that the new port works well?
> 

Well, I did run a few tests before posting this. Not rigorously, though.

I can see about running some more tests... or I'll try to run make check
natively next week-end and will report the results.

-- 
Ezequiel Garcia, VanguardiaSur
www.vanguardiasur.com.ar

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20150421/277d4875/attachment.bin>


More information about the Strace-devel mailing list