From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Leigh Brown <leigh@solinno.co.uk>
Cc: Barebox <barebox@lists.infradead.org>
Subject: Re: Help requested with Barebox on Globalscale Mirabox
Date: Fri, 10 Aug 2018 09:59:32 +0200 [thread overview]
Message-ID: <20180810075932.6qzuz6bd5tetjpuf@pengutronix.de> (raw)
In-Reply-To: <998b78c5d1dec5b03b7c9dadc42f32ae@solinno.co.uk>
Hello Leigh,
On Thu, Aug 09, 2018 at 04:14:48PM +0100, Leigh Brown wrote:
> On 2018-08-06 19:36, Uwe Kleine-König wrote:
> > Hello Leigh,
> >
> > On Tue, Jul 31, 2018 at 02:21:04PM +0100, Leigh Brown wrote:
> > > Have I missed any steps? Any help would be greatly appreciated.
> >
> > Looks good.
> >
> > Which revision are you on (i.e. git rev-parse @ in your barebox copy)?
> > What is currently running on the device?
>
> I was running against the same revision as you tried (445a7f). I'm now
> running against the latest revision (3307e8) with the same issue.
>
> > Do you get an U when applying this patch?:
> [snip patch]
>
> I did. Thanks very much for that hint, it helped me debug the issue. I am
> booting from the UART as follows:
>
> scripts/kwboot -t -b images/barebox-globalscale-mirabox.img -B 115200 /dev/ttyUSB0
>
> I believe the issue is that in arch/arm/mach-mvebu/common.c the function
> armada_370_xp_barebox_entry() calls mvebu_remap_registers() before the
> stack is set up (it looks like the SP points somewhere in the SRAM
> range). As mvebu_remap_registers() as compiled by my version of gcc
> uses the stack, it fails to return.
>
> Making mvebu_remap_registers() inline fixes the issue, as per the following
> patch:
>
> diff --git a/arch/arm/mach-mvebu/common.c b/arch/arm/mach-mvebu/common.c
> index 83aeb41ae..588cef515 100644
> --- a/arch/arm/mach-mvebu/common.c
> +++ b/arch/arm/mach-mvebu/common.c
> @@ -183,11 +183,15 @@ mem_initcall(mvebu_meminit);
> * There no way to determine internal registers base address
> * safely later on, as the remap register itself is within the
> * internal registers.
> + *
> + * As this function may be called before we have a working stack,
> + * make it inline to avoid the possibility of using the stack.
> + *
> */
> #define MVEBU_BRIDGE_REG_BASE 0x20000
> #define DEVICE_INTERNAL_BASE_ADDR (MVEBU_BRIDGE_REG_BASE + 0x80)
>
> -static void mvebu_remap_registers(void)
> +static inline void mvebu_remap_registers(void)
> {
> void __iomem *base = mvebu_get_initial_int_reg_base();
I think this makes sense.
Which toolchain are you using? Can you provide (also for the problem
below) your images/start_globalscale_mirabox.pbl compiled from an
unchanged tree (for example 3307e8)?
> > I just tried 7ba0f2d29959256025ece9ae961a6c3421445a7f on my ReadyNAS 104
> > which has an armada370, too.
> >
> > I hangs when using second-stage booting from the Vendor U-Boot after:
> >
> > barebox 2018.07.0-00139-g7ba0f2d29959-dirty #50 Mon Aug 6 20:27:11 CEST 2018
> >
> >
> > Board: Marvell Armada 370/XP
> > SoC: Marvell 6710 rev 1
> > mdio_bus: miibus0: probed
> > eth1: got preset MAC address: 28:c6:8e:36:df:57
>
> Once I got past that issue I also had an issue in barebox_multi_pbl_start. I
> think the following patch is the right solution, but I'm not 100% sure. It
> certainly makes it work for me.
I'm 100% sure, this is wrong :-) You said you're using mvebu_defconfig
and just disabled some machines, right? So you have
CONFIG_PBL_RELOCATABLE=y and then hit the else branch in the check if
the image is in RAM?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2018-08-10 7:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-31 13:21 Leigh Brown
2018-08-06 18:36 ` Uwe Kleine-König
2018-08-09 15:14 ` Leigh Brown
2018-08-10 7:59 ` Uwe Kleine-König [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180810075932.6qzuz6bd5tetjpuf@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=leigh@solinno.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox