From 0ed564e7c68bf644b23faf8e61d5c6ea75efd4f2 Mon Sep 17 00:00:00 2001 From: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com> Date: Mon, 7 Feb 2022 16:59:03 +0100 Subject: [PATCH] Zen 3 smu (#652) Thanks to @DevTechProfile --- LibreHardwareMonitorLib/Hardware/RyzenSMU.cs | 32 ++++++++++++-------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/LibreHardwareMonitorLib/Hardware/RyzenSMU.cs b/LibreHardwareMonitorLib/Hardware/RyzenSMU.cs index d9a0d5e..444a073 100644 --- a/LibreHardwareMonitorLib/Hardware/RyzenSMU.cs +++ b/LibreHardwareMonitorLib/Hardware/RyzenSMU.cs @@ -71,6 +71,26 @@ namespace LibreHardwareMonitor.Hardware //{ 192, new SmuSensorType { Name = "Core #5", Type = SensorType.Clock, Scale = 1000 } }, //{ 193, new SmuSensorType { Name = "Core #6", Type = SensorType.Clock, Scale = 1000 } }, } + }, + { + // Zen 3. + 0x00380805, new Dictionary + { + // TDC and EDC don't match the HWiNFO values + //{ 15, new SmuSensorType { Name = "TDC", Type = SensorType.Current, Scale = 1 } }, + //{ 21, new SmuSensorType { Name = "EDC", Type = SensorType.Current, Scale = 1 } }, + { 48, new SmuSensorType { Name = "Fabric", Type = SensorType.Clock, Scale = 1 } }, + { 50, new SmuSensorType { Name = "Uncore", Type = SensorType.Clock, Scale = 1 } }, + { 51, new SmuSensorType { Name = "Memory", Type = SensorType.Clock, Scale = 1 } }, + //{ 115, new SmuSensorType { Name = "SoC", Type = SensorType.Temperature, Scale = 1 } }, + //{ 66, new SmuSensorType { Name = "Bus Speed", Type = SensorType.Clock, Scale = 1 } }, + //{ 188, new SmuSensorType { Name = "Core #1", Type = SensorType.Clock, Scale = 1000 } }, + //{ 189, new SmuSensorType { Name = "Core #2", Type = SensorType.Clock, Scale = 1000 } }, + //{ 190, new SmuSensorType { Name = "Core #3", Type = SensorType.Clock, Scale = 1000 } }, + //{ 191, new SmuSensorType { Name = "Core #4", Type = SensorType.Clock, Scale = 1000 } }, + //{ 192, new SmuSensorType { Name = "Core #5", Type = SensorType.Clock, Scale = 1000 } }, + //{ 193, new SmuSensorType { Name = "Core #6", Type = SensorType.Clock, Scale = 1000 } }, + } } }; @@ -256,7 +276,6 @@ namespace LibreHardwareMonitor.Hardware if (SendCommand(0x02, ref args)) return args[0]; - return 0; } @@ -265,7 +284,6 @@ namespace LibreHardwareMonitor.Hardware if (!IsPmTableLayoutDefined()) return new Dictionary(); - return _supportedPmTableVersions[_pmTableVersion]; } @@ -279,7 +297,6 @@ namespace LibreHardwareMonitor.Hardware if (!_supportedCPU || !TransferTableToDram()) return new float[] { 0 }; - float[] table = ReadDramToArray(); // Fix for Zen+ empty values on first call. @@ -320,7 +337,6 @@ namespace LibreHardwareMonitor.Hardware if (!GetPmTableVersion(ref _pmTableVersion)) return; - switch (_cpuCodeName) { case CpuCodeName.Matisse: @@ -511,7 +527,6 @@ namespace LibreHardwareMonitor.Hardware if (!command) return; - _dramBaseAddr = args[0] | (args[1] << 32); } @@ -523,13 +538,11 @@ namespace LibreHardwareMonitor.Hardware if (!command) return; - args = new uint[] { 0 }; command = SendCommand(fn[1], ref args); if (!command) return; - _dramBaseAddr = args[0]; } @@ -543,13 +556,11 @@ namespace LibreHardwareMonitor.Hardware if (!command) return; - args = new uint[] { 3 }; command = SendCommand(fn[2], ref args); if (!command) return; - // 1st Base. parts[0] = args[0]; // == Part 1 End == @@ -560,19 +571,16 @@ namespace LibreHardwareMonitor.Hardware if (!command) return; - args = new uint[] { 5 }; command = SendCommand(fn[0], ref args); if (!command) return; - args = new uint[] { 5 }; command = SendCommand(fn[2], ref args); if (!command) return; - // 2nd base. parts[1] = args[0]; // == Part 2 End ==