summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/loaders/load_and_run_romstage.c3
-rw-r--r--src/lib/lzma.c4
-rw-r--r--src/lib/timestamp.c2
3 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/loaders/load_and_run_romstage.c b/src/lib/loaders/load_and_run_romstage.c
index 8467e90129..9bd9603bab 100644
--- a/src/lib/loaders/load_and_run_romstage.c
+++ b/src/lib/loaders/load_and_run_romstage.c
@@ -24,6 +24,7 @@
#include <cbfs.h>
#include <halt.h>
#include <program_loading.h>
+#include <timestamp.h>
void run_romstage(void)
{
@@ -32,11 +33,13 @@ void run_romstage(void)
.type = PROG_ROMSTAGE,
};
+ timestamp_add_now(TS_START_COPYROM);
if (cbfs_load_prog_stage(CBFS_DEFAULT_MEDIA, &romstage) < 0) {
if (IS_ENABLED(CONFIG_BOOTBLOCK_CONSOLE))
die("Couldn't load romstage.\n");
halt();
}
+ timestamp_add_now(TS_END_COPYROM);
prog_run(&romstage);
}
diff --git a/src/lib/lzma.c b/src/lib/lzma.c
index 8efa1e6e1a..89e4d97600 100644
--- a/src/lib/lzma.c
+++ b/src/lib/lzma.c
@@ -12,6 +12,7 @@
#include <console/console.h>
#include <string.h>
#include <lib.h>
+#include <timestamp.h>
#include "lzmadecode.h"
@@ -27,6 +28,8 @@ unsigned long ulzma(unsigned char * src, unsigned char * dst)
MAYBE_STATIC unsigned char scratchpad[15980];
unsigned char *cp;
+ /* Note: these timestamps aren't useful for memory-mapped media (x86) */
+ timestamp_add_now(TS_START_ULZMA);
memcpy(properties, src, LZMA_PROPERTIES_SIZE);
/* The outSize in LZMA stream is a 64bit integer stored in little-endian
* (ref: lzma.cc@LZMACompress: put_64). To prevent accessing by
@@ -50,5 +53,6 @@ unsigned long ulzma(unsigned char * src, unsigned char * dst)
printk(BIOS_WARNING, "lzma: Decoding error = %d\n", res);
return 0;
}
+ timestamp_add_now(TS_END_ULZMA);
return outSize;
}
diff --git a/src/lib/timestamp.c b/src/lib/timestamp.c
index 67635f87ed..5846781706 100644
--- a/src/lib/timestamp.c
+++ b/src/lib/timestamp.c
@@ -25,7 +25,7 @@
#include <arch/early_variables.h>
#include <smp/node.h>
-#define MAX_TIMESTAMPS 30
+#define MAX_TIMESTAMPS 60
static struct timestamp_table* ts_table_p CAR_GLOBAL = NULL;
static uint64_t ts_basetime CAR_GLOBAL = 0;