From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
To: "Yazdani, Reyhaneh" <RYazdani@data-modul.com>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: AW: load BL31 on imx8mm and imx8mq
Date: Wed, 26 Jun 2019 12:25:43 +0200 [thread overview]
Message-ID: <a5b42175100fef802b9c1fab9f1df2338857bf4e.camel@pengutronix.de> (raw)
In-Reply-To: <A90A9CD973E33D419649C1614FE8006F62AEDE03@DEMUC-SMX001.data-modul.local>
> And what is the reason behind decreasing 16 from returning address:
>
> MX8MQ_ATF_BL33_BASE_ADDR - 16
>
> I removed "16" for im8mq in Barebox and still works.
This puts some distance between the stack and your execution address.
As long as nobody is writing to the stack pointer before increasing it
you are save and your return address is not overwritte. Your probably
save anyway since the instructions at the address
MX8MQ_ATF_BL33_BASE_ADDR are only executed once and don't manipulate
the stack.
The stack pointer inherently has nothing to do with the return address,
you just have to make sure that the stack pointer is pointing to a
valid address, othwise you may get aborts on stack usage.
> The PLAT_NS_IMAGE_OFFSET is identical for imx8mq and imx8mm. Do you
> have any idea why the firmware is not returned to this address?
> Do we need to enable any special timer or clock for this point?
> I used the same firmware as I have used in UBoot, thus the firmware
> itself should be correct.
It may be a good idea to build the TF-A yourself and enable the debug
output therein to make sure that TF-A is not missing a crucial setup
step. The TF-A can be found a
https://source.codeaurora.org/external/imx/imx-atf/
pick one of the release branches, enable the debug console in
plat/imx/imx8mm/include/platform_def.h and build a Debug build with
make plat=imx8mm DEBUG=1.
Regards,
Rouven
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-06-26 10:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-26 8:46 Yazdani, Reyhaneh
2019-06-26 9:28 ` Rouven Czerwinski
2019-06-26 9:51 ` AW: " Yazdani, Reyhaneh
2019-06-26 10:25 ` Rouven Czerwinski [this message]
2019-06-26 13:12 ` Yazdani, Reyhaneh
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=a5b42175100fef802b9c1fab9f1df2338857bf4e.camel@pengutronix.de \
--to=r.czerwinski@pengutronix.de \
--cc=RYazdani@data-modul.com \
--cc=barebox@lists.infradead.org \
/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