summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorMarc Balmer <mbalmer@cvs.openbsd.org>2008-07-01 11:58:51 +0000
committerMarc Balmer <mbalmer@cvs.openbsd.org>2008-07-01 11:58:51 +0000
commit942336469cb06f1a01891d64851c98618831751e (patch)
treed9e564b01bcc5eeebe7f34f0b3bdac1347cb4895 /sys/arch/i386
parent59f693bd178fa7f6d7e655d5bd268521d4de55eb (diff)
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.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/amdmsr.c7
1 files changed, 4 insertions, 3 deletions
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 <mbalmer@openbsd.org>
@@ -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);