diff options
author | stefan <stefan@s00.xyz> | 2023-04-29 17:37:05 -0400 |
---|---|---|
committer | stefan <stefan@s00.xyz> | 2023-04-29 17:37:05 -0400 |
commit | 2a20e3596a446df55cfe4b34b45b4cd8eae594db (patch) | |
tree | d64632a8d804a9af9b1cbda49bb9f8d763d93719 /sys/dev/dev_init.c | |
parent | a3c174ee4c08d1d5e7a89ce187f52e3c0807a7eb (diff) | |
download | sv-2a20e3596a446df55cfe4b34b45b4cd8eae594db.tar.gz |
some work on paging
Diffstat (limited to 'sys/dev/dev_init.c')
-rw-r--r-- | sys/dev/dev_init.c | 14 |
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 { |