diff options
author | Simon Glass <sjg@chromium.org> | 2023-06-01 10:22:40 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-07-14 12:54:51 -0400 |
commit | 9cf39bbe96753d1099e3626d0c5be1d6e11c7f42 (patch) | |
tree | a535c2d3f8faac307fb348940f9308209cbd396b /include/dm | |
parent | 822f7a4543bff59819b6096f1aa1a26f5451bb35 (diff) | |
download | u-boot-9cf39bbe96753d1099e3626d0c5be1d6e11c7f42.tar.gz u-boot-9cf39bbe96753d1099e3626d0c5be1d6e11c7f42.tar.bz2 u-boot-9cf39bbe96753d1099e3626d0c5be1d6e11c7f42.zip |
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: 8b50d526ea5 ("dm: Add a function to create a 'live' device tree")
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm')
-rw-r--r-- | include/dm/of.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/dm/of.h b/include/dm/of.h index fce7cef0ff..b1c934f610 100644 --- a/include/dm/of.h +++ b/include/dm/of.h @@ -63,6 +63,8 @@ struct device_node { struct device_node *sibling; }; +#define BAD_OF_ROOT 0xdead11e3 + #define OF_MAX_PHANDLE_ARGS 16 /** |