From e1434c250b131af8afd7f94c23d80a97c442375d Mon Sep 17 00:00:00 2001 From: msaitoh Date: Fri, 27 Mar 2015 05:32:38 +0000 Subject: [PATCH] Update from Intel SDM: - Add busclock values for Airmont. --- sys/arch/x86/x86/intel_busclock.c | 54 +++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/sys/arch/x86/x86/intel_busclock.c b/sys/arch/x86/x86/intel_busclock.c index 5dd41cf23817..ba98ebaee63b 100644 --- a/sys/arch/x86/x86/intel_busclock.c +++ b/sys/arch/x86/x86/intel_busclock.c @@ -1,4 +1,4 @@ -/* $NetBSD: intel_busclock.c,v 1.20 2014/12/17 03:39:02 msaitoh Exp $ */ +/* $NetBSD: intel_busclock.c,v 1.21 2015/03/27 05:32:38 msaitoh Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_busclock.c,v 1.20 2014/12/17 03:39:02 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_busclock.c,v 1.21 2015/03/27 05:32:38 msaitoh Exp $"); #include #include @@ -272,6 +272,56 @@ p3_get_bus_clock(struct cpu_info *ci) goto print_msr; } break; + case 0x4c: /* Airmont */ + if (rdmsr_safe(MSR_FSB_FREQ, &msr) == EFAULT) { + aprint_debug_dev(ci->ci_dev, + "unable to determine bus speed"); + goto print_msr; + } + bus = (msr >> 0) & 0xf; + switch (bus) { + case 0: + bus_clock = 8333; + break; + case 1: + bus_clock = 10000; + break; + case 2: + bus_clock = 13333; + break; + case 3: + bus_clock = 11650; + break; + case 4: + bus_clock = 8333; + break; + case 5: + bus_clock = 10000; + break; + case 6: + bus_clock = 13333; + break; + case 7: + bus_clock = 11666; + break; + case 12: + bus_clock = 8000; + break; + case 13: + bus_clock = 9333; + break; + case 14: + bus_clock = 9000; + break; + case 15: + bus_clock = 8888; + break; + default: + aprint_debug("%s: unknown Airmont FSB_FREQ value %d", + device_xname(ci->ci_dev), bus); + goto print_msr; + } + break; default: aprint_debug("%s: unknown i686 model %02x, can't get bus clock", device_xname(ci->ci_dev),