Zen 3 smu (#652)

Thanks to @DevTechProfile
This commit is contained in:
PhyxionNL
2022-02-07 16:59:03 +01:00
committed by GitHub
parent d147bfc1fc
commit 0ed564e7c6
+20 -12
View File
@@ -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<uint, SmuSensorType>
{
// 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<uint, SmuSensorType>();
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 ==