Release 0.0.1
This commit is contained in:
parent
07212c5986
commit
d36decf6db
@ -11,21 +11,28 @@ class Program
|
|||||||
|
|
||||||
var rootCommand = new RootCommand("A CLI for the Ryzen SMU.");
|
var rootCommand = new RootCommand("A CLI for the Ryzen SMU.");
|
||||||
|
|
||||||
var pboOffset = new Option<string>("--offset", "Specify a core, or list of cores, and their PBO offset(s).");
|
var pboOffset = new Option<string>("--offset", "Specify a core, or list of cores, and their PBO offset(s), in a fashion similar to taskset. e.g. 0:-10,1:5,2:-20,14:-25");
|
||||||
|
|
||||||
rootCommand.AddOption(pboOffset);
|
rootCommand.AddOption(pboOffset);
|
||||||
// How to format this command and process it is to be decided.
|
|
||||||
rootCommand.SetHandler((core_values) =>
|
rootCommand.SetHandler((offsetArgs) =>
|
||||||
{
|
{
|
||||||
Console.WriteLine(core_values);
|
RunPBOOffset(offsetArgs);
|
||||||
}, pboOffset);
|
}, pboOffset);
|
||||||
|
|
||||||
// works
|
|
||||||
ApplySingleCorePBOOffset(0, -15);
|
|
||||||
|
|
||||||
return rootCommand.Invoke(args);
|
return rootCommand.Invoke(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void RunPBOOffset(string offsetArgs)
|
||||||
|
{
|
||||||
|
string[] arg = offsetArgs.Split(',');
|
||||||
|
|
||||||
|
for (int i = 0; i < arg.Length; i++)
|
||||||
|
{
|
||||||
|
ApplySingleCorePBOOffset(Convert.ToInt32(arg[i].Split(':')[0]), Convert.ToInt32(arg[i].Split(':')[1]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void ApplySingleCorePBOOffset(int coreNumber, int value)
|
private static void ApplySingleCorePBOOffset(int coreNumber, int value)
|
||||||
{
|
{
|
||||||
// Magic numbers from SMUDebugTool
|
// Magic numbers from SMUDebugTool
|
||||||
@ -35,6 +42,7 @@ class Program
|
|||||||
if ((~ryzen.info.topology.coreDisableMap[mapIndex] >> coreNumber % 8 & 1) == 1)
|
if ((~ryzen.info.topology.coreDisableMap[mapIndex] >> coreNumber % 8 & 1) == 1)
|
||||||
{
|
{
|
||||||
ryzen.SetPsmMarginSingleCore((uint)(((mapIndex << 8) | coreNumber % 8 & 0xF) << 20), value);
|
ryzen.SetPsmMarginSingleCore((uint)(((mapIndex << 8) | coreNumber % 8 & 0xF) << 20), value);
|
||||||
|
Console.WriteLine($"Set core {coreNumber} to offset {value}!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,26 @@
|
|||||||
<Version>0.0.1</Version>
|
<Version>0.0.1</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<!-- Set build configuration to Release by default -->
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
|
||||||
|
|
||||||
|
<!-- Enable single-file publishing -->
|
||||||
|
<PublishSingleFile>true</PublishSingleFile>
|
||||||
|
|
||||||
|
<!-- Target runtime -->
|
||||||
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||||
|
|
||||||
|
<!-- Disable self-contained deployment -->
|
||||||
|
<SelfContained>false</SelfContained>
|
||||||
|
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
|
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
|
||||||
<!-- Included for the ZenStates-Core submodule...-->
|
<!-- Included for the ZenStates-Core submodule...-->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user