summaryrefslogtreecommitdiff
path: root/usr/src/uts/intel/io/amdzen/smntemp.c
diff options
context:
space:
mode:
authorKeith M Wesolowski <wesolows@oxide.computer>2022-07-21 06:57:54 -0700
committerRobert Mustacchi <rm@fingolfin.org>2022-09-11 04:06:00 +0000
commitba215efe42e70993d3838f7af671f9d9fc0ebc33 (patch)
tree69ccaa0a7d42ba0e7ced50b2aceb61cc3f0977e4 /usr/src/uts/intel/io/amdzen/smntemp.c
parent56726c7e321b6e5ecb2f10215f5386016547e68c (diff)
downloadillumos-joyent-ba215efe42e70993d3838f7af671f9d9fc0ebc33.tar.gz
14936 need a better SMN addressing mechanism
Reviewed by: Robert Mustacchi <rm@fingolfin.org> Reviewed by: Andy Fiddaman <illumos@fiddaman.net> Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/uts/intel/io/amdzen/smntemp.c')
-rw-r--r--usr/src/uts/intel/io/amdzen/smntemp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/src/uts/intel/io/amdzen/smntemp.c b/usr/src/uts/intel/io/amdzen/smntemp.c
index aa595f5ce5..94b7aa8b83 100644
--- a/usr/src/uts/intel/io/amdzen/smntemp.c
+++ b/usr/src/uts/intel/io/amdzen/smntemp.c
@@ -11,7 +11,7 @@
/*
* Copyright 2019, Joyent, Inc.
- * Copyright 2020 Oxide Computer Company
+ * Copyright 2022 Oxide Computer Company
*/
/*
@@ -31,6 +31,7 @@
#include <sys/cpuvar.h>
#include <sys/sensors.h>
#include <sys/sysmacros.h>
+#include <sys/amdzen/smn.h>
#include <amdzen_client.h>
/*
@@ -39,7 +40,7 @@
* accessed through the northbridge. They are not addresses in PCI configuration
* space.
*/
-#define SMN_SMU_THERMAL_CURTEMP 0x00059800
+#define SMN_SMU_THERMAL_CURTEMP SMN_MAKE_REG(0x00059800)
#define SMN_SMU_THERMAL_CURTEMP_TEMPERATURE(x) ((x) >> 21)
#define SMN_SMU_THERMAL_CURTEMP_RANGE_SEL (1 << 19)