From 0d22614f468c0722d699a74e130ddbebe05c1798 Mon Sep 17 00:00:00 2001 From: Stefan Tauner Date: Sun, 5 Aug 2018 18:56:53 +0200 Subject: ifdtool: fix flumap handling in chipsets prior ibex peak/5 series The Upper Map section in the descriptor contains a database of flash chips (VSCC Table). Its offset is located at a fixed offset from the beginning of the image. ifdtool falsely calculates the offset from the descriptor signature which has moved by 16 bytes with step b of the Ibex Peak (5 series) chipset. This produces bogus output for all chipsets older than that. This patch corrects the behavior by calculating the offset of flumap by adding 4096 - 256 - 4 to the start of the image. Change-Id: I14f029fe702c129dfd8069a58fbd41113700f7ef Signed-off-by: Stefan Tauner Reviewed-on: https://review.coreboot.org/27858 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans --- util/ifdtool/ifdtool.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util/ifdtool/ifdtool.h') diff --git a/util/ifdtool/ifdtool.h b/util/ifdtool/ifdtool.h index ef85555e06..1d2ccf6066 100644 --- a/util/ifdtool/ifdtool.h +++ b/util/ifdtool/ifdtool.h @@ -56,8 +56,6 @@ typedef struct { uint32_t flmap0; uint32_t flmap1; uint32_t flmap2; - uint8_t reserved[0xefc - 0x20]; - uint32_t flumap1; } __attribute__((packed)) fdbar_t; // regions @@ -113,6 +111,8 @@ typedef struct { typedef struct { // Actual number of entries specified in vtl + /* FIXME: Rationale for the limit of 8. + * AFAICT it's 127, cf. flashrom's ich_descriptors_tool). */ vscc_t entry[8]; } vtba_t; -- cgit v1.2.3