- Add TinyMemBenchNX, a simple memory benchmark program based on [tinymembench](https://github.com/ssvb/tinymembench)

- Sys-clk Fix: Ignore RAM clock values in config, or sys-clk will stuck in a loop of resetting RAM clocks (generating huge log file and degrading performance)

- Fix: Temporary frequency override in sys-clk overlay/manager
This commit is contained in:
KazushiM
2021-08-31 00:25:44 +08:00
parent 8e119aaa95
commit 2724faf980
16 changed files with 1449 additions and 9 deletions

View File

@@ -214,7 +214,7 @@ void ClockManager::Tick()
{
std::uint32_t hz = 0;
std::uint32_t hzForceOverride = 0;
for (unsigned int module = 0; module < SysClkModule_EnumMax; module++)
for (unsigned int module = 0; module < SysClkModule_EnumMax - 1; module++)
{
hz = this->context->overrideFreqs[module];
@@ -456,6 +456,15 @@ bool ClockManager::RefreshContext()
for (unsigned int module = 0; module < SysClkModule_EnumMax; module++)
{
hz = Clocks::GetCurrentHz((SysClkModule)module);
// Skip MEM freq check
if (module == SysClkModule_MEM)
{
this->context->freqs[module] = hz;
break;
}
// Round to MHz
uint32_t cur_mhz = hz/1000'000;
uint32_t be4_mhz = this->context->freqs[module]/1000'000;
if (hz != 0 && cur_mhz != be4_mhz)
@@ -475,6 +484,7 @@ bool ClockManager::RefreshContext()
else
{
FileUtils::LogLine("[mgr] %s override disabled", Clocks::GetModuleName((SysClkModule)module, true));
Clocks::ResetToStock(module);
}
this->context->overrideFreqs[module] = hz;
hasChanged = true;