From: Marco Felsch <m.felsch@pengutronix.de>
To: Michael Tretter <m.tretter@pengutronix.de>
Cc: BAREBOX <barebox@lists.infradead.org>
Subject: Re: [PATCH v2 8/9] ARM: rockchip: pass device tree to TF-A
Date: Wed, 28 May 2025 17:39:22 +0200 [thread overview]
Message-ID: <20250528153922.tqyceeu7ctwk5hw6@pengutronix.de> (raw)
In-Reply-To: <20250528-rk3588-optee-v2-8-63070238dd13@pengutronix.de>
On 25-05-28, Michael Tretter wrote:
> The upstream OP-TEE expects a device tree to be able to initialize the
> dynamic shared memory. Therefore, barebox should pass a device tree that
> contains memory nodes through the TF-A to OP-TEE.
>
> OP-TEE may modify the passed fdt. Thus, barebox copies the fdt from the
> fixed size rodata area to the rk_scratch area and allocates a
> configurable memory area for the fdt to allow fdt modification.
>
> OP-TEE has the CFG_DTB_MAX_SIZE config option for the maximum size of
> the fdt. barebox must reserve at least that much memory for the fdt to
> avoid out of bounds accesses from OP-TEE.
>
> Unfortunately, the downstream TF-A fails to start if barebox passes its
> device tree and it is not possible to detect if the loaded TF-A is able
> to handle the device tree. Add a config option to pass the device tree
> if it is possible.
>
> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
next prev parent reply other threads:[~2025-05-28 16:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 14:11 [PATCH v2 0/9] ARM: rockchip: fix dynamic shared memory in OP-TEE Michael Tretter
2025-05-28 14:11 ` [PATCH v2 1/9] ARM: rockchip: fix formatting Michael Tretter
2025-05-28 14:11 ` [PATCH v2 2/9] ARM: rockchip: dmc: use RK3588_INT_REG_START for rk3588 Michael Tretter
2025-05-28 14:11 ` [PATCH v2 3/9] lib: fdt: add fdt_addresses Michael Tretter
2025-05-28 14:11 ` [PATCH v2 4/9] PBL: fdt: refactor helper for reading nr of cells Michael Tretter
2025-05-28 14:11 ` [PATCH v2 5/9] PBL: fdt: add fdt_fixup_mem to fixup memory nodes Michael Tretter
2025-05-28 14:11 ` [PATCH v2 6/9] ARM: add CONFIG_SCRATCH_SIZE Michael Tretter
2025-05-28 15:34 ` Marco Felsch
2025-05-28 14:11 ` [PATCH v2 7/9] ARM: rockchip: dmc: add rk3588_ram_sizes to get full ram size Michael Tretter
2025-05-28 14:11 ` [PATCH v2 8/9] ARM: rockchip: pass device tree to TF-A Michael Tretter
2025-05-28 15:39 ` Marco Felsch [this message]
2025-05-28 14:11 ` [PATCH v2 9/9] ARM: rockchip: fixup memory in device tree for TF-A Michael Tretter
2025-05-28 15:40 ` Marco Felsch
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=20250528153922.tqyceeu7ctwk5hw6@pengutronix.de \
--to=m.felsch@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=m.tretter@pengutronix.de \
/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