Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33555
Change subject: util/cbfstool/fit.c: Bail out when there are not enough FIT entries ......................................................................
util/cbfstool/fit.c: Bail out when there are not enough FIT entries
Bail out when there are not enough empty FIT enties to add all microcode entries.
Change-Id: If86678a1eaaa0c5ff571f25bd6bfdb26ac93a946 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M util/cbfstool/fit.c 1 file changed, 8 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/55/33555/1
diff --git a/util/cbfstool/fit.c b/util/cbfstool/fit.c index aeb1755..2fee9e3 100644 --- a/util/cbfstool/fit.c +++ b/util/cbfstool/fit.c @@ -238,7 +238,7 @@ static int parse_microcode_blob(struct cbfs_image *image, struct cbfs_file *mcode_file, struct microcode_entry *mcus, - int total_entries, int *mcus_found) + int *mcus_found) { int num_mcus; uint32_t current_offset; @@ -272,9 +272,6 @@ file_length -= mcus[num_mcus].size; num_mcus++;
- /* Reached limit of FIT entries. */ - if (num_mcus == total_entries) - break; if (file_length < sizeof(struct microcode_header)) break; } @@ -319,13 +316,18 @@ return 1; }
- if (parse_microcode_blob(image, mcode_file, mcus, empty_entries, - &mcus_found)) { + if (parse_microcode_blob(image, mcode_file, mcus, &mcus_found)) { ERROR("Couldn't parse microcode blob.\n"); ret = 1; goto out; }
+ if (mcus_found > empty_entries) { + ERROR("Not enough empty FIT entries for all microcode update entries.\n"); + ret = 1; + goto out; + } + add_microcodde_entries(fit, image, mcus_found, mcus, offset_fn, 0);
update_fit_checksum(fit);
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33555
to look at the new patch set (#2).
Change subject: util/cbfstool/fit.c: Bail out when there are not enough FIT entries ......................................................................
util/cbfstool/fit.c: Bail out when there are not enough FIT entries
Bail out when there are not enough empty FIT enties to add all microcode entries.
Change-Id: If86678a1eaaa0c5ff571f25bd6bfdb26ac93a946 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/soc/intel/skylake/Kconfig M util/cbfstool/fit.c 2 files changed, 9 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/55/33555/2
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33555 )
Change subject: util/cbfstool/fit.c: Bail out when there are not enough FIT entries ......................................................................
Patch Set 2:
Should this wait until ifittool is merged?
Hello Patrick Rudolph, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33555
to look at the new patch set (#4).
Change subject: util/cbfstool/fit.c: Bail out when there are not enough FIT entries ......................................................................
util/cbfstool/fit.c: Bail out when there are not enough FIT entries
Bail out when there are not enough empty FIT enties to add all microcode entries.
Change-Id: If86678a1eaaa0c5ff571f25bd6bfdb26ac93a946 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M util/cbfstool/fit.c 1 file changed, 8 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/55/33555/4
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33555 )
Change subject: util/cbfstool/fit.c: Bail out when there are not enough FIT entries ......................................................................
Patch Set 10:
(1 comment)
https://review.coreboot.org/#/c/33555/10/util/cbfstool/fit.c File util/cbfstool/fit.c:
https://review.coreboot.org/#/c/33555/10/util/cbfstool/fit.c@a273 PS10, Line 273: Somehow, we'd have to keep counting while not adding more entries beyond `mcus`.
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33555 )
Change subject: util/cbfstool/fit.c: Bail out when there are not enough FIT entries ......................................................................
Patch Set 10:
(1 comment)
https://review.coreboot.org/#/c/33555/10/util/cbfstool/fit.c File util/cbfstool/fit.c:
https://review.coreboot.org/#/c/33555/10/util/cbfstool/fit.c@a273 PS10, Line 273:
Somehow, we'd have to keep counting while not adding more entries […]
the ifittool has this check, as I already run into the issue overwriting parts of the bootblock...
Arthur Heymans has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/33555 )
Change subject: util/cbfstool/fit.c: Bail out when there are not enough FIT entries ......................................................................
Abandoned