From 942336469cb06f1a01891d64851c98618831751e Mon Sep 17 00:00:00 2001 From: Marc Balmer Date: Tue, 1 Jul 2008 11:58:51 +0000 Subject: Stricter probing: Not only check for an AMD cpu with MSRs, but make sure it is an AMD Geode LX before reading the GLD_MSR_CAP register. Problem reported by Paul Irofti, thanks. Tested by me and sthen. ok sthen. --- sys/arch/i386/i386/amdmsr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/arch/i386') diff --git a/sys/arch/i386/i386/amdmsr.c b/sys/arch/i386/i386/amdmsr.c index c957899bacb..88bc6dc17a5 100644 --- a/sys/arch/i386/i386/amdmsr.c +++ b/sys/arch/i386/i386/amdmsr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amdmsr.c,v 1.6 2008/06/29 15:18:28 ragge Exp $ */ +/* $OpenBSD: amdmsr.c,v 1.7 2008/07/01 11:58:50 mbalmer Exp $ */ /* * Copyright (c) 2008 Marc Balmer @@ -73,9 +73,10 @@ amdmsr_probe(void) model = (cpu_id >> 4) & 0xf; step = (cpu_id >> 0) & 0xf; + /* Check for AMD Geode LX CPU */ if (strcmp(cpu_vendor, "AuthenticAMD") == 0 && family == 0x5 && - (model > 0x8 || (model == 0x8 && step > 0x7))) { - /* Check for Geode LX CPU and graphics processor presence */ + model == 0x0a) { + /* Check for graphics processor presence */ gld_msr_cap = rdmsr(GLX_CPU_GLD_MSR_CAP); if (((gld_msr_cap >> 8) & 0x0fff) == GLX_CPU_DID) { gld_msr_cap = rdmsr(GLX_GP_GLD_MSR_CAP); -- cgit v1.2.3