Use IPC:MakeHeader instead of hardcoded raw values for IPC command tables. (#6453)

* Use IPC:MakeHeader instead of hardcoded values for IPC command tables.

* Use u32 instead of unsigned int in MakeHeader function

Co-authored-by: SachinVin <26602104+SachinVin@users.noreply.github.com>

* Fix clang format

---------

Co-authored-by: SachinVin <26602104+SachinVin@users.noreply.github.com>
This commit is contained in:
PabloMK7 2023-04-28 07:31:03 +02:00 committed by GitHub
parent 9bd8c9290b
commit 63bc0b59bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
74 changed files with 1983 additions and 1896 deletions

View file

@ -149,22 +149,22 @@ void PS_PS::EncryptDecryptAes(Kernel::HLERequestContext& ctx) {
PS_PS::PS_PS() : ServiceFramework("ps:ps", DefaultMaxSessions) {
static const FunctionInfo functions[] = {
// clang-format off
{0x00010244, nullptr, "SignRsaSha256"},
{0x00020244, nullptr, "VerifyRsaSha256"},
{0x00040204, &PS_PS::EncryptDecryptAes, "EncryptDecryptAes"},
{0x00050284, nullptr, "EncryptSignDecryptVerifyAesCcm"},
{0x00060040, nullptr, "GetRomId"},
{0x00070040, nullptr, "GetRomId2"},
{0x00080040, nullptr, "GetRomMakerCode"},
{0x00090000, nullptr, "GetCTRCardAutoStartupBit"},
{0x000A0000, nullptr, "GetLocalFriendCodeSeed"},
{0x000B0000, nullptr, "GetDeviceId"},
{0x000C0000, nullptr, "SeedRNG"},
{0x000D0042, nullptr, "GenerateRandomBytes"},
{0x000E0082, nullptr, "InterfaceForPXI_0x04010084"},
{0x000F0082, nullptr, "InterfaceForPXI_0x04020082"},
{0x00100042, nullptr, "InterfaceForPXI_0x04030044"},
{0x00110042, nullptr, "InterfaceForPXI_0x04040044"},
{IPC::MakeHeader(0x0001, 9, 4), nullptr, "SignRsaSha256"},
{IPC::MakeHeader(0x0002, 9, 4), nullptr, "VerifyRsaSha256"},
{IPC::MakeHeader(0x0004, 8, 4), &PS_PS::EncryptDecryptAes, "EncryptDecryptAes"},
{IPC::MakeHeader(0x0005, 10, 4), nullptr, "EncryptSignDecryptVerifyAesCcm"},
{IPC::MakeHeader(0x0006, 1, 0), nullptr, "GetRomId"},
{IPC::MakeHeader(0x0007, 1, 0), nullptr, "GetRomId2"},
{IPC::MakeHeader(0x0008, 1, 0), nullptr, "GetRomMakerCode"},
{IPC::MakeHeader(0x0009, 0, 0), nullptr, "GetCTRCardAutoStartupBit"},
{IPC::MakeHeader(0x000A, 0, 0), nullptr, "GetLocalFriendCodeSeed"},
{IPC::MakeHeader(0x000B, 0, 0), nullptr, "GetDeviceId"},
{IPC::MakeHeader(0x000C, 0, 0), nullptr, "SeedRNG"},
{IPC::MakeHeader(0x000D, 1, 2), nullptr, "GenerateRandomBytes"},
{IPC::MakeHeader(0x000E, 2, 2), nullptr, "InterfaceForPXI_0x04010084"},
{IPC::MakeHeader(0x000F, 2, 2), nullptr, "InterfaceForPXI_0x04020082"},
{IPC::MakeHeader(0x0010, 1, 2), nullptr, "InterfaceForPXI_0x04030044"},
{IPC::MakeHeader(0x0011, 1, 2), nullptr, "InterfaceForPXI_0x04040044"},
// clang-format on
};