Lines Matching full:fdt

3  * FDT related Helper functions used by the EFI stub on multiple
19 static void fdt_update_cell_size(void *fdt) in fdt_update_cell_size() argument
23 offset = fdt_path_offset(fdt, "/"); in fdt_update_cell_size()
26 fdt_setprop_u32(fdt, offset, "#address-cells", EFI_DT_ADDR_CELLS_DEFAULT); in fdt_update_cell_size()
27 fdt_setprop_u32(fdt, offset, "#size-cells", EFI_DT_SIZE_CELLS_DEFAULT); in fdt_update_cell_size()
31 void *fdt, int new_fdt_size, char *cmdline_ptr) in update_fdt() argument
38 /* Do some checks on provided FDT, if it exists: */ in update_fdt()
45 * We don't get the size of the FDT if we get if from a in update_fdt()
55 status = fdt_open_into(orig_fdt, fdt, new_fdt_size); in update_fdt()
57 status = fdt_create_empty_tree(fdt, new_fdt_size); in update_fdt()
63 fdt_update_cell_size(fdt); in update_fdt()
74 num_rsv = fdt_num_mem_rsv(fdt); in update_fdt()
76 fdt_del_mem_rsv(fdt, num_rsv); in update_fdt()
78 node = fdt_subnode_offset(fdt, 0, "chosen"); in update_fdt()
80 node = fdt_add_subnode(fdt, 0, "chosen"); in update_fdt()
89 status = fdt_setprop(fdt, node, "bootargs", cmdline_ptr, in update_fdt()
95 /* Add FDT entries for EFI runtime services in chosen node. */ in update_fdt()
96 node = fdt_subnode_offset(fdt, 0, "chosen"); in update_fdt()
99 status = fdt_setprop_var(fdt, node, "linux,uefi-system-table", fdt_val64); in update_fdt()
105 status = fdt_setprop_var(fdt, node, "linux,uefi-mmap-start", fdt_val64); in update_fdt()
111 status = fdt_setprop_var(fdt, node, "linux,uefi-mmap-size", fdt_val32); in update_fdt()
115 status = fdt_setprop_var(fdt, node, "linux,uefi-mmap-desc-size", fdt_val32); in update_fdt()
119 status = fdt_setprop_var(fdt, node, "linux,uefi-mmap-desc-ver", fdt_val32); in update_fdt()
129 status = fdt_setprop_var(fdt, node, "kaslr-seed", fdt_val64); in update_fdt()
135 /* Shrink the FDT back to its minimum size: */ in update_fdt()
136 fdt_pack(fdt); in update_fdt()
147 static efi_status_t update_fdt_memmap(void *fdt, struct efi_boot_memmap *map) in update_fdt_memmap() argument
149 int node = fdt_path_offset(fdt, "/chosen"); in update_fdt_memmap()
159 err = fdt_setprop_inplace_var(fdt, node, "linux,uefi-mmap-start", fdt_val64); in update_fdt_memmap()
165 err = fdt_setprop_inplace_var(fdt, node, "linux,uefi-mmap-size", fdt_val32); in update_fdt_memmap()
171 err = fdt_setprop_inplace_var(fdt, node, "linux,uefi-mmap-desc-size", fdt_val32); in update_fdt_memmap()
177 err = fdt_setprop_inplace_var(fdt, node, "linux,uefi-mmap-desc-ver", fdt_val32); in update_fdt_memmap()
213 * Allocate memory for a new FDT, then add EFI and commandline related fields
214 * to the FDT. This routine increases the FDT allocation size until the
220 * tied to the creation of the FDT with the final memory map in it.
353 efi_err("Failed to update FDT and exit boot services\n"); in efi_boot_kernel()
366 void *fdt; in get_fdt() local
368 fdt = get_efi_config_table(DEVICE_TREE_GUID); in get_fdt()
370 if (!fdt) in get_fdt()
373 if (fdt_check_header(fdt) != 0) { in get_fdt()
374 efi_err("Invalid header detected on UEFI supplied FDT, ignoring ...\n"); in get_fdt()
377 *fdt_size = fdt_totalsize(fdt); in get_fdt()
378 return fdt; in get_fdt()