diff options
Diffstat (limited to 'util/cbfstool')
-rw-r--r-- | util/cbfstool/cbfs.h | 1 | ||||
-rw-r--r-- | util/cbfstool/cbfstool.c | 14 |
2 files changed, 14 insertions, 1 deletions
diff --git a/util/cbfstool/cbfs.h b/util/cbfstool/cbfs.h index e1f705e6fe..e90516211d 100644 --- a/util/cbfstool/cbfs.h +++ b/util/cbfstool/cbfs.h @@ -40,6 +40,7 @@ static struct typedesc_t filetypes[] unused = { {CBFS_TYPE_VSA, "vsa"}, {CBFS_TYPE_MBI, "mbi"}, {CBFS_TYPE_MICROCODE, "microcode"}, + {CBFS_TYPE_INTEL_FIT, "intel_fit"}, {CBFS_TYPE_FSP, "fsp"}, {CBFS_TYPE_MRC, "mrc"}, {CBFS_TYPE_CMOS_DEFAULT, "cmos_default"}, diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c index b2d5cdbda8..71c8911ede 100644 --- a/util/cbfstool/cbfstool.c +++ b/util/cbfstool/cbfstool.c @@ -279,6 +279,18 @@ static int maybe_update_fmap_hash(void) return update_anchor(mhc, fmap_hash); } +static bool verification_exclude(enum cbfs_type type) +{ + switch (type) { + case CBFS_TYPE_BOOTBLOCK: + case CBFS_TYPE_CBFSHEADER: + case CBFS_TYPE_INTEL_FIT: + return true; + default: + return false; + } +} + static bool region_is_flashmap(const char *region) { return partitioned_file_region_check_magic(param.image_file, region, @@ -872,7 +884,7 @@ static int cbfs_add_component(const char *filename, /* Bootblock and CBFS header should never have file hashes. When adding the bootblock it is important that we *don't* look up the metadata hash yet (before it is added) or we'll cache an outdated result. */ - if (param.type != CBFS_TYPE_BOOTBLOCK && param.type != CBFS_TYPE_CBFSHEADER) { + if (!verification_exclude(param.type)) { enum vb2_hash_algorithm mh_algo = get_mh_cache()->cbfs_hash.algo; if (mh_algo != VB2_HASH_INVALID && param.hash != mh_algo) { if (param.hash == VB2_HASH_INVALID) { |