Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Fix a 'stupido' that stopped (amongst other...



details:   https://anonhg.NetBSD.org/src/rev/f604d587e671
branches:  trunk
changeset: 327008:f604d587e671
user:      dsl <dsl%NetBSD.org@localhost>
date:      Tue Feb 25 17:56:03 2014 +0000

description:
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.

diffstat:

 sys/arch/x86/x86/identcpu.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 57259ab36ae4 -r f604d587e671 sys/arch/x86/x86/identcpu.c
--- a/sys/arch/x86/x86/identcpu.c       Tue Feb 25 15:20:29 2014 +0000
+++ b/sys/arch/x86/x86/identcpu.c       Tue Feb 25 17:56:03 2014 +0000
@@ -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 @@
         * 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;



Home | Main Index | Thread Index | Old Index