[coreboot-gerrit] Patch set updated for coreboot: lib/cbfs: Use ulzman() for LZMA decompress to decrease boot time
Paul Menzel (paulepanter@users.sourceforge.net)
gerrit at coreboot.org
Fri Feb 19 21:42:03 CET 2016
Paul Menzel (paulepanter at users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13732
-gerrit
commit e05302173c4d01e6a0dff5c0247dab071337470c
Author: Aaron Durbin <adurbin at chromium.org>
Date: Thu Feb 18 15:39:16 2016 +0100
lib/cbfs: Use ulzman() for LZMA decompress to decrease boot time
On the ASRock E350M1, commit a25b5d25 (lzma: Port size-checking ulzman()
version to coreboot) tripples the boot time to ramstage.
```
asrock/e350m1/4.3-210-g8c09377/2016-02-12T20_54_52Z/coreboot_timestamps.txt: 0:1st timestamp 495,162
asrock/e350m1/4.3-213-ga25b5d2/2016-02-12T21_00_55Z/coreboot_timestamps.txt: 0:1st timestamp 1,253,251
```
Using `ulzman()` for LZMA decompression decreases this a little, to one
second, but still does not restore the old behavior.
Change-Id: Iaa0e18a73ca1c291f1349754d705617f1324edba
Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
---
src/lib/cbfs.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c
index 55a8536..b277676 100644
--- a/src/lib/cbfs.c
+++ b/src/lib/cbfs.c
@@ -68,13 +68,14 @@ void *cbfs_boot_map_with_leak(const char *name, uint32_t type, size_t *size)
return rdev_mmap(&fh.data, 0, fsize);
}
-static size_t inflate(void *src, void *dst)
+static size_t inflate(void *src, size_t src_sz, void *dst, size_t dst_sz)
{
if (ENV_BOOTBLOCK || ENV_VERSTAGE)
return 0;
if (ENV_ROMSTAGE && !IS_ENABLED(CONFIG_COMPRESS_RAMSTAGE))
return 0;
- return ulzma(src, dst);
+
+ return ulzman(src, src_sz, dst, dst_sz);
}
static inline int tohex4(unsigned int c)
@@ -161,7 +162,7 @@ int cbfs_prog_stage_load(struct prog *pstage)
if (map == NULL)
return -1;
- fsize = inflate(map, load);
+ fsize = inflate(map, fsize, load, stage.memlen);
rdev_munmap(fh, map);
More information about the coreboot-gerrit
mailing list