1 // SPDX-License-Identifier: GPL-2.0-only
2 #include <linux/types.h>
3 #include <linux/init.h>
4 #include <linux/libfdt.h>
7 * Declare the functions that are exported (but prefixed) here so that LLVM
8 * does not complain it lacks the 'static' keyword (which, if added, makes
9 * LLVM complain because the function is actually unused in this file).
11 u64 get_kaslr_seed(uintptr_t dtb_pa);
13 u64 get_kaslr_seed(uintptr_t dtb_pa)
19 node = fdt_path_offset((void *)dtb_pa, "/chosen");
23 prop = fdt_getprop_w((void *)dtb_pa, node, "kaslr-seed", &len);
24 if (!prop || len != sizeof(u64))
27 ret = fdt64_to_cpu(*prop);