diff --git a/ich_descriptors.c b/ich_descriptors.c
index 5d08717..ed00896 100644
--- a/ich_descriptors.c
+++ b/ich_descriptors.c
@@ -916,9 +916,10 @@
 
 /*
  * Guesses a minimum chipset version based on the maximum number of
- * soft straps per generation.
+ * soft straps per generation and presence of the MIP base (MDTBA).
  */
-static enum ich_chipset guess_ich_chipset_from_content(const struct ich_desc_content *const content)
+static enum ich_chipset guess_ich_chipset_from_content(const struct ich_desc_content *const content,
+						       const struct ich_desc_upper_map *const upper)
 {
 	if (content->ICCRIBA == 0x00) {
 		if (content->MSL == 0 && content->ISL <= 2)
@@ -937,25 +938,26 @@
 		}
 		warn_peculiar_desc(true, "Ibex Peak");
 		return CHIPSET_5_SERIES_IBEX_PEAK;
-	} else if (content->ICCRIBA < 0x31 && content->FMSBA < 0x30) {
-		if (content->MSL == 0 && content->ISL <= 17)
-			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;
-	} else if (content->ICCRIBA < 0x34) {
-		if (content->NM == 6)
+	} else if (upper->MDTBA == 0x00) {
+		if (content->ICCRIBA < 0x31 && content->FMSBA < 0x30) {
+			if (content->MSL == 0 && content->ISL <= 17)
+				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;
+		}
+		if (content->NM == 6) {
+			warn_peculiar_desc(content->ICCRIBA > 0x34, "C620 series");
 			return CHIPSET_C620_SERIES_LEWISBURG;
+		}
+		warn_peculiar_desc(content->ICCRIBA != 0x31, "100 series");
 		return CHIPSET_100_SERIES_SUNRISE_POINT;
-	} else if (content->ICCRIBA == 0x34) {
-		if (content->NM == 6)
-			return CHIPSET_C620_SERIES_LEWISBURG;
-		return CHIPSET_300_SERIES_CANNON_POINT;
 	} else {
-		msg_pwarn("Unknown flash descriptor, assuming 300 series compatibility.\n");
+		if (content->ICCRIBA != 0x34)
+			msg_pwarn("Unknown flash descriptor, assuming 300 series compatibility.\n");
 		return CHIPSET_300_SERIES_CANNON_POINT;
 	}
 }
@@ -967,9 +969,10 @@
  * tinction because of the dropped number of regions field (NR).
  */
 static enum ich_chipset guess_ich_chipset(const struct ich_desc_content *const content,
-					  const struct ich_desc_component *const component)
+					  const struct ich_desc_component *const component,
+					  const struct ich_desc_upper_map *const upper)
 {
-	const enum ich_chipset guess = guess_ich_chipset_from_content(content);
+	const enum ich_chipset guess = guess_ich_chipset_from_content(content, upper);
 
 	switch (guess) {
 	case CHIPSET_300_SERIES_CANNON_POINT:
@@ -1049,7 +1052,7 @@
 	}
 
 	if (*cs == CHIPSET_ICH_UNKNOWN) {
-		*cs = guess_ich_chipset(&desc->content, &desc->component);
+		*cs = guess_ich_chipset(&desc->content, &desc->component, &desc->upper);
 		prettyprint_ich_chipset(*cs);
 	}
 
diff --git a/ich_descriptors.h b/ich_descriptors.h
index 727a31b..274d0fe 100644
--- a/ich_descriptors.h
+++ b/ich_descriptors.h
@@ -521,7 +521,8 @@
 		struct {
 			uint32_t VTBA	:8,	/* ME VSCC Table Base Address */
 				 VTL	:8,	/* ME VSCC Table Length */
-					:16;
+					:8,
+				 MDTBA	:8;	/* MIP Descr. Table Base Addr. (new since Cannon Point/300) */
 		};
 	};
 	struct {
