Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/27090
Change subject: cbfstool/fit.c: Fix for older CPUs without total_size in mcu_header
......................................................................
cbfstool/fit.c: Fix for older CPUs without total_size in mcu_header
Some older CPUs have a fixed size of 2048 bytes for microcode total size.
Change-Id: Ia50c087af41b0df14b607ce3c3b4eabc602e8738
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M util/cbfstool/fit.c
1 file changed, 5 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/27090/1
diff --git a/util/cbfstool/fit.c b/util/cbfstool/fit.c
index e3e6c32..1684ef6 100644
--- a/util/cbfstool/fit.c
+++ b/util/cbfstool/fit.c
@@ -226,13 +226,14 @@
mcu_header = rom_buffer_pointer(&image->buffer, current_offset);
- /* Quickly sanity check a prospective microcode update. */
- if (mcu_header->total_size < sizeof(*mcu_header))
- break;
+ /* Newer microcode updates include a size field, whereas older
+ * containers set it at 0 and are exactly 2048 bytes long */
+ uint32_t update_size = mcu_header->total_size
+ ? mcu_header->total_size : 2048;
/* FIXME: Should the checksum be validated? */
mcus[num_mcus].offset = current_offset;
- mcus[num_mcus].size = mcu_header->total_size;
+ mcus[num_mcus].size = update_size;
/* Proceed to next payload. */
current_offset += mcus[num_mcus].size;
--
To view, visit https://review.coreboot.org/27090
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia50c087af41b0df14b607ce3c3b4eabc602e8738
Gerrit-Change-Number: 27090
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/27029 )
Change subject: mediatek: Move mtcmos code to a common directory
......................................................................
Patch Set 2: Verified+1
Build Successful
https://qa.coreboot.org/job/coreboot-checkpatch/28953/ : SUCCESS
https://qa.coreboot.org/job/coreboot-gerrit/74850/ : SUCCESS
--
To view, visit https://review.coreboot.org/27029
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I92b138890424b4f4a68cdb00bf2326eef9cd87b7
Gerrit-Change-Number: 27029
Gerrit-PatchSet: 2
Gerrit-Owner: Tristan Hsieh <tristan.shieh(a)mediatek.com>
Gerrit-Reviewer: Kevin Paul Herbert <kph(a)meraki.net>
Gerrit-Reviewer: Paul Kocialkowski <contact(a)paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Tristan Hsieh <tristan.shieh(a)mediatek.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 13 Jun 2018 09:39:44 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes