From 4dffc92abf8f6a6e9b503c9809caaa99795d7a00 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 19 Sep 2021 17:46:26 +0300 Subject: Added basic awareness of kernel size/bounds --- include/libfdt.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/libfdt.h') diff --git a/include/libfdt.h b/include/libfdt.h index d734715..7425aef 100644 --- a/include/libfdt.h +++ b/include/libfdt.h @@ -9,4 +9,7 @@ void __dbg_fdt(void *fdt, int node_offset, int depth); #define dbg_fdt(...) #endif +#define fdt_load_int_ptr(t, c, p)\ + ((c) == 2 ? (t)fdt64_to_cpu(*(fdt64_t *)(p)) : (t)fdt32_to_cpu(*(fdt32_t *)(p))) + #endif -- cgit v1.3