From 107337061383dbf8848f9ac81ef56f8b56e9702e Mon Sep 17 00:00:00 2001 From: Veselin Georgiev Date: Tue, 26 Apr 2016 16:29:51 +0300 Subject: [PATCH] Related to pull request #35: Expose intel brand & model codes. The detected intel brand code and model code (arbitrary numbers, related to the detection algorithm) are printed at verbosiness level 2 or higher. You can see them with `cpuid_tool --all -vv` (if running on an Intel CPU), or, generally, when decoding Intel CPU data, e.g. `cpuid_tool --load=tests/intel/nehalem/bloomfield.test --all -vv`. --- libcpuid/recog_intel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libcpuid/recog_intel.c b/libcpuid/recog_intel.c index 34ce524..633d1b8 100644 --- a/libcpuid/recog_intel.c +++ b/libcpuid/recog_intel.c @@ -804,8 +804,12 @@ int cpuid_identify_intel(struct cpu_raw_data_t* raw, struct cpu_id_t* data) decode_intel_oldstyle_cache_info(raw, data); } decode_intel_number_of_cores(raw, data); + intel_code_t brand_code = get_brand_code(data); + intel_model_t model_code = get_model_code(data); + debugf(2, "Detected Intel brand code: %d\n", brand_code); + debugf(2, "Detected Intel model code: %d\n", model_code); match_cpu_codename(cpudb_intel, COUNT_OF(cpudb_intel), data, - get_brand_code(data), get_model_code(data)); + brand_code, model_code); return 0; }