Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/pci Added support for AMD family 16h cpu sensor...



details:   https://anonhg.NetBSD.org/src/rev/f88ed8da7100
branches:  trunk
changeset: 446631:f88ed8da7100
user:      is <is%NetBSD.org@localhost>
date:      Wed Dec 12 23:35:04 2018 +0000

description:
Added support for AMD family 16h cpu sensors - (just like 10h-14h).
(Tested on netbsd-8.0 release.)

diffstat:

 sys/arch/x86/pci/amdnb_misc.c |  6 ++++--
 sys/arch/x86/pci/amdtemp.c    |  9 ++++++---
 2 files changed, 10 insertions(+), 5 deletions(-)

diffs (78 lines):

diff -r 90111cdfb5ff -r f88ed8da7100 sys/arch/x86/pci/amdnb_misc.c
--- a/sys/arch/x86/pci/amdnb_misc.c     Wed Dec 12 23:26:00 2018 +0000
+++ b/sys/arch/x86/pci/amdnb_misc.c     Wed Dec 12 23:35:04 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amdnb_misc.c,v 1.2 2012/04/16 16:07:24 cegger Exp $ */
+/*     $NetBSD: amdnb_misc.c,v 1.3 2018/12/12 23:35:04 is Exp $ */
 /*
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdnb_misc.c,v 1.2 2012/04/16 16:07:24 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdnb_misc.c,v 1.3 2018/12/12 23:35:04 is Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -67,6 +67,8 @@
        case PCI_PRODUCT_AMD_AMD64_F11_MISC:
        case PCI_PRODUCT_AMD_F14_NB:            /* Family 12h, too */
        case PCI_PRODUCT_AMD_F15_MISC:
+       case PCI_PRODUCT_AMD_F16_NB:
+       case PCI_PRODUCT_AMD_F16_30_NB:
                break;
        default:
                return 0;
diff -r 90111cdfb5ff -r f88ed8da7100 sys/arch/x86/pci/amdtemp.c
--- a/sys/arch/x86/pci/amdtemp.c        Wed Dec 12 23:26:00 2018 +0000
+++ b/sys/arch/x86/pci/amdtemp.c        Wed Dec 12 23:35:04 2018 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: amdtemp.c,v 1.21 2018/09/27 14:59:43 maxv Exp $ */
+/*      $NetBSD: amdtemp.c,v 1.22 2018/12/12 23:35:04 is Exp $ */
 /*      $OpenBSD: kate.c,v 1.2 2008/03/27 04:52:03 cnst Exp $   */
 
 /*
@@ -47,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdtemp.c,v 1.21 2018/09/27 14:59:43 maxv Exp $ ");
+__KERNEL_RCSID(0, "$NetBSD: amdtemp.c,v 1.22 2018/12/12 23:35:04 is Exp $ ");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -206,7 +206,7 @@
        }
 
        /* Not yet supported CPUs. */
-       if (family > 0x15)
+       if (family > 0x16)
                return 0;
 
        return 1;
@@ -251,6 +251,7 @@
        case 0x12: /* AMD Lynx/Sabine (Llano) */
        case 0x14: /* AMD Brazos (Ontario/Zacate/Desna) */
        case 0x15:
+       case 0x16:
                amdtemp_family10_init(sc);
                break;
 
@@ -278,6 +279,7 @@
        case 0x12:
        case 0x14:
        case 0x15:
+       case 0x16:
                amdtemp_family10_setup_sensors(sc, device_unit(self));
                break;
        }
@@ -305,6 +307,7 @@
        case 0x12:
        case 0x14:
        case 0x15:
+       case 0x16:
                sc->sc_sme->sme_refresh = amdtemp_family10_refresh;
                break;
        }



Home | Main Index | Thread Index | Old Index