- Fixed gpu_hz_list typo in governor (#46)

- Parse loader.kip config from { "/", "/atmosphere/", "/atmosphere/kips/", "/bootloader/" } (#44)
This commit is contained in:
KazushiM
2022-10-31 00:43:40 +08:00
parent 524247955f
commit 859841ab8e
20 changed files with 232 additions and 115 deletions

View File

@@ -20,8 +20,11 @@ extern "C"
Result apmExtInitialize(void);
void apmExtExit(void);
Result apmExtGetPerformanceMode(u32 *out_mode);
// Silently fail
Result apmExtSysRequestPerformanceMode(u32 mode);
Result apmExtSysSetCpuBoostMode(u32 mode);
Result apmExtGetPerformanceMode(u32 *out_mode);
Result apmExtGetCurrentPerformanceConfiguration(u32 *out_conf);
inline bool apmExtIsCPUBoosted(u32 conf_id) { // CPU boosted to 1785 MHz

View File

@@ -21,22 +21,15 @@ Result apmExtInitialize(void)
g_refCnt++;
if (serviceIsActive(&g_apmSrv))
{
return 0;
}
Result rc = 0;
Result rc = smGetService(&g_apmSrv, "apm");
rc = smGetService(&g_apmSrv, "apm");
if(R_SUCCEEDED(rc))
{
rc = smGetService(&g_apmSysSrv, "apm:sys");
}
if (R_FAILED(rc))
{
apmExtExit();
}
return rc;
}
@@ -50,6 +43,11 @@ void apmExtExit(void)
}
}
Result apmExtSysSetCpuBoostMode(u32 mode)
{
return serviceDispatchIn(&g_apmSysSrv, 6, mode);
}
Result apmExtGetPerformanceMode(u32 *out_mode)
{
return serviceDispatchOut(&g_apmSrv, 1, *out_mode);