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 amdsmn(4),amdzentemp(4): Add Zen3+ Rembrand...



details:   https://anonhg.NetBSD.org/src/rev/e3cadb6a7f1c
branches:  trunk
changeset: 373268:e3cadb6a7f1c
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Sat Jan 28 12:36:52 2023 +0000

description:
amdsmn(4),amdzentemp(4): Add Zen3+ Rembrandt(19h/4xh) & Zen4 Genoa(19h/1xh).

diffstat:

 sys/arch/x86/pci/amdsmn.c     |  16 +++++++++++++---
 sys/arch/x86/pci/amdzentemp.c |  16 ++++++++++++++--
 2 files changed, 27 insertions(+), 5 deletions(-)

diffs (81 lines):

diff -r f60393f52d0a -r e3cadb6a7f1c sys/arch/x86/pci/amdsmn.c
--- a/sys/arch/x86/pci/amdsmn.c Sat Jan 28 08:45:11 2023 +0000
+++ b/sys/arch/x86/pci/amdsmn.c Sat Jan 28 12:36:52 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amdsmn.c,v 1.15 2022/12/18 15:50:32 reinoud Exp $      */
+/*     $NetBSD: amdsmn.c,v 1.16 2023/01/28 12:36:52 msaitoh Exp $      */
 
 /*-
  * Copyright (c) 2017, 2019 Conrad Meyer <cem%FreeBSD.org@localhost>
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.15 2022/12/18 15:50:32 reinoud Exp $ ");
+__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.16 2023/01/28 12:36:52 msaitoh Exp $ ");
 
 /*
  * Driver for the AMD Family 15h (model 60+) and 17h CPU
@@ -93,7 +93,17 @@
                .amdsmn_data_reg = F17H_SMN_DATA_REG,
        },
        {
-               .amdsmn_deviceid = PCI_PRODUCT_AMD_F17_7X_RC,
+               .amdsmn_deviceid = PCI_PRODUCT_AMD_F17_7X_RC, /* or F19_0X */
+               .amdsmn_addr_reg = F17H_SMN_ADDR_REG,
+               .amdsmn_data_reg = F17H_SMN_DATA_REG,
+       },
+       {
+               .amdsmn_deviceid = PCI_PRODUCT_AMD_F17_AX_RC, /* or F19_4X */
+               .amdsmn_addr_reg = F17H_SMN_ADDR_REG,
+               .amdsmn_data_reg = F17H_SMN_DATA_REG,
+       },
+       {
+               .amdsmn_deviceid = PCI_PRODUCT_AMD_F19_1X_RC,
                .amdsmn_addr_reg = F17H_SMN_ADDR_REG,
                .amdsmn_data_reg = F17H_SMN_DATA_REG,
        },
diff -r f60393f52d0a -r e3cadb6a7f1c sys/arch/x86/pci/amdzentemp.c
--- a/sys/arch/x86/pci/amdzentemp.c     Sat Jan 28 08:45:11 2023 +0000
+++ b/sys/arch/x86/pci/amdzentemp.c     Sat Jan 28 12:36:52 2023 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: amdzentemp.c,v 1.17 2023/01/28 07:45:21 msaitoh Exp $ */
+/*      $NetBSD: amdzentemp.c,v 1.18 2023/01/28 12:36:52 msaitoh Exp $ */
 /*      $OpenBSD: kate.c,v 1.2 2008/03/27 04:52:03 cnst Exp $   */
 
 /*
@@ -53,7 +53,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdzentemp.c,v 1.17 2023/01/28 07:45:21 msaitoh Exp $ ");
+__KERNEL_RCSID(0, "$NetBSD: amdzentemp.c,v 1.18 2023/01/28 12:36:52 msaitoh Exp $ ");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -121,6 +121,10 @@
        CCD5,
        CCD6,
        CCD7,
+       CCD8,
+       CCD9,
+       CCD10,
+       CCD11,
        CCD_MAX,
        NUM_CCDS = CCD_MAX - CCD_BASE
 };
@@ -402,6 +406,14 @@
                sc->sc_ccd_offset = 0x308;
                maxreg = 8;
                break;
+       case 0x40 ... 0x4f: /* Zen3+ "Rembrandt" */
+               sc->sc_ccd_offset = 0x300;
+               maxreg = 8;
+               break;
+       case 0x10 ... 0x1f: /* Zen4 "Genoa" */
+               sc->sc_ccd_offset = 0x300;
+               maxreg = 12;
+               break;
        default:
                aprint_error_dev(sc->sc_dev,
                    "Unrecognized Family 19h Model: %02xh\n", model);



Home | Main Index | Thread Index | Old Index