diff options
author | Simon Glass <sjg@chromium.org> | 2011-08-10 17:07:45 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:59:29 -0700 |
commit | e8165fe783b8aa5451ce4f905c8fbe4e949332a9 (patch) | |
tree | 2644c3c9c9ce38c59c422f17589fb3c3939fe230 | |
parent | 475a78304761b5cadf2fc10789b24b7b503aa39b (diff) |
CHROMIUM: Add bootstage markers to twostop boot
This lets us see the time used by twostop which is outside vboot itself.
BUG=chromium-os:17805
TEST=build and boot on Aebl, see new output:
Timer summary in microseconds:
Mark Elapsed Stage
...
647,449 4,792 do_vboot_twostop
649,768 2,319 twostop_init
661,083 11,315 twostop_select_and_set_main_firmware
886,859 225,776 twostop_main_firmware
1,324,964 438,105 select_and_load_kernel_exit
Change-Id: I85408bf2860a77fae54fcb78ece07314b8929d25
Reviewed-on: http://gerrit.chromium.org/gerrit/5775
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | common/cmd_vboot_twostop.c | 6 | ||||
-rw-r--r-- | include/chromeos/common.h | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/common/cmd_vboot_twostop.c b/common/cmd_vboot_twostop.c index 3c1676f0b0..e922a116b8 100644 --- a/common/cmd_vboot_twostop.c +++ b/common/cmd_vboot_twostop.c @@ -335,6 +335,8 @@ twostop_select_and_set_main_firmware(struct twostop_fmap *fmap, uint8_t firmware_id[ID_LEN]; VbCommonParams cparams; + bootstage_mark(BOOTSTAGE_VBOOT_SELECT_AND_SET, + "twostop_select_and_set_main_firmware"); if (twostop_init_cparams(fmap, gbb, vb_shared_data, &cparams)) { VBDEBUG(PREFIX "failed to init cparams\n"); return VB_SELECT_ERROR; @@ -436,6 +438,7 @@ twostop_init(struct twostop_fmap *fmap, firmware_storage_t *file, uint8_t hardware_id[ID_LEN], readonly_firmware_id[ID_LEN]; int ret = -1; + bootstage_mark(BOOTSTAGE_VBOOT_TWOSTOP_INIT, "twostop_init"); if (cros_gpio_fetch(CROS_GPIO_WPSW, &wpsw) || cros_gpio_fetch(CROS_GPIO_RECSW, &recsw) || cros_gpio_fetch(CROS_GPIO_DEVSW, &devsw)) { @@ -511,6 +514,8 @@ twostop_main_firmware(struct twostop_fmap *fmap, void *gbb, VbSelectAndLoadKernelParams kparams; VbCommonParams cparams; + bootstage_mark(BOOTSTAGE_VBOOT_TWOSTOP_MAIN_FIRMWARE, + "twostop_main_firmware"); if (twostop_init_cparams(fmap, gbb, vb_shared_data, &cparams)) { VBDEBUG(PREFIX "failed to init cparams\n"); return VB_SELECT_ERROR; @@ -660,6 +665,7 @@ do_vboot_twostop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { uint32_t selection; + bootstage_mark(BOOTSTAGE_VBOOT_TWOSTOP, "do_vboot_twostop"); /* * TODO: We should clear screen later if we load graphics optionally. * In normal mode, we don't need to load graphics driver and clear diff --git a/include/chromeos/common.h b/include/chromeos/common.h index 7c0b58faef..1c4b3925dc 100644 --- a/include/chromeos/common.h +++ b/include/chromeos/common.h @@ -32,6 +32,16 @@ #define VBDEBUG_PUTS(str) #endif + +enum { + BOOTSTAGE_VBOOT_TWOSTOP = BOOTSTAGE_USER, + BOOTSTAGE_VBOOT_TWOSTOP_INIT, + BOOTSTAGE_VBOOT_SELECT_AND_SET, + BOOTSTAGE_VBOOT_TWOSTOP_MAIN_FIRMWARE, + + BOOTSTAGE_VBOOT_LAST +}; + /* this function is implemented along with vboot_api */ int display_clear(void); |