diff options
author | Ulf Winkelvos <ulf@winkelvos.de> | 2014-07-09 20:12:41 -0400 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2014-07-18 16:24:01 -0400 |
commit | fb86b2440de0ec10fe0272eb19d262ae7a01adb8 (patch) | |
tree | a2800baf2db7dea8e8c65747aa37712940dee0cc /arch/x86/boot | |
parent | 28d54022e6ff9c16bf4dacb5f64a97443a38caa9 (diff) |
x86/efi: Add better error logging to EFI boot stub
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>
Diffstat (limited to 'arch/x86/boot')
-rw-r--r-- | arch/x86/boot/compressed/eboot.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index 3b5c66c8f749..f277184e2ac1 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c | |||
@@ -1376,7 +1376,10 @@ struct boot_params *efi_main(struct efi_config *c, | |||
1376 | 1376 | ||
1377 | setup_graphics(boot_params); | 1377 | setup_graphics(boot_params); |
1378 | 1378 | ||
1379 | setup_efi_pci(boot_params); | 1379 | status = setup_efi_pci(boot_params); |
1380 | if (status != EFI_SUCCESS) { | ||
1381 | efi_printk(sys_table, "setup_efi_pci() failed!\n"); | ||
1382 | } | ||
1380 | 1383 | ||
1381 | status = efi_call_early(allocate_pool, EFI_LOADER_DATA, | 1384 | status = efi_call_early(allocate_pool, EFI_LOADER_DATA, |
1382 | sizeof(*gdt), (void **)&gdt); | 1385 | sizeof(*gdt), (void **)&gdt); |
@@ -1403,16 +1406,20 @@ struct boot_params *efi_main(struct efi_config *c, | |||
1403 | hdr->init_size, hdr->init_size, | 1406 | hdr->init_size, hdr->init_size, |
1404 | hdr->pref_address, | 1407 | hdr->pref_address, |
1405 | hdr->kernel_alignment); | 1408 | hdr->kernel_alignment); |
1406 | if (status != EFI_SUCCESS) | 1409 | if (status != EFI_SUCCESS) { |
1410 | efi_printk(sys_table, "efi_relocate_kernel() failed!\n"); | ||
1407 | goto fail; | 1411 | goto fail; |
1412 | } | ||
1408 | 1413 | ||
1409 | hdr->pref_address = hdr->code32_start; | 1414 | hdr->pref_address = hdr->code32_start; |
1410 | hdr->code32_start = bzimage_addr; | 1415 | hdr->code32_start = bzimage_addr; |
1411 | } | 1416 | } |
1412 | 1417 | ||
1413 | status = exit_boot(boot_params, handle, is64); | 1418 | status = exit_boot(boot_params, handle, is64); |
1414 | if (status != EFI_SUCCESS) | 1419 | if (status != EFI_SUCCESS) { |
1420 | efi_printk(sys_table, "exit_boot() failed!\n"); | ||
1415 | goto fail; | 1421 | goto fail; |
1422 | } | ||
1416 | 1423 | ||
1417 | memset((char *)gdt->address, 0x0, gdt->size); | 1424 | memset((char *)gdt->address, 0x0, gdt->size); |
1418 | desc = (struct desc_struct *)gdt->address; | 1425 | desc = (struct desc_struct *)gdt->address; |
@@ -1472,5 +1479,6 @@ struct boot_params *efi_main(struct efi_config *c, | |||
1472 | 1479 | ||
1473 | return boot_params; | 1480 | return boot_params; |
1474 | fail: | 1481 | fail: |
1482 | efi_printk(sys_table, "efi_main() failed!\n"); | ||
1475 | return NULL; | 1483 | return NULL; |
1476 | } | 1484 | } |