<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/lib/fdtdec.c, branch v2026.07</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/lib/fdtdec.c?h=v2026.07</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/lib/fdtdec.c?h=v2026.07'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2026-05-08T21:49:27Z</updated>
<entry>
<title>lib: fdtdec: validate bloblist FDT before consuming libfdt size</title>
<updated>2026-05-08T21:49:27Z</updated>
<author>
<name>Raymond Mao</name>
<email>raymond.mao@riscstar.com</email>
</author>
<published>2026-05-06T14:55:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0a31d3128ee6928d7eac5b830ef79d0a27e3f0a7'/>
<id>urn:sha1:0a31d3128ee6928d7eac5b830ef79d0a27e3f0a7</id>
<content type='text'>
Coverity Scan defects are observed in fdtdec_apply_bloblist_dtos(),
since the live FDT taken from the bloblist is passed to libfdt helpers
which consume header size/offset fields:
- fdt_open_into()
- fdt_pack()

Validate the bloblist FDT with fdt_check_full() before calling
fdt_open_into() and again after applying overlays before calling
fdt_pack(). This makes the libfdt consumers operate on a checked FDT
blob while keeping the existing flow unchanged.

Also normalize libfdt return codes from this path to errno values,
including the overlay callback path through bloblist_apply_blobs().

Fixes: b70cbbfbf94f ("fdtdec: apply DT overlays from bloblist")
Addresses-Coverity-ID: CID 645837: (TAINTED_SCALAR)
Signed-off-by: Raymond Mao &lt;raymond.mao@riscstar.com&gt;
Reviewed-by: Alexander Sverdlin &lt;alexander.sverdlin@siemens.com&gt;
</content>
</entry>
<entry>
<title>fdt: check fdt_pack() return value in fdtdec_apply_bloblist_dtos()</title>
<updated>2026-05-04T18:56:08Z</updated>
<author>
<name>Michal Simek</name>
<email>michal.simek@amd.com</email>
</author>
<published>2026-04-29T06:22:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7dd93524eacfec8512700056fcb54a4ba5c8fd8b'/>
<id>urn:sha1:7dd93524eacfec8512700056fcb54a4ba5c8fd8b</id>
<content type='text'>
The fdt_pack() function can return an error code, but its return value
was not being checked. Add proper error handling to propagate any
failure.

Also fix typo in comment: "Shink" -&gt; "Shrink".

Addresses-Coverity-ID: CID 645839: Error handling issues (CHECKED_RETURN)
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
Reviewed-by: Alexander Sverdlin &lt;alexander.sverdlin@siemens.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Raymond Mao &lt;raymondmaoca@gmail.com&gt;
</content>
</entry>
<entry>
<title>Merge patch series "Add support for DT overlays handoff"</title>
<updated>2026-04-27T15:44:40Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2026-04-27T15:44:40Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d7b23b2477ee6e966b0f9b8ae304b0bf9df58297'/>
<id>urn:sha1:d7b23b2477ee6e966b0f9b8ae304b0bf9df58297</id>
<content type='text'>
Raymond Mao &lt;raymond.mao@linaro.org&gt; says:

The series include refactoring on bloblist and fdtdec to support handoff
of multiple DT overlays and applying them into the DT base during setup.
All changes are aligned to the spec update for supporting DT overlay
handoff[1].

Notes for testing:

Currently DT overlay is not yet enabled in TF-A, but with the test
patches I provided for TF-A and OP-TEE build, importing a DT overlay
blob file from QEMU to TF-A reserved memory is supported.
Follow below instructions to build and run for test:
$ repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml
Replace your local qemu_v8.xml with [2], which contains all necessary
changes in both TF-A and OP-TEE build.
$ repo sync
$ cd build
$ make toolchains
$ make ARM_FIRMWARE_HANDOFF=y all
Copy and rename your DT overlay blob as 'qemu_v8.dtb' into out/bin
$ make ARM_FIRMWARE_HANDOFF=y run-only

[1] Add Transfer Entry for Devicetree Overlay
https://github.com/FirmwareHandoff/firmware_handoff/pull/74

[2] https://github.com/raymo200915/optee_manifest/blob/dt_overlay_handoff/qemu_v8.xml

