summaryrefslogtreecommitdiff
path: root/util/cbfstool/fdt.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/cbfstool/fdt.h')
-rw-r--r--util/cbfstool/fdt.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/util/cbfstool/fdt.h b/util/cbfstool/fdt.h
new file mode 100644
index 0000000000..387cd328ed
--- /dev/null
+++ b/util/cbfstool/fdt.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2013 Google Inc.
+ * Copyright 2018-present Facebook, Inc.
+ *
+ * Taken from depthcharge: src/base/device_tree.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but without any warranty; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+struct fdt_header {
+ uint32_t magic;
+ uint32_t totalsize;
+ uint32_t structure_offset;
+ uint32_t strings_offset;
+ uint32_t reserve_map_offset;
+
+ uint32_t version;
+ uint32_t last_compatible_version;
+
+ uint32_t boot_cpuid_phys;
+
+ uint32_t strings_size;
+ uint32_t structure_size;
+};
+
+#define FDT_HEADER_MAGIC 0xd00dfeed