[coreboot-gerrit] New patch to review for coreboot: cbfstool: Change FMAP granularity to 16 bytes
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Wed Jan 13 18:43:57 CET 2016
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12932
-gerrit
commit 276424b546eea6035dc5a357e30109b023efb3d2
Author: Stefan Reinauer <reinauer at chromium.org>
Date: Wed Dec 9 15:11:42 2015 -0800
cbfstool: Change FMAP granularity to 16 bytes
Instead of looking for an FMAP at every byte, only search down
to a granularity of 16 bytes, reducing the time for a cbfstool
call by 0.3s when no FMAP is found.
Signed-off-by: Stefan Reinauner <reinauer at chromium.org>
BUG=none
BRANCH=none
TEST=time ./cbfstool coreboot.rom add -f locale_de.bin -n locale_de.bin -t 0x50 -c lzma
is 0.3s faster than before.
Change-Id: Icb4937330e920ae09928ceda7c1af6a3c5130ac7
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
Original-Commit-Id: bc92d838ba9db7733870ea6e8423fa4fa41bf8fe
Original-Change-Id: Idbaec58a199df93bdc10e883c56675b419ab5b8e
Original-Reviewed-on: https://chromium-review.googlesource.com/317321
Original-Commit-Ready: Stefan Reinauer <reinauer at chromium.org>
Original-Tested-by: Stefan Reinauer <reinauer at chromium.org>
Original-Reviewed-by: Daisuke Nojiri <dnojiri at chromium.org>
---
util/cbfstool/flashmap/fmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/cbfstool/flashmap/fmap.c b/util/cbfstool/flashmap/fmap.c
index 24181d0..733f468 100644
--- a/util/cbfstool/flashmap/fmap.c
+++ b/util/cbfstool/flashmap/fmap.c
@@ -139,7 +139,7 @@ static long int fmap_bsearch(const uint8_t *image, size_t len)
* remainder when modding the offset with the previous stride. This
* makes it so that each offset is only checked once.
*/
- for (stride = len / 2; stride >= 1; stride /= 2) {
+ for (stride = len / 2; stride >= 16; stride /= 2) {
if (fmap_found)
break;
More information about the coreboot-gerrit
mailing list