From: Tom Rini <trini@konsulko.com>
To: Raymond Mao <raymond.mao@linaro.org>
Cc: u-boot@lists.denx.de, michal.simek@amd.com,
venkatesh.abbarapu@amd.com, Simon Glass <sjg@chromium.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Levi Yun <yeoreum.yun@arm.com>,
Andrew Goodbody <andrew.goodbody@linaro.org>,
Harrison Mutai <harrison.mutai@arm.com>,
Patrick Rudolph <patrick.rudolph@9elements.com>,
Evgeny Bachinin <EABachinin@salutedevices.com>,
Matthias Brugger <mbrugger@suse.com>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH v2 6/6] fdtdec: apply DT overlays from bloblist
Date: Fri, 11 Jul 2025 09:45:30 -0600 [thread overview]
Message-ID: <20250711154530.GH6424@bill-the-cat> (raw)
In-Reply-To: <20250704134208.2895595-7-raymond.mao@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]
On Fri, Jul 04, 2025 at 06:42:05AM -0700, Raymond Mao wrote:
> During FDT setup, apply all existing DT overlays from the bloblist
> to the base FDT if bloblist is being used for handoff from previous
> boot stage.
> According to the spec update for DT overlay handoff[1], an overlay
> must have the same top-level compatible string as its target base
> DT has.
> Before applying the DTO, it checks whether sufficient space is
> reserved in the base FDT region. A margin (0x400) is used during
> estimating the space size required by the merged DT.
> A resizing happens if the reserved space is insufficient.
> After all overlays are applied, it resizes to the actual size of the
> merged DT.
> Note that the margin (0x400) is arbitrary from experience, it might
> not cover all possible scenarios as complex overlays with many
> properties might require extra spaces and lead to FDT_ERR_NOSPACE
> error.
>
> [1] Add Transfer Entry for Devicetree Overlay
> https://github.com/FirmwareHandoff/firmware_handoff/pull/74
[snip]
> + actual_size = fdt_totalsize(*blob);
> + /* Add margin for extra size growth after merging */
> + new_fdt_size = fdt_totalsize(live_fdt) + actual_size + 0x400;
This is still a fixed value and still not the right way to handle it. I
think now that we expose configuring the amount of extra space we have
for the tree it should possibly even just fail out with an error message
that points to SYS_FDT_PAD?
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2025-07-11 15:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-04 13:41 [PATCH v2 0/6] Add support for DT overlays handoff Raymond Mao
2025-07-04 13:42 ` [PATCH v2 1/6] bloblist: add blob type for DT overlay Raymond Mao
2025-07-04 13:42 ` [PATCH v2 2/6] bloblist: add helper functions Raymond Mao
2025-07-04 13:42 ` [PATCH v2 3/6] bloblist: fix a potential negative size for memmove Raymond Mao
2025-07-04 13:42 ` [PATCH v2 4/6] bloblist: expose 'expand_by' as an output argument Raymond Mao
2025-07-04 13:42 ` [PATCH v2 5/6] bloblist: add API for applying blobs with specified tag Raymond Mao
2025-07-04 13:42 ` [PATCH v2 6/6] fdtdec: apply DT overlays from bloblist Raymond Mao
2025-07-11 15:45 ` Tom Rini [this message]
2025-07-11 17:36 ` Raymond Mao
2025-07-11 15:45 ` [PATCH v2 0/6] Add support for DT overlays handoff Tom Rini
2025-07-11 17:41 ` Raymond Mao
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=20250711154530.GH6424@bill-the-cat \
--to=trini@konsulko.com \
--cc=EABachinin@salutedevices.com \
--cc=andrew.goodbody@linaro.org \
--cc=harrison.mutai@arm.com \
--cc=ilias.apalodimas@linaro.org \
--cc=marek.vasut+renesas@mailbox.org \
--cc=mbrugger@suse.com \
--cc=michal.simek@amd.com \
--cc=patrick.rudolph@9elements.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=raymond.mao@linaro.org \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
--cc=venkatesh.abbarapu@amd.com \
--cc=yeoreum.yun@arm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.