Module Name:    src
Committed By:   is
Date:           Wed Dec 12 23:35:04 UTC 2018

Modified Files:
        src/sys/arch/x86/pci: amdnb_misc.c amdtemp.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x86/pci/amdnb_misc.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/x86/pci/amdtemp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/pci/amdnb_misc.c
diff -u src/sys/arch/x86/pci/amdnb_misc.c:1.2 src/sys/arch/x86/pci/amdnb_misc.c:1.3
--- src/sys/arch/x86/pci/amdnb_misc.c:1.2	Mon Apr 16 16:07:24 2012
+++ src/sys/arch/x86/pci/amdnb_misc.c	Wed Dec 12 23:35:04 2018
@@ -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 @@ amdnb_misc_match(device_t parent, cfdata
 	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;

Index: src/sys/arch/x86/pci/amdtemp.c
diff -u src/sys/arch/x86/pci/amdtemp.c:1.21 src/sys/arch/x86/pci/amdtemp.c:1.22
--- src/sys/arch/x86/pci/amdtemp.c:1.21	Thu Sep 27 14:59:43 2018
+++ src/sys/arch/x86/pci/amdtemp.c	Wed Dec 12 23:35:04 2018
@@ -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 @@ amdtemp_match(device_t parent, cfdata_t 
 	}
 
 	/* Not yet supported CPUs. */
-	if (family > 0x15)
+	if (family > 0x16)
 		return 0;
 
 	return 1;
@@ -251,6 +251,7 @@ amdtemp_attach(device_t parent, device_t
 	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 @@ amdtemp_attach(device_t parent, device_t
 	case 0x12:
 	case 0x14:
 	case 0x15:
+	case 0x16:
 		amdtemp_family10_setup_sensors(sc, device_unit(self));
 		break;
 	}
@@ -305,6 +307,7 @@ amdtemp_attach(device_t parent, device_t
 	case 0x12:
 	case 0x14:
 	case 0x15:
+	case 0x16:
 		sc->sc_sme->sme_refresh = amdtemp_family10_refresh;
 		break;
 	}

Reply via email to