summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorstefan <stefan@s00.xyz>2023-04-21 19:53:04 -0400
committerstefan <stefan@s00.xyz>2023-04-21 19:53:04 -0400
commiteff82c45c589b42061344039d5f2efc8ad7c52df (patch)
tree4c5d89eea3fa74caba5d3dbfb8567643f3747e6d /sys/dev
parent821706a3fea34c18a6171cf5169d5d6d852966de (diff)
downloadsv-eff82c45c589b42061344039d5f2efc8ad7c52df.tar.gz
libfdt port and the required libc functions
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/fdt/fdt.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/sys/dev/fdt/fdt.c b/sys/dev/fdt/fdt.c
deleted file mode 100644
index 9a8f1af..0000000
--- a/sys/dev/fdt/fdt.c
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <fdt.h>
-#include <sbi.h>
-#include <printf.h>
-#include <stdint.h>
-
-void
-fdt_walk(struct fdt_header *header)
-{
- if (fdt_uint32(header->magic) != FDT_HEADER_MAGIC) {
- printf("corrupted or invalid fdt");
- }
- printf("parsing fdt @%p...\n", header);
- printf("header->totalsize: %d\n", fdt_uint32(header->totalsize));
- printf("header->off_dt_struct: %d\n", fdt_uint32(header->off_dt_struct));
- printf("header->off_dt_strings: %d\n", fdt_uint32(header->off_dt_strings));
- printf("header->off_mem_rsvmap: %d\n", fdt_uint32(header->off_mem_rsvmap));
- printf("header->version: %d\n", fdt_uint32(header->version));
- printf("header->last_comp_version: %d\n", fdt_uint32(header->last_comp_version));
- printf("header->boot_cpuid_phys: %d\n", fdt_uint32(header->boot_cpuid_phys));
- printf("header->size_dt_strings: %d\n", fdt_uint32(header->size_dt_strings));
- printf("header->size_dt_struct: %d\n", fdt_uint32(header->size_dt_struct));
-
- printf("walking the memory reservation block...\n");
- struct fdt_reserve_entry *p = header + fdt_uint32(header->off_mem_rsvmap);
-// do {
-// printf("reserved entry at %p with size %i\n", p->address, p->size);
-// p++;
-// } while (!(p->size == 0 && p->address == 0));
-}