Module Name:    src
Committed By:   dsl
Date:           Tue Feb 25 17:56:03 UTC 2014

Modified Files:
        src/sys/arch/x86/x86: identcpu.c

Log Message:
Fix a 'stupido' that stopped (amongst other things) the cpu brand string
  being read.
The most obvious side effect the anita tests failed to detect they were
  running under qemu - so reported failures under qemu for things
  that qemu doesn't support.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/x86/x86/identcpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/identcpu.c
diff -u src/sys/arch/x86/x86/identcpu.c:1.42 src/sys/arch/x86/x86/identcpu.c:1.43
--- src/sys/arch/x86/x86/identcpu.c:1.42	Sun Feb 23 22:38:40 2014
+++ src/sys/arch/x86/x86/identcpu.c	Tue Feb 25 17:56:03 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: identcpu.c,v 1.42 2014/02/23 22:38:40 dsl Exp $	*/
+/*	$NetBSD: identcpu.c,v 1.43 2014/02/25 17:56:03 dsl Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.42 2014/02/23 22:38:40 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.43 2014/02/25 17:56:03 dsl Exp $");
 
 #include "opt_xen.h"
 
@@ -833,7 +833,7 @@ cpu_probe(struct cpu_info *ci)
 	 * match with those generated by modern intel cpus.
 	 */
 	x86_cpuid(0x80000000, descs);
-	if (descs[0] == 0x80000000)
+	if (descs[0] >= 0x80000000)
 		ci->ci_max_ext_cpuid = descs[0];
 	else
 		ci->ci_max_ext_cpuid = 0;

Reply via email to