spl: is unavailable in overlay (ovlloader specifically)
This commit is contained in:
@@ -32,6 +32,7 @@ Result sysclkIpcGetConfigValues(SysClkConfigValueList* out_configValues);
|
||||
Result sysclkIpcSetConfigValues(SysClkConfigValueList* configValues);
|
||||
Result sysclkIpcSetReverseNXRTMode(ReverseNXMode mode);
|
||||
Result sysclkIpcGetFrequencyTable(SysClkModule module, SysClkProfile profile, size_t max_entry_num, uint32_t* out_table);
|
||||
Result sysclkIpcGetIsMariko(bool* out_is_mariko);
|
||||
|
||||
static inline Result sysclkIpcRemoveOverride(SysClkModule module)
|
||||
{
|
||||
|
||||
@@ -31,6 +31,7 @@ enum SysClkIpcCmd
|
||||
SysClkIpcCmd_SetConfigValues = 10,
|
||||
SysClkIpcCmd_SetReverseNXRTMode = 11,
|
||||
SysClkIpcCmd_GetFrequencyTable = 12,
|
||||
SysClkIpcCmd_GetIsMariko = 13,
|
||||
};
|
||||
|
||||
typedef struct
|
||||
|
||||
@@ -146,3 +146,8 @@ Result sysclkIpcGetFrequencyTable(SysClkModule module, SysClkProfile profile, si
|
||||
free(table);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Result sysclkIpcGetIsMariko(bool* out_is_mariko)
|
||||
{
|
||||
return serviceDispatchOut(&g_sysclkSrv, SysClkIpcCmd_GetIsMariko, *out_is_mariko);
|
||||
}
|
||||
|
||||
@@ -18,24 +18,7 @@ MiscGui::MiscGui()
|
||||
this->chargeInfo = new PsmChargeInfo {};
|
||||
this->i2cInfo = new I2cInfo {};
|
||||
|
||||
u64 hardware_type = 0;
|
||||
splInitialize();
|
||||
splGetConfig(SplConfigItem_HardwareType, &hardware_type);
|
||||
splExit();
|
||||
|
||||
switch (hardware_type) {
|
||||
case 0: // Icosa
|
||||
case 1: // Copper
|
||||
case 4: // Calcio
|
||||
isMariko = false;
|
||||
break;
|
||||
default:
|
||||
// case 2: // Hoag
|
||||
// case 3: // Iowa
|
||||
// case 5: // Aula
|
||||
isMariko = true;
|
||||
break;
|
||||
}
|
||||
sysclkIpcGetIsMariko(&this->isMariko);
|
||||
}
|
||||
|
||||
MiscGui::~MiscGui()
|
||||
|
||||
@@ -80,8 +80,10 @@ void Clocks::Initialize()
|
||||
|
||||
// Check if it's Mariko
|
||||
u64 hardware_type = 0;
|
||||
splInitialize();
|
||||
splGetConfig(SplConfigItem_HardwareType, &hardware_type);
|
||||
rc = splInitialize();
|
||||
ASSERT_RESULT_OK(rc, "splInitialize");
|
||||
rc = splGetConfig(SplConfigItem_HardwareType, &hardware_type);
|
||||
ASSERT_RESULT_OK(rc, "splGetConfig");
|
||||
splExit();
|
||||
|
||||
switch (hardware_type) {
|
||||
|
||||
@@ -168,6 +168,9 @@ Result IpcService::ServiceHandlerFunc(void* arg, const IpcServerRequest* r, u8*
|
||||
return ipcSrv->GetFrequencyTable(in_args, (uint32_t*)out_data);
|
||||
}
|
||||
break;
|
||||
case SysClkIpcCmd_GetIsMariko:
|
||||
*out_dataSize = sizeof(bool);
|
||||
return ipcSrv->GetIsMariko((bool*)out_data);
|
||||
}
|
||||
|
||||
return SYSCLK_ERROR(Generic);
|
||||
@@ -313,3 +316,8 @@ Result IpcService::SetReverseNXRTMode(ReverseNXMode mode) {
|
||||
Result IpcService::GetFrequencyTable(SysClkIpc_GetFrequencyTable_Args* args, uint32_t* out_table) {
|
||||
return Clocks::GetTable(args->module, args->profile, args->max_entry_num, out_table);
|
||||
}
|
||||
|
||||
Result IpcService::GetIsMariko(bool* out_is_mariko) {
|
||||
*out_is_mariko = Clocks::GetIsMariko();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ class IpcService
|
||||
Result SetConfigValues(SysClkConfigValueList* configValues);
|
||||
Result SetReverseNXRTMode(ReverseNXMode mode);
|
||||
Result GetFrequencyTable(SysClkIpc_GetFrequencyTable_Args* args, uint32_t* out_table);
|
||||
Result GetIsMariko(bool* out_is_mariko);
|
||||
|
||||
bool running;
|
||||
Thread thread;
|
||||
|
||||
Reference in New Issue
Block a user