summaryrefslogtreecommitdiff
path: root/sys/dev/dev_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/dev_init.c')
-rw-r--r--sys/dev/dev_init.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/dev/dev_init.c b/sys/dev/dev_init.c
index 9933c2a..bacf427 100644
--- a/sys/dev/dev_init.c
+++ b/sys/dev/dev_init.c
@@ -26,6 +26,19 @@ mem_init(struct fdt_header *fdt, struct devicetree *dt)
printf("[mem_init] found %d memory reserve map entries\n", n);
}
+static void
+cpu_init(struct fdt_header *fdt, struct devicetree *dt)
+{
+
+ int cpus = fdt_path_offset(fdt, "/cpus");
+ if (cpus < 0)
+ printf("[dev_init] failed to find cpus node\n");
+
+ int node = 0;
+ fdt_for_each_subnode(node, fdt, cpus) {
+
+ }
+}
struct devicetree
dev_init(struct fdt_header *fdt)
@@ -39,6 +52,7 @@ dev_init(struct fdt_header *fdt)
printf("[dev_init] detecting memory...\n");
mem_init(fdt, &dt);
+ cpu_init(fdt, &dt);
// int offset = fdt_next_node(fdt, offset, 0);
// do {