summaryrefslogtreecommitdiffstats
path: root/ich_descriptors.c
diff options
context:
space:
mode:
authorJonathan Zhang <jonzhang@fb.com>2020-08-19 12:19:06 -0700
committerDavid Hendricks <david.hendricks@gmail.com>2020-09-10 04:43:30 +0000
commit95d822e342d48bea27fb3a606b1670994c3ce5d0 (patch)
tree9438b2b2080d548bf5dda4b27b14c0c04a145e50 /ich_descriptors.c
parent79da18f86945784eb3b7134ee0abcaa71231d517 (diff)
downloadflashrom-95d822e342d48bea27fb3a606b1670994c3ce5d0.tar.gz
flashrom-95d822e342d48bea27fb3a606b1670994c3ce5d0.tar.bz2
flashrom-95d822e342d48bea27fb3a606b1670994c3ce5d0.zip
allow 0x34 as ICCRIBA for CHIPSET_C620_SERIES_LEWISBURG
Intel C621A Lewisburg PCH belongs to C620 series, it has 0x34 as ICCRIBA. Fix guess_ich_chipset_from_content() accordingly. Print status info of read_ich_descriptors_from_dump() to facilitate debugging upon failure. TESTED=run flashrom successfully from OCP Yosemite V3 DeltaLake server. Change-Id: I363aaccfb90e0a127c0f0bb0072e9e85c210b669 Signed-off-by: Jonathan Zhang <jonzhang@fb.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/44621 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'ich_descriptors.c')
-rw-r--r--ich_descriptors.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/ich_descriptors.c b/ich_descriptors.c
index 120d3feab..7409a223b 100644
--- a/ich_descriptors.c
+++ b/ich_descriptors.c
@@ -937,9 +937,13 @@ static enum ich_chipset guess_ich_chipset_from_content(const struct ich_desc_con
return CHIPSET_C620_SERIES_LEWISBURG;
else
return CHIPSET_100_SERIES_SUNRISE_POINT;
+ } else if (content->ICCRIBA == 0x34) {
+ if (content->NM == 6)
+ return CHIPSET_C620_SERIES_LEWISBURG;
+ else
+ return CHIPSET_300_SERIES_CANNON_POINT;
} else {
- if (content->ICCRIBA > 0x34)
- msg_pwarn("Unknown firmware descriptor, assuming 300 series compatibility.\n");
+ msg_pwarn("Unknown firmware descriptor, assuming 300 series compatibility.\n");
return CHIPSET_300_SERIES_CANNON_POINT;
}
}
@@ -1243,8 +1247,12 @@ int layout_from_ich_descriptors(struct ich_layout *const layout, const void *con
struct ich_descriptors desc;
enum ich_chipset cs = CHIPSET_ICH_UNKNOWN;
- if (read_ich_descriptors_from_dump(dump, len, &cs, &desc))
+ int ret = read_ich_descriptors_from_dump(dump, len, &cs, &desc);
+ if (ret) {
+ msg_pdbg("%s():%d, returned with value %d.\n",
+ __func__, __LINE__, ret);
return 1;
+ }
memset(layout, 0x00, sizeof(*layout));