From patchwork Mon Dec 5 18:20:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/1] cpu: msr: disabled test for non-Intel/AMD architectures X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 129391 Message-Id: <1323109229-15402-2-git-send-email-colin.king@canonical.com> To: fwts-devel@lists.ubuntu.com Date: Mon, 5 Dec 2011 18:20:29 +0000 From: Colin King List-Id: Firmware Test Suite Development From: Colin Ian King Signed-off-by: Colin Ian King --- src/cpu/msr/msr.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/cpu/msr/msr.c b/src/cpu/msr/msr.c index d2c16a8..06a756f 100644 --- a/src/cpu/msr/msr.c +++ b/src/cpu/msr/msr.c @@ -19,6 +19,8 @@ #include "fwts.h" +#ifdef FWTS_ARCH_INTEL + typedef void (*msr_callback_check)(fwts_framework *fw, uint64_t val); static int ncpus; @@ -32,6 +34,10 @@ static int msr_init(fwts_framework *fw) fwts_log_error(fw, "Cannot get CPU info"); return FWTS_ERROR; } + if (cpuinfo->vendor_id == NULL) { + fwts_log_error(fw, "Cannot get CPU vendor_id"); + return FWTS_ERROR; + } intel_cpu = strstr(cpuinfo->vendor_id, "Intel") != NULL; amd_cpu = strstr(cpuinfo->vendor_id, "AuthenticAMD") != NULL; @@ -555,3 +561,5 @@ static fwts_framework_ops msr_ops = { }; FWTS_REGISTER(msr, &msr_ops, FWTS_TEST_ANYTIME, FWTS_BATCH | FWTS_ROOT_PRIV); + +#endif