From 59b36f1026090ea9b39ca2bc8386c8addf1b03d6 Mon Sep 17 00:00:00 2001 From: Anton Kochkov Date: Sat, 21 Jul 2012 07:29:48 +0400 Subject: msrtool: Factor out cpuid() from target probe functions into main() Almost all probe functions called cpuid(). Those calls are replaced by a single cpuid() call in main() and a new parameter to the target probe functions with the cpuid() result. The vendor_t and struct cpuid_t definitions are moved closer to the top of msrtool.h and the vendor_t enum is reformatted to simplify addition of further values. Change-Id: Icd615636207499cfa46b8b99bf819ef8ca2d97c0 Signed-off-by: Anton Kochkov Signed-off-by: Peter Stuge Reviewed-on: http://review.coreboot.org/1259 Tested-by: build bot (Jenkins) --- util/msrtool/intel_pentium3.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'util/msrtool/intel_pentium3.c') diff --git a/util/msrtool/intel_pentium3.c b/util/msrtool/intel_pentium3.c index 442ae3d32375..05fbbf66d7e6 100644 --- a/util/msrtool/intel_pentium3.c +++ b/util/msrtool/intel_pentium3.c @@ -19,8 +19,7 @@ #include "msrtool.h" -int intel_pentium3_probe(const struct targetdef *target) { - struct cpuid_t *id = cpuid(); +int intel_pentium3_probe(const struct targetdef *target, const struct cpuid_t *id) { return ((0x6 == id->family) && ( (0xa == id->model) || (0xb == id->model) -- cgit v1.2.3