summaryrefslogtreecommitdiffstats
path: root/cpukit/include/libfdt.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-11-04 08:06:05 -0500
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-12-14 16:00:44 +0100
commit064a1d76a4f87d8c667488009fa9e9d5f5f0be2a (patch)
tree6ff34b93e3be4e2f699f064719454ab7e8a1a623 /cpukit/include/libfdt.h
parentlibfdt: Fix kernel-doc comments (diff)
downloadrtems-064a1d76a4f87d8c667488009fa9e9d5f5f0be2a.tar.bz2
libfdt: Check for 8-byte address alignment in fdt_ro_probe_()
The device tree must be loaded in to memory at an 8-byte aligned address. Add a check for this condition in fdt_ro_probe_() and a new error code to return if we are not. Signed-off-by: Tom Rini <trini@konsulko.com> Message-Id: <20201104130605.28874-1-trini@konsulko.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'cpukit/include/libfdt.h')
-rw-r--r--cpukit/include/libfdt.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpukit/include/libfdt.h b/cpukit/include/libfdt.h
index 5979832305..89adee3cd7 100644
--- a/cpukit/include/libfdt.h
+++ b/cpukit/include/libfdt.h
@@ -101,7 +101,11 @@ extern "C" {
/* FDT_ERR_BADFLAGS: The function was passed a flags field that
* contains invalid flags or an invalid combination of flags. */
-#define FDT_ERR_MAX 18
+#define FDT_ERR_ALIGNMENT 19
+ /* FDT_ERR_ALIGNMENT: The device tree base address is not 8-byte
+ * aligned. */
+
+#define FDT_ERR_MAX 19
/* constants */
#define FDT_MAX_PHANDLE 0xfffffffe