summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@fingolfin.org>2020-09-26 11:16:12 -0700
committerRobert Mustacchi <rm@fingolfin.org>2020-11-02 08:22:45 -0800
commite9abe9d6424a9213df11b3243f6957e6a0b91e48 (patch)
tree4f97701ec4db98975b0b1955643bef6379cd3eb5 /usr/src
parent5edbd2fec7b63b423df5bd21c4b0f7b775123a40 (diff)
downloadillumos-joyent-e9abe9d6424a9213df11b3243f6957e6a0b91e48.tar.gz
13235 amdzen(7D) support for Zen 3
Reviewed by: C Fraire <cfraire@me.com> Reviewed by: Patrick Mooney <pmooney@pfmooney.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/man/man7d/amdzen.7d46
-rw-r--r--usr/src/pkg/manifests/driver-cpu-amd-zen.mf17
-rw-r--r--usr/src/uts/intel/io/amdzen/amdzen.c16
3 files changed, 64 insertions, 15 deletions
diff --git a/usr/src/man/man7d/amdzen.7d b/usr/src/man/man7d/amdzen.7d
index 171d36b0d6..7c24b7106a 100644
--- a/usr/src/man/man7d/amdzen.7d
+++ b/usr/src/man/man7d/amdzen.7d
@@ -11,7 +11,7 @@
.\"
.\" Copyright 2020 Oxide Computer Company
.\"
-.Dd September 1, 2020
+.Dd September 26, 2020
.Dt AMDZEN 7D
.Os
.Sh NAME
@@ -20,13 +20,29 @@
.Nd AMD Zen Nexus Driver
.Sh DESCRIPTION
The
-.Sy amdzen
-driver provides access to the AMD Zen, Zen+, and Zen 2
+.Nm
+driver provides access to the Northbridge, Data Fabric, and System
+Management Network
+.Pq SMN
+for a number of AMD processor lines, including AMD Ryzen CPUs and APUs,
+ThreadRipper CPUs, and EPYC CPUs from the following families:
+.Bl -bullet
+.It
+AMD Zen Naples, Summit Ridge, Whitehaven
+.Pq Family 17h
+.It
+AMD Zen+ Colfax, Picasso, and Pinnacle Ridge
.Pq Family 17h
-processor families Northbridge, Data Fabric, and System Management Network
-.Pq SMN .
-This driver is a nexus driver and facilitates access to these devices
-between various other devices such as
+.It
+AMD Zen 2 Castle Peak, Matisse, Rome, and Renoir
+.Pq Family 17h
+.It
+AMD Zen 3 Milan and Vermeer
+.Pq Family 19h
+.El
+.Pp
+This driver is a nexus driver and facilitates access to the northbridge,
+data fabric, and SMN between various other devices such as
.Xr smntemp 7D .
The various processor devices that make up the northbridge and data
fabric have the
@@ -36,6 +52,20 @@ The different devices are all amalgamated and a single uniform view is
provided by the
.Sy amdzen
driver.
+.Pp
+The
+.Nm
+driver is a nexus driver that has the following children:
+.Bl -tag -width "smntemp(7D)"
+.It Xr smntemp 7D
+Provides access to on-die temperature sensors.
+.It Xr usmn 7D
+Provides read access to the SMN.
+This driver is intended for development purposes.
+.It Xr zen_udf 7D
+Provides read access to the data fabric.
+This driver is intended for development purposes.
+.El
.Sh ARCHITECTURE
The
.Sy amdzen
@@ -43,7 +73,7 @@ and
.Sy amdzen_stub
drivers are limited to
.Sy x86
-platforms with AMD Family 17h processors.
+platforms with AMD Family 17h and 19h processors.
.Sh SEE ALSO
.Xr smntemp 7D ,
.Xr usmn 7D ,
diff --git a/usr/src/pkg/manifests/driver-cpu-amd-zen.mf b/usr/src/pkg/manifests/driver-cpu-amd-zen.mf
index df4adf3339..d0bb700cfb 100644
--- a/usr/src/pkg/manifests/driver-cpu-amd-zen.mf
+++ b/usr/src/pkg/manifests/driver-cpu-amd-zen.mf
@@ -27,15 +27,16 @@ dir path=usr/share/man
dir path=usr/share/man/man7d
driver name=amdzen
#
-# 1440-1447: f17h m70-7fh df
+# 1440-1447: f17h m70-7fh, f19h m20-2f df
# 1448-144f: f17h m60-6fh df
# 1450: f17h m00-0f nb
# 1460-1467: f17h m00-0f df
-# 1480: f17h m30-3f/70-7f nb
-# 1490-1497: f17h m30-3f nb
+# 1480: f17h m30-3f/70-7f, f19h m00-0f, m20-2f nb
+# 1490-1497: f17h m30-3f df
# 15d0: f17h m10-m2f nb
# 15e8-15ef: f17h m10-m2f df
# 1630: f17h m60-6f nb
+# 1650-1657: f19h m00-0f df
#
driver name=amdzen_stub \
alias=pci1022,1440,p \
@@ -81,7 +82,15 @@ driver name=amdzen_stub \
alias=pci1022,15ed,p \
alias=pci1022,15ee,p \
alias=pci1022,15ef,p \
- alias=pci1022,1630,p
+ alias=pci1022,1630,p \
+ alias=pci1022,1650,p \
+ alias=pci1022,1651,p \
+ alias=pci1022,1652,p \
+ alias=pci1022,1653,p \
+ alias=pci1022,1654,p \
+ alias=pci1022,1655,p \
+ alias=pci1022,1656,p \
+ alias=pci1022,1657,p
file path=kernel/drv/$(ARCH64)/amdzen group=sys
file path=kernel/drv/$(ARCH64)/amdzen_stub group=sys
file path=kernel/drv/amdzen.conf group=sys
diff --git a/usr/src/uts/intel/io/amdzen/amdzen.c b/usr/src/uts/intel/io/amdzen/amdzen.c
index 25e38ee988..ac6ce9c94f 100644
--- a/usr/src/uts/intel/io/amdzen/amdzen.c
+++ b/usr/src/uts/intel/io/amdzen/amdzen.c
@@ -144,7 +144,7 @@ static const uint16_t amdzen_nb_ids[] = {
0x1450,
/* Family 17h Raven Ridge, Kestrel, Dali Models 10h-2fh (Zen uarch) */
0x15d0,
- /* Family 17h Epyc Models 30h-3fh, Matisse 70-7fh (Zen 2 uarch) */
+ /* Family 17h/19h Rome, Milan, Matisse, Vermeer Zen 2/Zen 3 uarch */
0x1480,
/* Family 17h Renoir Models 60-6fh (Zen 2 uarch) */
0x1630
@@ -436,6 +436,16 @@ static const uint8_t amdzen_df_rome_ids[0x2b] = {
};
/*
+ * Check the first df entry to see if it belongs to Rome or Milan. If so, then
+ * it uses the disjoint ID space.
+ */
+static boolean_t
+amdzen_is_rome_style(uint_t id)
+{
+ return (id == 0x1490 || id == 0x1650);
+}
+
+/*
* Initialize our knowledge about a given series of nodes on the data fabric.
*/
static void
@@ -464,11 +474,11 @@ amdzen_setup_df(amdzen_t *azn, amdzen_df_t *df)
* indexes that we iterate over, though the total number of
* entries is right.
*/
- if (df->adf_funcs[0]->azns_did == 0x1490) {
+ if (amdzen_is_rome_style(df->adf_funcs[0]->azns_did)) {
if (inst > ARRAY_SIZE(amdzen_df_rome_ids)) {
dev_err(azn->azn_dip, CE_WARN, "Rome family "
"processor reported more ids than the PPR, "
- "resting %u to instance zero", inst);
+ "resetting %u to instance zero", inst);
inst = 0;
} else {
inst = amdzen_df_rome_ids[inst];