nios2 and openrisc in barebox

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Mar 1 11:05:35 GMT 2021


Hello,

On 25.02.21 16:33, Ahmad Fatoum wrote:

> On 25.02.21 14:02, Jules Maselbas wrote:
>> On Thu, Feb 25, 2021 at 09:45:00PM +0900, Stafford Horne wrote:
>>> Hello,
>>>
>>> I am the maintainer of most OpenRISC things right now.  I would be happy to
>>> help, but I don't really use barebox right now.  Most of my deployments I use
>>> with litex FPGA SoC's that has its own bootloader.
>>>
>>> That said, we have a setjmp/longjmp implementation in our glibc port which I
>>> have been testing for upstreaming lately.
>>>
>>>   https://github.com/stffrdhrn/or1k-glibc/blob/or1k-port-2/sysdeps/or1k/setjmp.S
>>>   https://github.com/stffrdhrn/or1k-glibc/blob/or1k-port-2/sysdeps/or1k/__longjmp.S
>>>
>>> I had a look at the barebox docs and openrisc port, it seems like there is
>>> support for our standard platform, or1ksim, which is the same as my de0-nano
>>> fpga board/soc and qemu.  I should be able to make use of this.
>>>
>>> Is there a branch where you are doing the green thread work?  I could add and
>>> test the OpenRISC implementation.
>> Hi,
>>
>> I've done this yesterday, I've push a branch[1] that has the green
>> thread paches applied (except patches on usb mass storage gadget).
>> https://github.com/jmaselbas/barebox/tree/test_setjmp 
> 
> Great. Thanks. I'm preparing an updated version that will clean it up
> a bit, but the heart part of architectures providing setjmp/longjmp/initjmp
> will stay the same.
> 
> Small request:
>   If you implement initjmp, could you have it save into jmp_buf a frame
>   pointer value of NULL if applicable? That way, should backtrace be
>   implemented (or done via JTAG), they have a defined end.

Dismiss this last request. C code will just zero-initialize jmp_buf,
so initjmp needs only fill out return address and stack pointer. I just
sent out a series, which can be used to develop this one.

@Jules, any chance you could take over the kvx port? :-)

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list