Skip to content

Commit

Permalink
AMD SMU backend bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesCJ60 committed Aug 31, 2023
1 parent 1764b22 commit e27a4b4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Universal x86 Tuning Utility"
"ProductCode" = "8:{3EEA7625-DF93-48AE-972D-4599F116FE2E}"
"PackageCode" = "8:{05E20451-D6F4-431E-BBA5-078D26DA2B86}"
"ProductCode" = "8:{E6A74109-97CE-44C4-91D3-DAEBF88110E1}"
"PackageCode" = "8:{0F972A41-CC40-41B0-B48F-A5A17E5F32DC}"
"UpgradeCode" = "8:{300E743A-4C69-440D-9425-14C446AB2658}"
"AspNetVersion" = "8:"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:2.0.2"
"ProductVersion" = "8:2.0.3"
"Manufacturer" = "8:JamesCJ60"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
Expand Down
5 changes: 4 additions & 1 deletion Universal x86 Tuning Utility/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
using System.Diagnostics.Metrics;
using System.Windows.Interop;
using Universal_x86_Tuning_Utility.Views.Windows;
using RyzenSmu;

namespace Universal_x86_Tuning_Utility
{
Expand Down Expand Up @@ -97,7 +98,7 @@ public static bool IsAdministrator()
return principal.IsInRole(WindowsBuiltInRole.Administrator);
}

public static string version = "2.0.2";
public static string version = "2.0.3";
private Mutex mutex;
private const string MutexName = "UniversalX86TuningUtility";
/// <summary>
Expand Down Expand Up @@ -224,6 +225,8 @@ public static bool IsInternetAvailable()
/// </summary>
private async void OnExit(object sender, ExitEventArgs e)
{
if(Family.TYPE != Family.ProcessorType.Intel) SMUCommands.RyzenAccess.Deinitialize();

await _host.StopAsync();

_host.Dispose();
Expand Down
9 changes: 3 additions & 6 deletions Universal x86 Tuning Utility/Scripts/AMD Backend/RyzenSmu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public static void setAddresses()
if (Family.FAM == Family.RyzenFamily.Mendocino || Family.FAM == Family.RyzenFamily.Rembrandt || Family.FAM == Family.RyzenFamily.PhoenixPoint || Family.FAM == Family.RyzenFamily.StrixPoint) Socket_FT6_FP7_FP8();
if (Family.FAM == Family.RyzenFamily.Raphael || Family.FAM == Family.RyzenFamily.DragonRange || Family.FAM == Family.RyzenFamily.GraniteRidge || Family.FAM == Family.RyzenFamily.FireRange) Socket_AM5_V1();

SMUCommands.RyzenAccess.Initialize();
}

private static void Socket_FT5_FP5_AM4()
Expand Down Expand Up @@ -319,15 +320,14 @@ private static void Socket_AM5_V1()
}
}

class SMUCommands
static class SMUCommands
{
public static List<(string, bool, uint)> commands;

public static Smu RyzenAccess = new Smu(false);

public static void applySettings(string commandName, uint value)
{
RyzenAccess.Initialize();
uint[] Args = new uint[6];
Args[0] = value;

Expand All @@ -349,8 +349,6 @@ public static void applySettings(string commandName, uint value)
Task.WaitAll(tasks.ToArray());
}
else throw new ArgumentException($"Command '{commandName}' not found");

RyzenAccess.Deinitialize();
}
}

Expand All @@ -376,12 +374,11 @@ public enum Status : int
{ Smu.Status.CMD_REJECTED_BUSY, "CMD Rejected Busy" }
};

Ols RyzenNbAccesss;
Ols RyzenNbAccesss = new Ols();

public Smu(bool EnableDebug)
{
ShowDebug = EnableDebug;
RyzenNbAccesss = new Ols();

// Check WinRing0 status
switch (RyzenNbAccesss.GetDllStatus())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
<UseWindowsForms>True</UseWindowsForms>
<SignAssembly>False</SignAssembly>
<Copyright>© UXTU Team 2020 - 2023</Copyright>
<AssemblyVersion>2.0.2</AssemblyVersion>
<FileVersion>2.0.2</FileVersion>
<AssemblyVersion>2.0.3</AssemblyVersion>
<FileVersion>2.0.3</FileVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<SupportedOSPlatformVersion>10.0.22621.0</SupportedOSPlatformVersion>
<Version>2.0.3</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<TextBlock
FontSize="18"
Foreground="#B7FFFFFF"
Text="V2.0.2 Stable" />
Text="V2.0.3 Stable" />
<ui:Button
Name="btnPremade"
Height="36"
Expand Down

0 comments on commit e27a4b4

Please sign in to comment.