summaryrefslogtreecommitdiff
path: root/sys/include/fdt.h
diff options
context:
space:
mode:
authorstefan <stefan@s00.xyz>2023-04-08 20:42:18 -0400
committerstefan <stefan@s00.xyz>2023-04-08 20:42:18 -0400
commit1aac36f788834699b6891aea7a83eb950bd5e8f6 (patch)
tree18e0a6c26b83e71c101193e60149f49b1641daf0 /sys/include/fdt.h
parenta1a97aa7b2b0c3d1f3b6766446d605f83de1c561 (diff)
downloadsv-1aac36f788834699b6891aea7a83eb950bd5e8f6.tar.gz
no idea whot i changed lol
Diffstat (limited to 'sys/include/fdt.h')
-rw-r--r--sys/include/fdt.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/include/fdt.h b/sys/include/fdt.h
index 92e5695..ca1cea0 100644
--- a/sys/include/fdt.h
+++ b/sys/include/fdt.h
@@ -1,5 +1,6 @@
#include <stdint.h>
#include <endian.h>
+#include <printf.h>
#ifndef _FDT_H
#define _FDT_H
@@ -34,4 +35,21 @@ struct fdt_reserve_entry {
uint64_t size;
};
+struct fdt_node_header {
+ uint32_t tag;
+ char name[];
+};
+
+void walk_fdt(struct fdt_header *header);
+
+#define FDT_MAGIC 0xd00dfeed /* 4: version, 4: total size */
+#define FDT_TAGSIZE sizeof(fdt32_t)
+
+#define FDT_BEGIN_NODE 0x1 /* Start node: full name */
+#define FDT_END_NODE 0x2 /* End node */
+#define FDT_PROP 0x3 /* Property: name off,
+ size, content */
+#define FDT_NOP 0x4 /* nop */
+#define FDT_END 0x9
+
#endif /* _FDT_H */