From dd9aed9ea9349aad4f3003dbf1e476f9cf2aee96 Mon Sep 17 00:00:00 2001 From: purpasmart96 Date: Wed, 13 May 2015 23:15:32 -0700 Subject: CFG: Update the cfg service to be like other integrated services --- src/core/hle/service/cfg/cfg_i.cpp | 57 ++------------------------------------ 1 file changed, 2 insertions(+), 55 deletions(-) (limited to 'src/core/hle/service/cfg/cfg_i.cpp') diff --git a/src/core/hle/service/cfg/cfg_i.cpp b/src/core/hle/service/cfg/cfg_i.cpp index 6d1eee4e..5aeadc08 100644 --- a/src/core/hle/service/cfg/cfg_i.cpp +++ b/src/core/hle/service/cfg/cfg_i.cpp @@ -8,59 +8,6 @@ namespace Service { namespace CFG { - -/** - * CFG_I::GetConfigInfoBlk8 service function - * This function is called by two command headers, - * there appears to be no difference between them according to 3dbrew - * Inputs: - * 0 : 0x04010082 / 0x08010082 - * 1 : Size - * 2 : Block ID - * 3 : Descriptor for the output buffer - * 4 : Output buffer pointer - * Outputs: - * 1 : Result of function, 0 on success, otherwise error code - */ -static void GetConfigInfoBlk8(Service::Interface* self) { - u32* cmd_buffer = Kernel::GetCommandBuffer(); - u32 size = cmd_buffer[1]; - u32 block_id = cmd_buffer[2]; - u8* data_pointer = Memory::GetPointer(cmd_buffer[4]); - - if (data_pointer == nullptr) { - cmd_buffer[1] = -1; // TODO(Subv): Find the right error code - return; - } - - cmd_buffer[1] = Service::CFG::GetConfigInfoBlock(block_id, size, 0x8, data_pointer).raw; -} - -/** - * CFG_I::UpdateConfigNANDSavegame service function - * This function is called by two command headers, - * there appears to be no difference between them according to 3dbrew - * Inputs: - * 0 : 0x04030000 / 0x08030000 - * Outputs: - * 1 : Result of function, 0 on success, otherwise error code - */ -static void UpdateConfigNANDSavegame(Service::Interface* self) { - u32* cmd_buffer = Kernel::GetCommandBuffer(); - cmd_buffer[1] = Service::CFG::UpdateConfigNANDSavegame().raw; -} - -/** - * CFG_I::FormatConfig service function - * Inputs: - * 0 : 0x08060000 - * Outputs: - * 1 : Result of function, 0 on success, otherwise error code - */ -static void FormatConfig(Service::Interface* self) { - u32* cmd_buffer = Kernel::GetCommandBuffer(); - cmd_buffer[1] = Service::CFG::FormatConfig().raw; -} const Interface::FunctionInfo FunctionTable[] = { {0x04010082, GetConfigInfoBlk8, "GetConfigInfoBlk8"}, @@ -68,7 +15,7 @@ const Interface::FunctionInfo FunctionTable[] = { {0x04030000, UpdateConfigNANDSavegame, "UpdateConfigNANDSavegame"}, {0x04040042, nullptr, "GetLocalFriendCodeSeedData"}, {0x04050000, nullptr, "GetLocalFriendCodeSeed"}, - {0x04060000, nullptr, "SecureInfoGetRegion"}, + {0x04060000, SecureInfoGetRegion, "SecureInfoGetRegion"}, {0x04070000, nullptr, "SecureInfoGetByte101"}, {0x04080042, nullptr, "SecureInfoGetSerialNo"}, {0x04090000, nullptr, "UpdateConfigBlk00040003"}, @@ -92,7 +39,7 @@ const Interface::FunctionInfo FunctionTable[] = { {0x08130000, nullptr, "VerifySigSecureInfo"}, {0x08140042, nullptr, "SecureInfoGetData"}, {0x08150042, nullptr, "SecureInfoGetSignature"}, - {0x08160000, nullptr, "SecureInfoGetRegion"}, + {0x08160000, SecureInfoGetRegion, "SecureInfoGetRegion"}, {0x08170000, nullptr, "SecureInfoGetByte101"}, {0x08180042, nullptr, "SecureInfoGetSerialNo"}, }; -- cgit v1.2.3