From d7ea82e9f069ef2fcef7d369ab96643a334a3c3d Mon Sep 17 00:00:00 2001 From: ad Date: Tue, 15 Jan 2008 16:11:29 +0000 Subject: [PATCH] Fix i486 support which has been broken for the last 9 months. --- sys/arch/i386/i386/identcpu.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/arch/i386/i386/identcpu.c b/sys/arch/i386/i386/identcpu.c index ad9d149f2008..ec7983cbba4f 100644 --- a/sys/arch/i386/i386/identcpu.c +++ b/sys/arch/i386/i386/identcpu.c @@ -1,4 +1,4 @@ -/* $NetBSD: identcpu.c,v 1.86 2008/01/01 20:32:10 yamt Exp $ */ +/* $NetBSD: identcpu.c,v 1.87 2008/01/15 16:11:29 ad Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2006, 2007 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.86 2008/01/01 20:32:10 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.87 2008/01/15 16:11:29 ad Exp $"); #include "opt_enhanced_speedstep.h" #include "opt_intel_odcm.h" @@ -1504,8 +1504,6 @@ identifycpu(struct cpu_info *ci) ci->ci_cpu_serial[2] / 65536, ci->ci_cpu_serial[2] % 65536); } - identifycpu_cpuids(ci); - if (cpu_class == CPUCLASS_386) { panic("NetBSD requires an 80486 or later processor"); } @@ -1522,6 +1520,14 @@ identifycpu(struct cpu_info *ci) #endif } + /* + * Everything past this point requires a Pentium or later. + */ + if (ci->ci_cpuid_level < 0) + return; + + identifycpu_cpuids(ci); + /* * If we have FXSAVE/FXRESTOR, use them. */