]> git.baikalelectronics.ru Git - uboot.git/commit
fdt: Align the start of the livetree
authorSimon Glass <sjg@chromium.org>
Thu, 1 Jun 2023 16:22:40 +0000 (10:22 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 14 Jul 2023 16:54:51 +0000 (12:54 -0400)
commitc155185e273bff5b8f04f30522c6387d52ffef13
treea535c2d3f8faac307fb348940f9308209cbd396b
parent312f5d6787acf3d607066e76bdaf323c6722d744
fdt: Align the start of the livetree

Ensure that the block of memory used by live tree is aligned according to
the default for structures. This ensures that the root node appears at
the start of the block, so it can be used with free(), rather than being
4 bytes later in some cases.

This corrects a rather obscure bug in unflatten_device_tree().

Fixes: a7c7821080a ("dm: Add a function to create a 'live' device tree")
Signed-off-by: Simon Glass <sjg@chromium.org>
include/dm/of.h
lib/of_live.c
test/dm/ofnode.c