diff mbox series

[U-Boot] microblaze: Unify Linux bootm process

Message ID 2635f02b9f861179836e1b837c66df544332eed5.1571642660.git.michal.simek@xilinx.com
State Accepted
Commit f3035cf29958dbf21587a1bdb98eb9f692120d40
Delegated to: Michal Simek
Headers show
Series [U-Boot] microblaze: Unify Linux bootm process | expand

Commit Message

Michal Simek Oct. 21, 2019, 7:24 a.m. UTC
Record two bootstages and add "Starting kernel" message to have standard
handoff message between U-Boot and OS.
Also use debug() instead of #ifdef DEBUG to clean the code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 arch/microblaze/lib/bootm.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

Comments

Michal Simek Oct. 24, 2019, 11:33 a.m. UTC | #1
po 21. 10. 2019 v 9:24 odesílatel Michal Simek <michal.simek@xilinx.com> napsal:
>
> Record two bootstages and add "Starting kernel" message to have standard
> handoff message between U-Boot and OS.
> Also use debug() instead of #ifdef DEBUG to clean the code.
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
>  arch/microblaze/lib/bootm.c | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
> index 5650109d6313..01c5d57bc5b0 100644
> --- a/arch/microblaze/lib/bootm.c
> +++ b/arch/microblaze/lib/bootm.c
> @@ -66,12 +66,15 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
>
>         thekernel = (void (*)(char *, ulong, ulong))images->ep;
>
> -#ifdef DEBUG
> -       printf("## Transferring control to Linux (at address 0x%08lx) ",
> -              (ulong)thekernel);
> -       printf("cmdline 0x%08lx, ramdisk 0x%08lx, FDT 0x%08lx...\n",
> -              cmdline, rd_start, dt);
> -#endif
> +       debug("## Transferring control to Linux (at address 0x%08lx) ",
> +             (ulong)thekernel);
> +       debug("cmdline 0x%08lx, ramdisk 0x%08lx, FDT 0x%08lx...\n",
> +             cmdline, rd_start, dt);
> +       bootstage_mark(BOOTSTAGE_ID_RUN_OS);
> +
> +       printf("\nStarting kernel ...%s\n\n", fake ?
> +              "(fake run for tracing)" : "");
> +       bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
>
>  #ifdef XILINX_USE_DCACHE
>         flush_cache(0, XILINX_DCACHE_BYTE_SIZE);
> --
> 2.17.1
>

Applied.
M
diff mbox series

Patch

diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index 5650109d6313..01c5d57bc5b0 100644
--- a/arch/microblaze/lib/bootm.c
+++ b/arch/microblaze/lib/bootm.c
@@ -66,12 +66,15 @@  static void boot_jump_linux(bootm_headers_t *images, int flag)
 
 	thekernel = (void (*)(char *, ulong, ulong))images->ep;
 
-#ifdef DEBUG
-	printf("## Transferring control to Linux (at address 0x%08lx) ",
-	       (ulong)thekernel);
-	printf("cmdline 0x%08lx, ramdisk 0x%08lx, FDT 0x%08lx...\n",
-	       cmdline, rd_start, dt);
-#endif
+	debug("## Transferring control to Linux (at address 0x%08lx) ",
+	      (ulong)thekernel);
+	debug("cmdline 0x%08lx, ramdisk 0x%08lx, FDT 0x%08lx...\n",
+	      cmdline, rd_start, dt);
+	bootstage_mark(BOOTSTAGE_ID_RUN_OS);
+
+	printf("\nStarting kernel ...%s\n\n", fake ?
+	       "(fake run for tracing)" : "");
+	bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
 
 #ifdef XILINX_USE_DCACHE
 	flush_cache(0, XILINX_DCACHE_BYTE_SIZE);