提交 fb86b244 编写于 作者: U Ulf Winkelvos 提交者: Matt Fleming

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=68761Signed-off-by: NUlf Winkelvos <ulf@winkelvos.de>
Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
上级 28d54022
...@@ -1376,7 +1376,10 @@ struct boot_params *efi_main(struct efi_config *c, ...@@ -1376,7 +1376,10 @@ struct boot_params *efi_main(struct efi_config *c,
setup_graphics(boot_params); 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, status = efi_call_early(allocate_pool, EFI_LOADER_DATA,
sizeof(*gdt), (void **)&gdt); sizeof(*gdt), (void **)&gdt);
...@@ -1403,16 +1406,20 @@ struct boot_params *efi_main(struct efi_config *c, ...@@ -1403,16 +1406,20 @@ struct boot_params *efi_main(struct efi_config *c,
hdr->init_size, hdr->init_size, hdr->init_size, hdr->init_size,
hdr->pref_address, hdr->pref_address,
hdr->kernel_alignment); hdr->kernel_alignment);
if (status != EFI_SUCCESS) if (status != EFI_SUCCESS) {
efi_printk(sys_table, "efi_relocate_kernel() failed!\n");
goto fail; goto fail;
}
hdr->pref_address = hdr->code32_start; hdr->pref_address = hdr->code32_start;
hdr->code32_start = bzimage_addr; hdr->code32_start = bzimage_addr;
} }
status = exit_boot(boot_params, handle, is64); 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; goto fail;
}
memset((char *)gdt->address, 0x0, gdt->size); memset((char *)gdt->address, 0x0, gdt->size);
desc = (struct desc_struct *)gdt->address; desc = (struct desc_struct *)gdt->address;
...@@ -1472,5 +1479,6 @@ struct boot_params *efi_main(struct efi_config *c, ...@@ -1472,5 +1479,6 @@ struct boot_params *efi_main(struct efi_config *c,
return boot_params; return boot_params;
fail: fail:
efi_printk(sys_table, "efi_main() failed!\n");
return NULL; return NULL;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册