summaryrefslogtreecommitdiff
path: root/util/ifdtool/ifdtool.h
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@gmx.at>2018-08-05 18:56:53 +0200
committerPatrick Georgi <pgeorgi@google.com>2018-08-07 07:10:41 +0000
commit0d22614f468c0722d699a74e130ddbebe05c1798 (patch)
treee7ed7beaed332ad0383c004b51e53f12cebf0649 /util/ifdtool/ifdtool.h
parent1758e73ee6f4a3a80d7bf64a9c6c722ffe1443b9 (diff)
downloadcoreboot-0d22614f468c0722d699a74e130ddbebe05c1798.tar.xz
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 <stefan.tauner@gmx.at> Reviewed-on: https://review.coreboot.org/27858 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'util/ifdtool/ifdtool.h')
-rw-r--r--util/ifdtool/ifdtool.h4
1 files changed, 2 insertions, 2 deletions
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;