[coreboot-gerrit] Change in coreboot[master]: mstrool: only use intel targets for actual intel CPUs

Philipp Deppenwiese (Code Review) gerrit at coreboot.org
Sun May 13 12:07:17 CEST 2018


Philipp Deppenwiese has submitted this change and it was merged. ( https://review.coreboot.org/18256 )

Change subject: mstrool: only use intel targets for actual intel CPUs
......................................................................

mstrool: only use intel targets for actual intel CPUs

VIA c3 & C7 use the the family of 0x6 and model 10, but are not quite
Pentium III.

Change-Id: I85e9853b42cfd20db46db0bd244620d6813bc826
Signed-off-by: Lubomir Rintel <lkundrak at v3.sk>
Reviewed-on: https://review.coreboot.org/18256
Reviewed-by: Martin Roth <martinroth at google.com>
Tested-by: build bot (Jenkins) <no-reply at coreboot.org>
---
M util/msrtool/intel_atom.c
M util/msrtool/intel_core1.c
M util/msrtool/intel_core2_early.c
M util/msrtool/intel_core2_later.c
M util/msrtool/intel_nehalem.c
M util/msrtool/intel_pentium3.c
M util/msrtool/intel_pentium3_early.c
M util/msrtool/intel_pentium4_early.c
M util/msrtool/intel_pentium4_later.c
9 files changed, 23 insertions(+), 10 deletions(-)

Approvals:
  build bot (Jenkins): Verified
  Martin Roth: Looks good to me, approved



diff --git a/util/msrtool/intel_atom.c b/util/msrtool/intel_atom.c
index c055f4c..2d89c9c 100644
--- a/util/msrtool/intel_atom.c
+++ b/util/msrtool/intel_atom.c
@@ -16,8 +16,9 @@
 #include "msrtool.h"
 
 int intel_atom_probe(const struct targetdef *target, const struct cpuid_t *id) {
-	return (0x6 == id->family) &&
-		(0x1c == id->model);
+	return ((VENDOR_INTEL == id->vendor) &&
+		(0x6 == id->family) &&
+		(0x1c == id->model));
 }
 
 const struct msrdef intel_atom_msrs[] = {
diff --git a/util/msrtool/intel_core1.c b/util/msrtool/intel_core1.c
index ef2b660..039a2f8 100644
--- a/util/msrtool/intel_core1.c
+++ b/util/msrtool/intel_core1.c
@@ -16,7 +16,9 @@
 #include "msrtool.h"
 
 int intel_core1_probe(const struct targetdef *target, const struct cpuid_t *id) {
-	return ((0x6 == id->family) && (0xe == id->model));
+	return ((VENDOR_INTEL == id->vendor) &&
+		(0x6 == id->family) &&
+		(0xe == id->model));
 }
 
 const struct msrdef intel_core1_msrs[] = {
diff --git a/util/msrtool/intel_core2_early.c b/util/msrtool/intel_core2_early.c
index a9b742f..1072624 100644
--- a/util/msrtool/intel_core2_early.c
+++ b/util/msrtool/intel_core2_early.c
@@ -16,7 +16,9 @@
 #include "msrtool.h"
 
 int intel_core2_early_probe(const struct targetdef *target, const struct cpuid_t *id) {
-	return ((0x6 == id->family) && (0xf == id->model));
+	return ((VENDOR_INTEL == id->vendor) &&
+		(0x6 == id->family) &&
+		(0xf == id->model));
 }
 
 const struct msrdef intel_core2_early_msrs[] = {
diff --git a/util/msrtool/intel_core2_later.c b/util/msrtool/intel_core2_later.c
index 3cb28c6..ad353eb 100644
--- a/util/msrtool/intel_core2_later.c
+++ b/util/msrtool/intel_core2_later.c
@@ -16,7 +16,9 @@
 #include "msrtool.h"
 
 int intel_core2_later_probe(const struct targetdef *target, const struct cpuid_t *id) {
-	return ((0x6 == id->family)&(0x17 == id->model));
+	return ((VENDOR_INTEL == id->vendor) &&
+		(0x6 == id->family) &&
+		(0x17 == id->model));
 }
 
 const struct msrdef intel_core2_later_msrs[] = {
diff --git a/util/msrtool/intel_nehalem.c b/util/msrtool/intel_nehalem.c
index c133653..679efb5 100644
--- a/util/msrtool/intel_nehalem.c
+++ b/util/msrtool/intel_nehalem.c
@@ -16,7 +16,8 @@
 #include "msrtool.h"
 
 int intel_nehalem_probe(const struct targetdef *target, const struct cpuid_t *id) {
-	return ((0x6 == id->family) && (
+	return ((VENDOR_INTEL == id->vendor) &&
+		(0x6 == id->family) && (
 		(0x1a == id->model) ||
 		(0x1e == id->model) ||
 		(0x1f == id->model) ||
diff --git a/util/msrtool/intel_pentium3.c b/util/msrtool/intel_pentium3.c
index 456963f..6b12428 100644
--- a/util/msrtool/intel_pentium3.c
+++ b/util/msrtool/intel_pentium3.c
@@ -16,7 +16,8 @@
 #include "msrtool.h"
 
 int intel_pentium3_probe(const struct targetdef *target, const struct cpuid_t *id) {
-	return ((0x6 == id->family) && (
+	return ((VENDOR_INTEL == id->vendor) &&
+		(0x6 == id->family) && (
 		(0xa == id->model) ||
 		(0xb == id->model)
 		));
diff --git a/util/msrtool/intel_pentium3_early.c b/util/msrtool/intel_pentium3_early.c
index 925b24f..afdc62e 100644
--- a/util/msrtool/intel_pentium3_early.c
+++ b/util/msrtool/intel_pentium3_early.c
@@ -16,7 +16,8 @@
 #include "msrtool.h"
 
 int intel_pentium3_early_probe(const struct targetdef *target, const struct cpuid_t *id) {
-	return ((0x6 == id->family) && (
+	return ((VENDOR_INTEL == id->vendor) &&
+		(0x6 == id->family) && (
 		(0x7 == id->model) ||
 		(0x8 == id->model)
 		));
diff --git a/util/msrtool/intel_pentium4_early.c b/util/msrtool/intel_pentium4_early.c
index 537d9e3..649be04 100644
--- a/util/msrtool/intel_pentium4_early.c
+++ b/util/msrtool/intel_pentium4_early.c
@@ -16,7 +16,9 @@
 #include "msrtool.h"
 
 int intel_pentium4_early_probe(const struct targetdef *target, const struct cpuid_t *id) {
-	return ((0xf == id->family) && (0x2 == id->model));
+	return ((VENDOR_INTEL == id->vendor) &&
+		(0xf == id->family) &&
+		(0x2 == id->model));
 }
 
 const struct msrdef intel_pentium4_early_msrs[] = {
diff --git a/util/msrtool/intel_pentium4_later.c b/util/msrtool/intel_pentium4_later.c
index cc85f65..5444161 100644
--- a/util/msrtool/intel_pentium4_later.c
+++ b/util/msrtool/intel_pentium4_later.c
@@ -16,7 +16,8 @@
 #include "msrtool.h"
 
 int intel_pentium4_later_probe(const struct targetdef *target, const struct cpuid_t *id) {
-	return ((0xf == id->family) && (
+	return ((VENDOR_INTEL == id->vendor) &&
+		(0xf == id->family) && (
 		(0x3 == id->model) ||
 		(0x4 == id->model)
 		));

-- 
To view, visit https://review.coreboot.org/18256
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I85e9853b42cfd20db46db0bd244620d6813bc826
Gerrit-Change-Number: 18256
Gerrit-PatchSet: 5
Gerrit-Owner: Lubomir Rintel <lkundrak at v3.sk>
Gerrit-Reviewer: Martin Roth <martinroth at google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki at gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180513/e2e74f0f/attachment.html>


More information about the coreboot-gerrit mailing list