diff options
author | Werner Zeh <werner.zeh@siemens.com> | 2019-02-20 06:38:04 +0100 |
---|---|---|
committer | Werner Zeh <werner.zeh@siemens.com> | 2019-02-25 05:39:45 +0000 |
commit | d35a4811dbe6badcc9fabd3c3a7c992039215e02 (patch) | |
tree | ed0bb630d8b1b04d3e92f0dbed8837f176794307 /util/nvramtool/cmos_lowlevel.h | |
parent | 87abccdd898ea98ede687c17e9177107cb5c7521 (diff) |
vendorcode/siemens: Cache currently opened hwi file name
On every call of hwilib_find_blocks() the CBFS file will be mapped and
the contents are parsed to get the offsets for every single block. This
is not needed if the CBFS file name is the same for the different calls.
This patch adds a storage for the currently opened CBFS file name in
CAR_GLOBAL and checks on each call if the file to open is already open.
If yes, the file will not be mapped again which saves execution time.
Test=Booted mc_tcu3, mc_bdx1 and mc_apl1 and verified that hwinfo.hex
is only mapped once across several following hwilib_find_blocks() calls.
In addition a test was done to ensure that files with different names
get mapped correctly.
Change-Id: Id69e0f6c914c2b8e4551fd8a4fb7d452d176afb3
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/c/31518
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Diffstat (limited to 'util/nvramtool/cmos_lowlevel.h')
0 files changed, 0 insertions, 0 deletions