[PATCH 3/5] arm: initial support for Marvell Dove SoCs
Sascha Hauer
s.hauer at pengutronix.de
Wed May 15 02:39:20 EDT 2013
On Wed, May 15, 2013 at 08:20:03AM +0200, Sebastian Hesselbarth wrote:
> On 05/15/2013 07:55 AM, Sascha Hauer wrote:
> >>>Is it possible to remap the registers using the kwbimage tool? That way
> >>>every code that runs would see the desired register layout.
> >>
> >>Although possible, I prefer a different approach:
> >>- IIRC all MVEBU SoCs boot up at 0xd0000000
> >>- Have a regbase variable within barebox that initially points to that
> >>- Have a mvreadl/mvwritel that adds it to reg offsets
> >>- Rewrite _initial_ SoC code to use mvreadl/mvwritel
> >
> >I applied this series, but please get this topic done before more code
> >enters that has to be changed when doing the above.
>
> Sascha,
>
> it's not that easy as I thought. Armada 370 behaves very different
> from Dove here. While Dove allows to read from unmapped adresses,
> Armada 370 hangs immediately.
>
> I will work with Thomas on this asap and find a solution, but I am
> not sure if it will work without dirty tricks. Thomas has one in
> mind and I tend to agree with him on this one.
I hope the tricks won't get too dirty, otherwise it may be better to
drop the 2nd stage feature.
BTW. in earlier days we used to start 2nd stage loaders with the 'go'
command, but nowadays we have 'bootm' which could detect that it's a
barebox image we are about to start and could create whatever register
mapping a barebox image expects.
This wouldn't help when starting a barebox image for example from
U-Boot or JTAG, but would at least make it possible to chainload barebox
from barebox.
>
> Further, yesterday when I played with Armada 370 I wasn't able to
> have it boot with a variable pointer but the same code boots with
> a pointer that never gets modified. Haven't investigated more, but
> if we remap first thing after boot, that can remain constant at the
> remapped reg base.
Is the barebox binary copied to its link address by the ROM already or
does barebox need to copy itself to the link address? That would make
using global variables impossible befor copying to the correct address.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list