Link: https://lore.kernel.org/r/20250718141621.3147633-1-raymond.mao@linaro.org
</content>
</entry>
<entry>
<title>fdtdec: apply DT overlays from bloblist</title>
<updated>2026-04-27T15:42:36Z</updated>
<author>
<name>Raymond Mao</name>
<email>raymond.mao@linaro.org</email>
</author>
<published>2025-07-18T14:16:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b70cbbfbf94fdb50367a0884a9c44770b4c3bddc'/>
<id>urn:sha1:b70cbbfbf94fdb50367a0884a9c44770b4c3bddc</id>
<content type='text'>
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 Firmware Handoff spec update to support DT overlay [1],
an overlay must have the same top-level compatible string as its target
base DT has.
Before applying the overlays, check whether sufficient space is
reserved in the base DT blob, if not, resize the blob to the allowed
padded size, which is limited by CONFIG_SYS_FDT_PAD and the bloblist
spare space size.
After all overlays are applied, resize the merged DT to its actual size.

[1] Add Transfer Entry for Devicetree Overlay
https://github.com/FirmwareHandoff/firmware_handoff/pull/74

Signed-off-by: Raymond Mao &lt;raymond.mao@linaro.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Tested-by: Michal Simek &lt;michal.simek@amd.com&gt;
</content>
</entry>
<entry>
<title>Merge patch series "Linux compat improvements and CCF prep"</title>
<updated>2026-04-21T17:21:59Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2026-04-21T17:21:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=052988aa29bfd506d7ce207fbb3f5374a5dbecbb'/>
<id>urn:sha1:052988aa29bfd506d7ce207fbb3f5374a5dbecbb</id>
<content type='text'>
Casey Connolly &lt;casey.connolly@linaro.org&gt; says:

This series implements various improvements to Linux header
compatibility, largely in preparation for a full port of Linux CCF but
many of these changes would also be helpful when porting other drivers.

Beside the basic header/compat stuff there are a few larger patches:

Patch 1 adds the "%pOF" format specifier to vsprintf, this behaves the
same as it does in Linux printing the name of the ofnode, but notably it
expects an ofnode pointer rather than a device_node.

Patch 2 adds an option to skip doing a full DM scan pre-relocation.
Some platforms like Qualcomm don't actually need devices to be probed
prior to relocation, it is also quite slow to scan the entire FDT before
caches are up. This option gets us to main loop 30-50% faster.

Unfortunately it isn't possible to totally skip DM since U-Boot will
panic if it can't find a serial port, but the serial uclass code will
bind the serial port itself by reading /chosen/stdout-path, however any
dependencies like clocks won't be found so this should only be enabled
if the serial driver gracefully handles missing clocks.

Patch 3 adds [k]strdup_const(), this works the same as the Linux version
saving a small amount of memory by avoiding duplicating strings stored
in .rodata, this is particularly useful for CCF.

Patch 4 adds 64-bit versions of some 32-bit ofnode utilities functions,
making it possible to parse 64-bit arrays.

Patch 6 provides a simple implementation of kref, this will be used
by CCF.

Patch 9 adds devm_krealloc() support to devres, it relies on storing
allocation sizes in the devres struct which will add a small overhead.

Link: https://lore.kernel.org/r/20260401-casey-ccf-compat-v2-0-414d5b7f040b@linaro.org
</content>
</entry>
<entry>
<title>ofnode: add read_u64_array and count_elems_of_size</title>
<updated>2026-04-21T17:19:49Z</updated>
<author>
<name>Casey Connolly</name>
<email>casey.connolly@linaro.org</email>
</author>
<published>2026-04-01T14:15:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=45c610d718bd605a1b3bdf99ec0386620b54b559'/>
<id>urn:sha1:45c610d718bd605a1b3bdf99ec0386620b54b559</id>
<content type='text'>
These are similar to their Linux counterparts, adding helpers
for reading arrays of 64-bit values with of_access and fdtdec
implementations.

