summaryrefslogtreecommitdiff
path: root/arch/arm/lib
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-04-07 10:14:41 -0700
committerSimon Glass <sjg@chromium.org>2011-08-24 09:56:21 -0700
commit9530dc99ee3539909935e8a60a2bb756499c8318 (patch)
tree9e67946a7e123dfa8a65c97629a726dcbd80e591 /arch/arm/lib
parent29897caccd59d51e110475edbaa483175f1f363f (diff)
Add microsecond boot time measurement
This defines the basics of a new boot time measurement feature. This allows logging of very accurate time measurements as the boot proceeds, by using an available microsecond counter. To enable the feature, define CONFIG_BOOTSTAGE in your board config file. Also available is CONFIG_BOOTSTAGE_REPORT which will cause a report to be printed just before handing off to the OS. BUG=chromium-os:13875 TEST=build and boot, check that progress is reported before running Linux: Timer summary in microseconds: Mark Elapsed Stage 0 0 awake 2,181,078 2,181,078 usb_start 11,861,817 9,680,739 bootp_start 11,884,610 22,793 bootp_stop 11,884,689 79 tftp start 15,271,536 3,386,847 tftp done 15,271,568 32 bootm_start 15,406,551 134,983 start_kernel Change-Id: I71b89c8402dc5dec75e68333bd24a6bab7500a1b Reviewed-on: http://gerrit.chromium.org/gerrit/197 Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/arm/lib')
-rw-r--r--arch/arm/lib/board.c2
-rw-r--r--arch/arm/lib/bootm.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 1a9fe7eb5bc..cd88c7e3588 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -271,6 +271,8 @@ void board_init_f (ulong bootflag)
gd_t *id;
ulong addr, addr_sp;
+ bootstage_mark(BOOTSTAGE_START_UBOOT, "start_armboot");
+
/* Pointer is writable since we allocated a register for it */
gd = (gd_t *) ((CONFIG_SYS_INIT_SP_ADDR) & ~0x07);
/* compiler optimization barrier needed for GCC >= 3.4 */
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 802e833a2ed..5116e950f85 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -83,6 +83,10 @@ void arch_lmb_reserve(struct lmb *lmb)
static void announce_and_cleanup(void)
{
printf("\nStarting kernel ...\n\n");
+ bootstage_mark(BOOTSTAGE_BOOTM_HANDOFF, "start_kernel");
+#ifdef CONFIG_BOOTSTAGE_REPORT
+ bootstage_report();
+#endif
#ifdef CONFIG_USB_DEVICE
{