From: Marco Felsch <m.felsch@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] ARM: i.MX8M: limit PBL size to 0x3f000
Date: Fri, 20 Oct 2023 15:03:35 +0200 [thread overview]
Message-ID: <20231020130335.dm7qipxvsbf7375w@pengutronix.de> (raw)
In-Reply-To: <20231020121710.658511-1-a.fatoum@pengutronix.de>
On 23-10-20, Ahmad Fatoum wrote:
> On i.MX8M(Q/M/N/P), barebox PBL is loaded 0x1000 bytes into ITCM
Nit: only the i.MX8MQ-EVK was converted. Don't know if the rest is
broken since they don't use the pblb (PBL only).
> at address 0x7e00_1000. ITCM is 128K followed by 128K of DTCM.
>
> Therefore, in total, barebox PBL may not exceed 0x3f000. Now that we
> have a common macro for defining boards, let's add a
> MAX_PBL_MEMORY_SIZE_$(entrypoint) into it, so check that we don't
> exceed this size at runtime.
>
> Boards that trip over this, should consider using get_builtin_firmware_ext
> to offload binaries into barebox proper.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> images/Makefile.imx | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/images/Makefile.imx b/images/Makefile.imx
> index 50f0a64b3091..ca09853c4b6e 100644
> --- a/images/Makefile.imx
> +++ b/images/Makefile.imx
> @@ -26,6 +26,7 @@ $(eval
> ifeq ($($(strip $(1))), y)
> pblb-y += $(strip $(2))
> CFG_$(strip $(2)).pblb.imximg = $(board)/$(strip $(3)).imxcfg
> + MAX_PBL_MEMORY_SIZE_$(strip $(2)) = 0x3f000
> FILE_barebox-$(strip $(4)).img = $(strip $(2)).pblb.pimximg
> FILE_barebox-$(strip $(4))-s.img = $(strip $(2)).pblb.psimximg
> image-y += barebox-$(strip $(4)).img
> --
> 2.39.2
>
>
>
next prev parent reply other threads:[~2023-10-20 13:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 12:17 Ahmad Fatoum
2023-10-20 13:03 ` Marco Felsch [this message]
2023-10-20 13:08 ` Ahmad Fatoum
2023-10-20 13:19 ` Marco Felsch
2023-10-23 9:47 ` Sascha Hauer
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=20231020130335.dm7qipxvsbf7375w@pengutronix.de \
--to=m.felsch@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--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