Lines Matching full:fdt
73 void *fdt; member
74 struct mutex lock; /* protects KHO FDT */
496 /* Returns physical address of the preserved memory map from FDT */
497 static phys_addr_t __init kho_get_mem_map_phys(const void *fdt) in kho_get_mem_map_phys() argument
502 mem_ptr = fdt_getprop(fdt, 0, KHO_FDT_MEMORY_MAP_PROP_NAME, &len); in kho_get_mem_map_phys()
734 * Creates a new child node named @name in KHO root FDT and records
747 void *root_fdt = kho_out.fdt; in kho_add_subtree()
793 void *root_fdt = kho_out.fdt; in kho_remove_subtree()
1296 * operation with KHO enabled, by verifying that a valid KHO FDT
1324 const void *fdt = kho_get_fdt(); in kho_retrieve_subtree() local
1328 if (!fdt) in kho_retrieve_subtree()
1334 offset = fdt_subnode_offset(fdt, 0, name); in kho_retrieve_subtree()
1338 val = fdt_getprop(fdt, offset, KHO_SUB_TREE_PROP_NAME, &len); in kho_retrieve_subtree()
1344 val = fdt_getprop(fdt, offset, KHO_SUB_TREE_SIZE_PROP_NAME, &len); in kho_retrieve_subtree()
1358 static int __init kho_mem_retrieve(const void *fdt) in kho_mem_retrieve() argument
1364 /* Retrieve the KHO radix tree from passed-in FDT. */ in kho_mem_retrieve()
1365 mem = fdt_getprop(fdt, 0, KHO_FDT_MEMORY_MAP_PROP_NAME, &len); in kho_mem_retrieve()
1383 void *root = kho_out.fdt; in kho_out_fdt_setup()
1478 static int __init kho_kexec_metadata_init(const void *fdt) in kho_kexec_metadata_init() argument
1482 if (fdt) in kho_kexec_metadata_init()
1497 const void *fdt = kho_get_fdt(); in kho_init() local
1509 kho_out.fdt = kho_alloc_preserve(PAGE_SIZE); in kho_init()
1510 if (IS_ERR(kho_out.fdt)) { in kho_init()
1511 err = PTR_ERR(kho_out.fdt); in kho_init()
1527 err = kho_kexec_metadata_init(fdt); in kho_init()
1531 if (fdt) { in kho_init()
1532 kho_in_debugfs_init(&kho_in.dbg, fdt); in kho_init()
1555 WARN_ON_ONCE(kho_debugfs_blob_add(&kho_out.dbg, "fdt", in kho_init()
1556 kho_out.fdt, in kho_init()
1557 fdt_totalsize(kho_out.fdt), true)); in kho_init()
1562 kho_unpreserve_free(kho_out.fdt); in kho_init()
1567 kho_out.fdt = NULL; in kho_init()
1622 void *fdt = NULL; in kho_populate() local
1626 /* Validate the input FDT */ in kho_populate()
1627 fdt = early_memremap(fdt_phys, fdt_len); in kho_populate()
1628 if (!fdt) { in kho_populate()
1629 pr_warn("setup: failed to memremap FDT (0x%llx)\n", fdt_phys); in kho_populate()
1632 err = fdt_check_header(fdt); in kho_populate()
1634 pr_warn("setup: handover FDT (0x%llx) is invalid: %d\n", in kho_populate()
1638 err = fdt_node_check_compatible(fdt, 0, KHO_FDT_COMPATIBLE); in kho_populate()
1640 pr_warn("setup: handover FDT (0x%llx) is incompatible with '%s': %d\n", in kho_populate()
1645 mem_map_phys = kho_get_mem_map_phys(fdt); in kho_populate()
1696 early_memunmap(fdt, fdt_len); in kho_populate()
1713 image->kho.fdt = virt_to_phys(kho_out.fdt); in kho_fill_kimage()