Lines Matching +full:no +full:- +full:map

1 // SPDX-License-Identifier: GPL-2.0
24 /* Set the #address-cells and #size-cells values for an empty tree */ 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()
62 * non-critical: in update_fdt()
72 * Delete all memory reserve map entries. When booting via UEFI, in update_fdt()
73 * kernel will use the UEFI memory map to find reserved regions. in update_fdt()
76 while (num_rsv-- > 0) in update_fdt()
101 status = fdt_setprop_var(fdt, node, "linux,initrd-start", initrd_image_start); in update_fdt()
106 status = fdt_setprop_var(fdt, node, "linux,initrd-end", initrd_image_end); in update_fdt()
115 status = fdt_setprop_var(fdt, node, "linux,uefi-system-table", fdt_val64); in update_fdt()
121 status = fdt_setprop_var(fdt, node, "linux,uefi-mmap-start", fdt_val64); in update_fdt()
127 status = fdt_setprop_var(fdt, node, "linux,uefi-mmap-size", fdt_val32); in update_fdt()
131 status = fdt_setprop_var(fdt, node, "linux,uefi-mmap-desc-size", fdt_val32); in update_fdt()
135 status = fdt_setprop_var(fdt, node, "linux,uefi-mmap-desc-ver", fdt_val32); in update_fdt()
145 status = fdt_setprop_var(fdt, node, "kaslr-seed", fdt_val64); in update_fdt()
157 if (status == -FDT_ERR_NOSPACE) in update_fdt()
163 static efi_status_t update_fdt_memmap(void *fdt, struct efi_boot_memmap *map) in update_fdt_memmap() argument
173 fdt_val64 = cpu_to_fdt64((unsigned long)*map->map); in update_fdt_memmap()
175 err = fdt_setprop_inplace_var(fdt, node, "linux,uefi-mmap-start", fdt_val64); in update_fdt_memmap()
179 fdt_val32 = cpu_to_fdt32(*map->map_size); in update_fdt_memmap()
181 err = fdt_setprop_inplace_var(fdt, node, "linux,uefi-mmap-size", fdt_val32); in update_fdt_memmap()
185 fdt_val32 = cpu_to_fdt32(*map->desc_size); in update_fdt_memmap()
187 err = fdt_setprop_inplace_var(fdt, node, "linux,uefi-mmap-desc-size", fdt_val32); in update_fdt_memmap()
191 fdt_val32 = cpu_to_fdt32(*map->desc_ver); in update_fdt_memmap()
193 err = fdt_setprop_inplace_var(fdt, node, "linux,uefi-mmap-desc-ver", fdt_val32); in update_fdt_memmap()
206 static efi_status_t exit_boot_func(struct efi_boot_memmap *map, in exit_boot_func() argument
211 * Update the memory map with virtual addresses. The function will also in exit_boot_func()
215 efi_get_virtmap(*map->map, *map->map_size, *map->desc_size, in exit_boot_func()
216 p->runtime_map, p->runtime_entry_count); in exit_boot_func()
218 return update_fdt_memmap(p->new_fdt_addr, map); in exit_boot_func()
233 * There must be no allocations between the get_memory_map()
236 * with the final memory map in it.
252 struct efi_boot_memmap map; in allocate_new_fdt_and_exit_boot() local
255 map.map = &runtime_map; in allocate_new_fdt_and_exit_boot()
256 map.map_size = &map_size; in allocate_new_fdt_and_exit_boot()
257 map.desc_size = &desc_size; in allocate_new_fdt_and_exit_boot()
258 map.desc_ver = &desc_ver; in allocate_new_fdt_and_exit_boot()
259 map.key_ptr = &mmap_key; in allocate_new_fdt_and_exit_boot()
260 map.buff_size = &buff_size; in allocate_new_fdt_and_exit_boot()
263 * Get a copy of the current memory map that we will use to prepare in allocate_new_fdt_and_exit_boot()
268 status = efi_get_memory_map(&map); in allocate_new_fdt_and_exit_boot()
270 efi_err("Unable to retrieve UEFI memory map.\n"); in allocate_new_fdt_and_exit_boot()
276 map.map = &memory_map; in allocate_new_fdt_and_exit_boot()
285 * we can get the memory map key needed for exit_boot_services(). in allocate_new_fdt_and_exit_boot()
287 status = efi_get_memory_map(&map); in allocate_new_fdt_and_exit_boot()
305 status = efi_exit_boot_services(handle, &map, &priv, exit_boot_func); in allocate_new_fdt_and_exit_boot()
313 /* Install the new virtual address map */ in allocate_new_fdt_and_exit_boot()
314 svam = efi_system_table->runtime->set_virtual_address_map; in allocate_new_fdt_and_exit_boot()
319 * We are beyond the point of no return here, so if the call to in allocate_new_fdt_and_exit_boot()
329 * the incoming kernel that no virtual translation has in allocate_new_fdt_and_exit_boot()
335 if (p->attribute & EFI_MEMORY_RUNTIME) in allocate_new_fdt_and_exit_boot()
336 p->virt_addr = 0; in allocate_new_fdt_and_exit_boot()
348 efi_system_table->boottime->free_pool(runtime_map); in allocate_new_fdt_and_exit_boot()