summaryrefslogtreecommitdiff
path: root/src/lib/selfboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/selfboot.c')
-rw-r--r--src/lib/selfboot.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/selfboot.c b/src/lib/selfboot.c
index f3a1e52728..7d3e2dd5f6 100644
--- a/src/lib/selfboot.c
+++ b/src/lib/selfboot.c
@@ -14,6 +14,7 @@
* GNU General Public License for more details.
*/
+#include <commonlib/compression.h>
#include <console/console.h>
#include <cpu/cpu.h>
#include <endian.h>
@@ -25,6 +26,7 @@
#include <lib.h>
#include <bootmem.h>
#include <program_loading.h>
+#include <timestamp.h>
static const unsigned long lb_start = (unsigned long)&_program;
static const unsigned long lb_end = (unsigned long)&_eprogram;
@@ -386,7 +388,18 @@ static int load_self_segments(
switch(ptr->compression) {
case CBFS_COMPRESS_LZMA: {
printk(BIOS_DEBUG, "using LZMA\n");
+ timestamp_add_now(TS_START_ULZMA);
len = ulzman(src, len, dest, memsz);
+ timestamp_add_now(TS_END_ULZMA);
+ if (!len) /* Decompression Error. */
+ return 0;
+ break;
+ }
+ case CBFS_COMPRESS_LZ4: {
+ printk(BIOS_DEBUG, "using LZ4\n");
+ timestamp_add_now(TS_START_ULZ4F);
+ len = ulz4fn(src, len, dest, memsz);
+ timestamp_add_now(TS_END_ULZ4F);
if (!len) /* Decompression Error. */
return 0;
break;