summaryrefslogtreecommitdiff
path: root/arch/x86/lib
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/lib')
-rw-r--r--arch/x86/lib/spl.c2
-rw-r--r--arch/x86/lib/tpl.c7
-rw-r--r--arch/x86/lib/zimage.c33
3 files changed, 29 insertions, 13 deletions
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index cf22fa2d7b5..6699de49c63 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -115,8 +115,8 @@ static int x86_spl_init(void)
}
#ifndef CONFIG_SYS_COREBOOT
-# ifndef CONFIG_TPL
memset(&__bss_start, 0, (ulong)&__bss_end - (ulong)&__bss_start);
+# ifndef CONFIG_TPL
/* TODO(sjg@chromium.org): Consider calling cpu_init_r() here */
ret = interrupt_init();
diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c
index 04ff32277fd..c84a0c9bc7d 100644
--- a/arch/x86/lib/tpl.c
+++ b/arch/x86/lib/tpl.c
@@ -111,7 +111,12 @@ int spl_spi_load_image(void)
void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
{
- debug("Jumping to U-Boot SPL at %lx\n", (ulong)spl_image->entry_point);
+ debug("Jumping to %s at %lx\n", spl_phase_name(spl_next_phase()),
+ (ulong)spl_image->entry_point);
+#ifdef DEBUG
+ print_buffer(spl_image->entry_point, (void *)spl_image->entry_point, 1,
+ 0x20, 0);
+#endif
jump_to_spl(spl_image->entry_point);
hang();
}
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index 708025b2071..602788e016d 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -109,8 +109,11 @@ static void build_command_line(char *command_line, int auto_boot)
if (env_command_line)
strcat(command_line, env_command_line);
-
- printf("Kernel command line: \"%s\"\n", command_line);
+#ifdef DEBUG
+ printf("Kernel command line:");
+ puts(command_line);
+ printf("\n");
+#endif
}
static int kernel_magic_ok(struct setup_header *hdr)
@@ -354,7 +357,8 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,
build_command_line(cmd_line, auto_boot);
ret = bootm_process_cmdline(cmd_line, max_size, BOOTM_CL_ALL);
if (ret) {
- printf("Cmdline setup failed (err=%d)\n", ret);
+ printf("Cmdline setup failed (max_size=%x, bootproto=%x, err=%d)\n",
+ max_size, bootproto, ret);
return ret;
}
printf("Kernel command line: \"");
@@ -600,19 +604,12 @@ static void show_loader(struct setup_header *hdr)
printf("\n");
}
-int do_zboot_dump(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
+void zimage_dump(struct boot_params *base_ptr)
{
- struct boot_params *base_ptr = state.base_ptr;
struct setup_header *hdr;
const char *version;
int i;
- if (argc > 1)
- base_ptr = (void *)simple_strtoul(argv[1], NULL, 16);
- if (!base_ptr) {
- printf("No zboot setup_base\n");
- return CMD_RET_FAILURE;
- }
printf("Setup located at %p:\n\n", base_ptr);
print_num64("ACPI RSDP addr", base_ptr->acpi_rsdp_addr);
@@ -688,6 +685,20 @@ int do_zboot_dump(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
print_num("Handover offset", hdr->handover_offset);
if (get_boot_protocol(hdr, false) >= 0x215)
print_num("Kernel info offset", hdr->kernel_info_offset);
+}
+
+static int do_zboot_dump(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
+{
+ struct boot_params *base_ptr = state.base_ptr;
+
+ if (argc > 1)
+ base_ptr = (void *)simple_strtoul(argv[1], NULL, 16);
+ if (!base_ptr) {
+ printf("No zboot setup_base\n");
+ return CMD_RET_FAILURE;
+ }
+ zimage_dump(base_ptr);
return 0;
}