aboutsummaryrefslogtreecommitdiff
path: root/libfdt/libfdt_internal.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-03-02 12:02:54 -0700
committerDavid Gibson <david@gibson.dropbear.id.au>2020-03-03 09:59:55 +1100
commite5cc26b68bc094c9260caaf330e03bb71129082e (patch)
treeffe71b74a8e55e218f2599b20a3e22a3da477967 /libfdt/libfdt_internal.h
parent28fd7590aad2ab4c0aae6b6674b15f103c492d64 (diff)
downloaddtc-e5cc26b68bc094c9260caaf330e03bb71129082e.zip
dtc-e5cc26b68bc094c9260caaf330e03bb71129082e.tar.gz
dtc-e5cc26b68bc094c9260caaf330e03bb71129082e.tar.bz2
libfdt: Add support for disabling internal checks
If libfdt returns -FDT_ERR_INTERNAL that generally indicates a bug in the library. Add a new assumption for these cases since it should be save to disable these checks regardless of the input. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20200302190255.51426-3-sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'libfdt/libfdt_internal.h')
-rw-r--r--libfdt/libfdt_internal.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libfdt/libfdt_internal.h b/libfdt/libfdt_internal.h
index 7999f6a..d4e0bd4 100644
--- a/libfdt/libfdt_internal.h
+++ b/libfdt/libfdt_internal.h
@@ -145,6 +145,15 @@ enum {
* device tree is correctly ordered. See fdt_blocks_misordered_().
*/
ASSUME_LIBFDT_ORDER = 1 << 4,
+
+ /*
+ * This assumes that libfdt itself does not have any internal bugs. It
+ * drops certain checks that should never be needed unless libfdt has an
+ * undiscovered bug.
+ *
+ * This can generally be considered safe to enable.
+ */
+ ASSUME_LIBFDT_FLAWLESS = 1 << 5,
};
/**