summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/hardwaremain.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/hardwaremain.c b/src/lib/hardwaremain.c
index 7ab2ade912..90c910a320 100644
--- a/src/lib/hardwaremain.c
+++ b/src/lib/hardwaremain.c
@@ -264,6 +264,7 @@ static void bs_call_callbacks(struct boot_state *state,
boot_state_sequence_t seq)
{
struct boot_phase *phase = &state->phases[seq];
+ struct mono_time mt_start, mt_stop;
while (1) {
if (phase->callbacks != NULL) {
@@ -277,8 +278,16 @@ static void bs_call_callbacks(struct boot_state *state,
if (CONFIG(DEBUG_BOOT_STATE)) {
printk(BIOS_DEBUG, "BS: callback (%p) @ %s.\n",
bscb, bscb_location(bscb));
+ timer_monotonic_get(&mt_start);
}
bscb->callback(bscb->arg);
+ if (CONFIG(DEBUG_BOOT_STATE)) {
+ timer_monotonic_get(&mt_stop);
+ printk(BIOS_DEBUG, "BS: callback (%p) @ %s (%ld ms).\n", bscb,
+ bscb_location(bscb),
+ mono_time_diff_microseconds(&mt_start, &mt_stop)
+ / USECS_PER_MSEC);
+ }
continue;
}