Attention is currently required from: Michał Żygowski, Angel Pons.

Nico Huber would like Michał Żygowski and Angel Pons to review this change.

View Change

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.

Change-Id: Ic5a5fee870202173b3a9813b03ec261e8ee45155
Signed-off-by: Nico Huber <nico.h@gmx.de>
---
M ich_descriptors.c
1 file changed, 7 insertions(+), 11 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/51/55651/1
diff --git a/ich_descriptors.c b/ich_descriptors.c
index 244338d..56155e4 100644
--- a/ich_descriptors.c
+++ b/ich_descriptors.c
@@ -933,15 +933,13 @@
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");
- return CHIPSET_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 @@
return CHIPSET_BAYTRAIL;
if (content->MSL <= 1 && content->ISL <= 18)
return CHIPSET_6_SERIES_COUGAR_POINT;
- if (content->MSL <= 1 && content->ISL <= 21)
- return CHIPSET_8_SERIES_LYNX_POINT;
- warn_peculiar_desc(true, "Wildcat Point");
- return CHIPSET_9_SERIES_WILDCAT_POINT;
+ warn_peculiar_desc(content->MSL != 1 || content->ISL != 21, "Lynx Point");
+ return CHIPSET_8_SERIES_LYNX_POINT;
}
if (content->NM == 6) {
warn_peculiar_desc(content->ICCRIBA > 0x34, "C620 series");

To view, visit change 55651. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ic5a5fee870202173b3a9813b03ec261e8ee45155
Gerrit-Change-Number: 55651
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Michał Żygowski <michal.zygowski@3mdeb.com>
Gerrit-Attention: Michał Żygowski <michal.zygowski@3mdeb.com>
Gerrit-Attention: Angel Pons <th3fanbus@gmail.com>
Gerrit-MessageType: newchange