1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 23:22:37 +02:00

ich_descriptors: Normalize chipset detection

Normalize the fallback paths:
* Always end with the newest, assumed compatible chipset.
* Perform tighter checks when it's about warnings only.
* If two chipsets seem compatible, always return the same
  (this is currently the case for 8/9 series and 300/400
  series which we can't distinguish).

Change-Id: Ic5a5fee870202173b3a9813b03ec261e8ee45155
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/55651
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Nico Huber 2021-06-17 23:25:35 +02:00
parent d07140b72b
commit cd9b7b427d

View File

@ -933,15 +933,13 @@ static enum ich_chipset guess_ich_chipset_from_content(const struct ich_desc_con
return CHIPSET_ICH9;
if (content->ISL <= 10)
return CHIPSET_ICH10;
if (content->ISL <= 16)
return CHIPSET_5_SERIES_IBEX_PEAK;
if (content->FLMAP2 == 0) {
if (content->ISL == 23)
return CHIPSET_GEMINI_LAKE;
warn_peculiar_desc(content->ISL != 19, "Apollo Lake");
if (content->ISL == 19)
return CHIPSET_APOLLO_LAKE;
warn_peculiar_desc(content->ISL != 23, "Gemini Lake");
return CHIPSET_GEMINI_LAKE;
}
warn_peculiar_desc(true, "Ibex Peak");
warn_peculiar_desc(content->ISL != 16, "Ibex Peak");
return CHIPSET_5_SERIES_IBEX_PEAK;
} else if (upper->MDTBA == 0x00) {
if (content->ICCRIBA < 0x31 && content->FMSBA < 0x30) {
@ -949,10 +947,8 @@ static enum ich_chipset guess_ich_chipset_from_content(const struct ich_desc_con
return CHIPSET_BAYTRAIL;
if (content->MSL <= 1 && content->ISL <= 18)
return CHIPSET_6_SERIES_COUGAR_POINT;
if (content->MSL <= 1 && content->ISL <= 21)
warn_peculiar_desc(content->MSL != 1 || content->ISL != 21, "Lynx Point");
return CHIPSET_8_SERIES_LYNX_POINT;
warn_peculiar_desc(true, "Wildcat Point");
return CHIPSET_9_SERIES_WILDCAT_POINT;
}
if (content->NM == 6) {
warn_peculiar_desc(content->ICCRIBA > 0x34, "C620 series");