Skip to content

Commit

Permalink
x86/efi: Add better error logging to EFI boot stub
Browse files Browse the repository at this point in the history
Hopefully this will enable us to better debug:
https://bugzilla.kernel.org/show_bug.cgi?id=68761

Signed-off-by: Ulf Winkelvos <ulf@winkelvos.de>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
  • Loading branch information
Ulf Winkelvos authored and Matt Fleming committed Jul 18, 2014
1 parent 28d5402 commit fb86b24
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions arch/x86/boot/compressed/eboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,10 @@ struct boot_params *efi_main(struct efi_config *c,

setup_graphics(boot_params);

setup_efi_pci(boot_params);
status = setup_efi_pci(boot_params);
if (status != EFI_SUCCESS) {
efi_printk(sys_table, "setup_efi_pci() failed!\n");
}

status = efi_call_early(allocate_pool, EFI_LOADER_DATA,
sizeof(*gdt), (void **)&gdt);
Expand All @@ -1403,16 +1406,20 @@ struct boot_params *efi_main(struct efi_config *c,
hdr->init_size, hdr->init_size,
hdr->pref_address,
hdr->kernel_alignment);
if (status != EFI_SUCCESS)
if (status != EFI_SUCCESS) {
efi_printk(sys_table, "efi_relocate_kernel() failed!\n");
goto fail;
}

hdr->pref_address = hdr->code32_start;
hdr->code32_start = bzimage_addr;
}

status = exit_boot(boot_params, handle, is64);
if (status != EFI_SUCCESS)
if (status != EFI_SUCCESS) {
efi_printk(sys_table, "exit_boot() failed!\n");
goto fail;
}

memset((char *)gdt->address, 0x0, gdt->size);
desc = (struct desc_struct *)gdt->address;
Expand Down Expand Up @@ -1472,5 +1479,6 @@ struct boot_params *efi_main(struct efi_config *c,

return boot_params;
fail:
efi_printk(sys_table, "efi_main() failed!\n");
return NULL;
}

0 comments on commit fb86b24

Please sign in to comment.