Signed-off-by: Casey Connolly &lt;casey.connolly@linaro.org&gt;
</content>
</entry>
<entry>
<title>fdt: Prefer %pap over %llx</title>
<updated>2026-03-25T20:37:03Z</updated>
<author>
<name>Alexander Sverdlin</name>
<email>alexander.sverdlin@siemens.com</email>
</author>
<published>2026-03-10T13:18:40Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e67cf100eead1f918a3ff7a591e15fa0d9804189'/>
<id>urn:sha1:e67cf100eead1f918a3ff7a591e15fa0d9804189</id>
<content type='text'>
In cases where phys_addr_t/phys_size_t is being printed, it's possible to
use tiny-printf-friendly %pap instead of %llx. For instance, in SPL, with
tiny-printf:

Before the patch:
fdtdec_setup_memory_banksize: DRAM Bank #0: start = 0xx, size = 0xx

After the patch:
fdtdec_setup_memory_banksize: DRAM Bank #0: start = 80000000, size = 40000000

Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@siemens.com&gt;
</content>
</entry>
<entry>
<title>fdtdec: Add declaration for get_next_memory_node() helper</title>
<updated>2026-02-13T07:16:24Z</updated>
<author>
<name>Pranav Sanwal</name>
<email>pranav.sanwal@amd.com</email>
</author>
<published>2026-01-29T12:00:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7105f8f2958b23823388ac4963caffeed5fe607c'/>
<id>urn:sha1:7105f8f2958b23823388ac4963caffeed5fe607c</id>
<content type='text'>
Add get_next_memory_node() function declaration to fdtdec.h to support
iterating through multiple memory nodes in device tree. This function
is used to enumerate memory banks when the system has non-contiguous
or multiple memory regions defined with device_type = "memory".

The function implementation already exists in lib/fdtdec.c (lines
1298-1305) but was missing the public declaration in the header file.
This patch adds the declaration and includes dm/ofnode_decl.h for the
ofnode type definition.

This is needed for platforms that require early memory enumeration
before standard fdtdec_setup_memory_banksize() is called, particularly
for dynamic MMU page table size calculation based on actual DRAM
configuration.

Signed-off-by: Pranav Sanwal &lt;pranav.sanwal@amd.com&gt;
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
Link: https://lore.kernel.org/r/20260129120021.1328653-2-pranav.sanwal@amd.com
</content>
</entry>
<entry>
<title>bloblist: fix the overriding of fdt from bloblist</title>
<updated>2025-04-28T16:13:19Z</updated>
<author>
<name>Raymond Mao</name>
<email>raymond.mao@linaro.org</email>
</author>
<published>2025-03-31T22:40:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=57a36716cfc0fdac0658bd9317e28e28d4d29f68'/>
<id>urn:sha1:57a36716cfc0fdac0658bd9317e28e28d4d29f68</id>
<content type='text'>
When a bloblist is valid and contains fdt, it explicitly means
a previous boot stage is passing transfer list compliant with
Firmware Handoff specification, thus the fdt from bloblist should
not be overridden with the ones from board or env variables.

Fixes: 70fe23859437 ("fdt: Allow the devicetree to come from a bloblist")
Signed-off-by: Raymond Mao &lt;raymond.mao@linaro.org&gt;
Reviewed-by: Caleb Connolly &lt;caleb.connolly@linaro.org&gt;
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>Merge patch series "Keep the access to dtb_dt_embedded() within fdtdec"</title>
<updated>2024-12-31T16:57:54Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2024-12-31T16:57:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6c76f67ac5f0c796610b624fb839e3f9fc19f775'/>
<id>urn:sha1:6c76f67ac5f0c796610b624fb839e3f9fc19f775</id>
<content type='text'>
Evgeny Bachinin &lt;EABachinin@salutedevices.com&gt; says:

The 1st patch addresses comments from the post-review, available by
link [1].

  The 2nd patch fixes problems of dtb_dt_embedded() with checkpatch.

Links:
[1] https://lore.kernel.org/u-boot/CAFLszTgEKamsa6FTnjzrEWQBLkqAR7EBbZqffx09AKgQ7ppuVA@mail.gmail.com/#t

Link: https://lore.kernel.org/r/20241211-dtb_dt_embedded_within_fdtdec-v1-0-7840469f0084@salutedevices.com
</content>
</entry>
</feed>
