From cd41ed1758f4842d7b78870385e16b579cc89c38 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 25 Jan 2026 17:14:53 +0200 Subject: implement dmem semi-properly + Add tests and fix virtual mapping, this is enough to start writing proper userspace drivers --- lib/fdt.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/fdt.c') diff --git a/lib/fdt.c b/lib/fdt.c index cc39527..259e8dd 100644 --- a/lib/fdt.c +++ b/lib/fdt.c @@ -8,3 +8,9 @@ #include "libfdt_env.h" #include "../dtc/libfdt/fdt.c" + +struct cell_info get_cellinfo(const void *fdt, const int offset) +{ + return (struct cell_info){ fdt_size_cells(fdt, offset), + fdt_address_cells(fdt, offset) }; +} -- cgit v1.3