Revert "hos-sys: remove global target (doesnt compile)"

This reverts commit 30dd6c2536.
This commit is contained in:
souldbminersmwc
2025-11-12 15:41:30 -05:00
parent 3ec4cc48e6
commit 40aefffbb2
2 changed files with 18 additions and 16 deletions

View File

@@ -281,13 +281,15 @@ void ClockManager::Tick()
for (unsigned int module = 0; module < SysClkModule_EnumMax; module++) for (unsigned int module = 0; module < SysClkModule_EnumMax; module++)
{ {
targetHz = this->context->overrideFreqs[module]; targetHz = this->context->overrideFreqs[module];
globalTargetHz = this->context->overrideFreqs[module];
if (!targetHz) if (!targetHz)
{ {
targetHz = this->config->GetAutoClockHz(this->context->applicationId, (SysClkModule)module, this->context->profile); targetHz = this->config->GetAutoClockHz(this->context->applicationId, (SysClkModule)module, this->context->profile);
globalTargetHz = this->config->GetAutoClockHz(SYSCLK_GLOBAL_PROFILE_TID, (SysClkModule)module, this->context->profile);
} }
if (targetHz) if (targetHz || globalTargetHz)
{ {
maxHz = this->GetMaxAllowedHz((SysClkModule)module, this->context->profile); maxHz = this->GetMaxAllowedHz((SysClkModule)module, this->context->profile);
nearestHz = this->GetNearestHz((SysClkModule)module, targetHz, maxHz); nearestHz = this->GetNearestHz((SysClkModule)module, targetHz, maxHz);

View File

@@ -66,26 +66,26 @@ void EMCpatcher::Run()
void EMCpatcher::ApplyEMCPatch() void EMCpatcher::ApplyEMCPatch()
{ {
// if(HOSSVC_HAS_MM) { // only for 10.0.0+, older versions need rewrites if(HOSSVC_HAS_MM) { // only for 10.0.0+, older versions need rewrites
// u64 mc_virt_addr = 0; u64 mc_virt_addr = 0;
// u64 mc_out_size = 0; u64 mc_out_size = 0;
// u64 emc_virt_addr = 0; u64 emc_virt_addr = 0;
// u64 emc_out_size = 0; u64 emc_out_size = 0;
// Result rc; Result rc;
// // rc = svcQueryMemoryMapping(&mc_virt_addr, &mc_out_size, MC_BASE, MC_EMC_BASE_SIZE); // map mc // rc = svcQueryMemoryMapping(&mc_virt_addr, &mc_out_size, MC_BASE, MC_EMC_BASE_SIZE); // map mc
// // ASSERT_RESULT_OK(rc, "svcQueryMemoryMapping"); // ASSERT_RESULT_OK(rc, "svcQueryMemoryMapping");
// // rc = svcQueryMemoryMapping(&emc_virt_addr, &emc_out_size, EMC_BASE, MC_EMC_BASE_SIZE); // map emc // rc = svcQueryMemoryMapping(&emc_virt_addr, &emc_out_size, EMC_BASE, MC_EMC_BASE_SIZE); // map emc
// // ASSERT_RESULT_OK(rc, "svcQueryMemoryMapping"); // ASSERT_RESULT_OK(rc, "svcQueryMemoryMapping");
// write_reg64(EMC_BASE, EMC_RAS_0, 1); write_reg64(EMC_BASE, EMC_RAS_0, 1);
// write_reg64(EMC_BASE, EMC_TIMING_CONTROL_0, 0x1); // apply shadow regs write_reg64(EMC_BASE, EMC_TIMING_CONTROL_0, 0x1); // apply shadow regs
// // svcUnmapMemory((void *)mc_virt_addr, (void *)MC_BASE, MC_EMC_BASE_SIZE); // clean up // svcUnmapMemory((void *)mc_virt_addr, (void *)MC_BASE, MC_EMC_BASE_SIZE); // clean up
// // svcUnmapMemory((void *)emc_virt_addr, (void *)EMC_BASE, MC_EMC_BASE_SIZE); // svcUnmapMemory((void *)emc_virt_addr, (void *)EMC_BASE, MC_EMC_BASE_SIZE);
// } }
} }