* [PATCH] scripts: imx-image: fix first instruction in i.MX8MQ header
@ 2018-11-06 14:36 Lucas Stach
2018-11-06 20:54 ` Andrey Smirnov
0 siblings, 1 reply; 3+ messages in thread
From: Lucas Stach @ 2018-11-06 14:36 UTC (permalink / raw)
To: barebox
The instruction being patched in was a branch to 0x24000, instead of
the intended 0x9000. This doesn't matter when starting the image from
a regular boot source, but breaks starting the image via bootm, as we
rely on the jump in the first header instruction taking us to the
actual code.
Fixes: 6d2132a9ded7 (scripts: imx-image: Add i.MX8MQ support)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
scripts/imx/imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/imx/imx.c b/scripts/imx/imx.c
index 2341732b2fdd..b6fbc5aea5a3 100644
--- a/scripts/imx/imx.c
+++ b/scripts/imx/imx.c
@@ -243,7 +243,7 @@ static struct soc_type socs[] = {
{ .name = "imx53", .header_version = 2, .cpu_type = IMX_CPU_IMX53, .header_gap = 0, .first_opcode = 0xea0003fe /* b 0x1000 */},
{ .name = "imx6", .header_version = 2, .cpu_type = IMX_CPU_IMX6, .header_gap = 0, .first_opcode = 0xea0003fe /* b 0x1000 */},
{ .name = "imx7", .header_version = 2, .cpu_type = IMX_CPU_IMX7, .header_gap = 0, .first_opcode = 0xea0003fe /* b 0x1000 */},
- { .name = "imx8mq", .header_version = 2, .cpu_type = IMX_CPU_IMX8MQ, .header_gap = SZ_32K, .first_opcode = 0x14009000 /* b 0x9000 */},
+ { .name = "imx8mq", .header_version = 2, .cpu_type = IMX_CPU_IMX8MQ, .header_gap = SZ_32K, .first_opcode = 0x14002400 /* b 0x9000 */},
{ .name = "vf610", .header_version = 2, .cpu_type = IMX_CPU_VF610, .header_gap = 0, .first_opcode = 0xea0003fe /* b 0x1000 */},
};
--
2.19.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scripts: imx-image: fix first instruction in i.MX8MQ header
2018-11-06 14:36 [PATCH] scripts: imx-image: fix first instruction in i.MX8MQ header Lucas Stach
@ 2018-11-06 20:54 ` Andrey Smirnov
2018-11-07 9:21 ` Lucas Stach
0 siblings, 1 reply; 3+ messages in thread
From: Andrey Smirnov @ 2018-11-06 20:54 UTC (permalink / raw)
To: Lucas Stach; +Cc: Barebox List
On Tue, Nov 6, 2018 at 6:36 AM Lucas Stach <l.stach@pengutronix.de> wrote:
>
> The instruction being patched in was a branch to 0x24000, instead of
> the intended 0x9000. This doesn't matter when starting the image from
> a regular boot source, but breaks starting the image via bootm, as we
> rely on the jump in the first header instruction taking us to the
> actual code.
>
For some reason I thought I submitted a patch fixing this, but
apparently not. Did you have a chance to run this fix with and without
signed HDMI firmware blob? AFAIR, adding it shifts entry point from
0x9000 to 0x28000 (don't quote me on this), so it's possible that some
code around imx-image.c:894 might have to be added to handle this
problem. This can be a subject for another patch, though.
Thanks,
Andrey Smirnov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scripts: imx-image: fix first instruction in i.MX8MQ header
2018-11-06 20:54 ` Andrey Smirnov
@ 2018-11-07 9:21 ` Lucas Stach
0 siblings, 0 replies; 3+ messages in thread
From: Lucas Stach @ 2018-11-07 9:21 UTC (permalink / raw)
To: Andrey Smirnov; +Cc: Barebox List
Am Dienstag, den 06.11.2018, 12:54 -0800 schrieb Andrey Smirnov:
> > On Tue, Nov 6, 2018 at 6:36 AM Lucas Stach <l.stach@pengutronix.de> wrote:
> >
> > The instruction being patched in was a branch to 0x24000, instead of
> > the intended 0x9000. This doesn't matter when starting the image from
> > a regular boot source, but breaks starting the image via bootm, as we
> > rely on the jump in the first header instruction taking us to the
> > actual code.
> >
>
> For some reason I thought I submitted a patch fixing this, but
> apparently not. Did you have a chance to run this fix with and without
> signed HDMI firmware blob? AFAIR, adding it shifts entry point from
> 0x9000 to 0x28000 (don't quote me on this), so it's possible that some
> code around imx-image.c:894 might have to be added to handle this
> problem. This can be a subject for another patch, though.
Thanks for the valuable hint. I didn't yet try running with the signed
firmware. I'll keep this mind for when I do.
Regards,
Lucas
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-07 9:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-06 14:36 [PATCH] scripts: imx-image: fix first instruction in i.MX8MQ header Lucas Stach
2018-11-06 20:54 ` Andrey Smirnov
2018-11-07 9:21 ` Lucas Stach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox