diff --git a/drivers/firmware/efi/libstub/fdt.c b/drivers/firmware/efi/libstub/fdt.c index fe567be0f118..e920650c2cad 100644 --- a/drivers/firmware/efi/libstub/fdt.c +++ b/drivers/firmware/efi/libstub/fdt.c @@ -274,24 +274,27 @@ efi_status_t allocate_new_fdt_and_exit_boot(void *handle, efi_info("Exiting boot services...\n"); map.map = &memory_map; + efi_info("Calling efi_allocate_pages()\n"); status = efi_allocate_pages(MAX_FDT_SIZE, new_fdt_addr, ULONG_MAX); if (status != EFI_SUCCESS) { efi_err("Unable to allocate memory for new device tree.\n"); goto fail; } - + efi_info("Returned from efi_allocate_pages()\n"); /* * Now that we have done our final memory allocation (and free) * we can get the memory map key needed for exit_boot_services(). */ + efi_info("Calling efi_get_memory_map()\n"); status = efi_get_memory_map(&map); if (status != EFI_SUCCESS) goto fail_free_new_fdt; - + efi_info("Returned from efi_get_memory_map()\n"); + efi_info("Calling update_fdt()\n"); status = update_fdt((void *)fdt_addr, fdt_size, (void *)*new_fdt_addr, MAX_FDT_SIZE, cmdline_ptr, initrd_addr, initrd_size); - + efi_info("Returned from update_fdt()\n"); if (status != EFI_SUCCESS) { efi_err("Unable to construct new device tree.\n"); goto fail_free_new_fdt; @@ -302,18 +305,23 @@ efi_status_t allocate_new_fdt_and_exit_boot(void *handle, priv.runtime_entry_count = &runtime_entry_count; priv.new_fdt_addr = (void *)*new_fdt_addr; + efi_info("Calling efi_exit_boot_services()\n"); status = efi_exit_boot_services(handle, &map, &priv, exit_boot_func); - + efi_info("Returned from efi_exit_boot_services()\n"); if (status == EFI_SUCCESS) { efi_set_virtual_address_map_t *svam; - - if (efi_novamap) + efi_info("Preparing to do virtual address map\n"); + if (efi_novamap) { + efi_info("Got 'novamap' so nothing to do\n"); return EFI_SUCCESS; + } /* Install the new virtual address map */ svam = efi_system_table->runtime->set_virtual_address_map; + efi_info("Calling svam()\n"); status = svam(runtime_entry_count * desc_size, desc_size, desc_ver, runtime_map); + efi_info("Returned from svam()\n"); /* * We are beyond the point of no return here, so if the call to @@ -322,6 +330,7 @@ efi_status_t allocate_new_fdt_and_exit_boot(void *handle, */ if (status != EFI_SUCCESS) { int l; + efi_info("svam() failed\n"); /* * Set the virtual address field of all