aboot: add boot timestamps
Change-Id: I124e83ea9fe5f59688fc801cdaf319d2614ca476
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index f51f01d..9a45feb 100644
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -49,6 +49,7 @@
#include <platform.h>
#include <crypto_hash.h>
#include <malloc.h>
+#include <boot_stats.h>
#if DEVICE_TREE
#include <libfdt.h>
@@ -444,7 +445,7 @@
#if ARM_WITH_MMU
arch_disable_mmu();
#endif
-
+ bs_set_timestamp(BS_KERNEL_ENTRY);
entry(0, machtype, (unsigned*)tags_phys);
}
@@ -542,6 +543,7 @@
device.is_tampered = 1;
dprintf(INFO, "Loading boot image (%d): start\n", imagesize_actual);
+ bs_set_timestamp(BS_KERNEL_LOAD_START);
/* Read image without signature */
if (mmc_read(ptn + offset, (void *)image_addr, imagesize_actual))
@@ -551,6 +553,7 @@
}
dprintf(INFO, "Loading boot image (%d): done\n", imagesize_actual);
+ bs_set_timestamp(BS_KERNEL_LOAD_DONE);
offset = imagesize_actual;
/* Read signature */
@@ -639,6 +642,7 @@
dprintf(INFO, "Loading boot image (%d): start\n",
kernel_actual + ramdisk_actual);
+ bs_set_timestamp(BS_KERNEL_LOAD_START);
offset = page_size;
@@ -661,6 +665,7 @@
dprintf(INFO, "Loading boot image (%d): done\n",
kernel_actual + ramdisk_actual);
+ bs_set_timestamp(BS_KERNEL_LOAD_DONE);
if(hdr->second_size != 0) {
offset += second_actual;
@@ -829,6 +834,7 @@
device.is_tampered = 1;
dprintf(INFO, "Loading boot image (%d): start\n", imagesize_actual);
+ bs_set_timestamp(BS_KERNEL_LOAD_START);
/* Read image without signature */
if (flash_read(ptn, offset, (void *)image_addr, imagesize_actual))
@@ -838,6 +844,7 @@
}
dprintf(INFO, "Loading boot image (%d): done\n", imagesize_actual);
+ bs_set_timestamp(BS_KERNEL_LOAD_DONE);
offset = imagesize_actual;
/* Read signature */
@@ -890,6 +897,7 @@
dprintf(INFO, "Loading boot image (%d): start\n",
kernel_actual + ramdisk_actual);
+ bs_set_timestamp(BS_KERNEL_LOAD_START);
if (flash_read(ptn, offset, (void *)hdr->kernel_addr, kernel_actual)) {
dprintf(CRITICAL, "ERROR: Cannot read kernel image\n");
@@ -905,6 +913,7 @@
dprintf(INFO, "Loading boot image (%d): done\n",
kernel_actual + ramdisk_actual);
+ bs_set_timestamp(BS_KERNEL_LOAD_DONE);
if(hdr->second_size != 0) {
offset += second_actual;