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

@ -13,19 +13,19 @@ namespace Service::PM {
PM_APP::PM_APP() : ServiceFramework("pm:app", 3) {
static const FunctionInfo functions[] = {
// clang-format off
{0x00010140, nullptr, "LaunchTitle"},
{0x00020082, nullptr, "LaunchFIRM"},
{0x00030080, nullptr, "TerminateApplication"},
{0x00040100, nullptr, "TerminateTitle"},
{0x000500C0, nullptr, "TerminateProcess"},
{0x00060082, nullptr, "PrepareForReboot"},
{0x00070042, nullptr, "GetFIRMLaunchParams"},
{0x00080100, nullptr, "GetTitleExheaderFlags"},
{0x00090042, nullptr, "SetFIRMLaunchParams"},
{0x000A0140, nullptr, "SetAppResourceLimit"},
{0x000B0140, nullptr, "GetAppResourceLimit"},
{0x000C0080, nullptr, "UnregisterProcess"},
{0x000D0240, nullptr, "LaunchTitleUpdate"},
{IPC::MakeHeader(0x0001, 5, 0), nullptr, "LaunchTitle"},
{IPC::MakeHeader(0x0002, 2, 2), nullptr, "LaunchFIRM"},
{IPC::MakeHeader(0x0003, 2, 0), nullptr, "TerminateApplication"},
{IPC::MakeHeader(0x0004, 4, 0), nullptr, "TerminateTitle"},
{IPC::MakeHeader(0x0005, 3, 0), nullptr, "TerminateProcess"},
{IPC::MakeHeader(0x0006, 2, 2), nullptr, "PrepareForReboot"},
{IPC::MakeHeader(0x0007, 1, 2), nullptr, "GetFIRMLaunchParams"},
{IPC::MakeHeader(0x0008, 4, 0), nullptr, "GetTitleExheaderFlags"},
{IPC::MakeHeader(0x0009, 1, 2), nullptr, "SetFIRMLaunchParams"},
{IPC::MakeHeader(0x000A, 5, 0), nullptr, "SetAppResourceLimit"},
{IPC::MakeHeader(0x000B, 5, 0), nullptr, "GetAppResourceLimit"},
{IPC::MakeHeader(0x000C, 2, 0), nullptr, "UnregisterProcess"},
{IPC::MakeHeader(0x000D, 9, 0), nullptr, "LaunchTitleUpdate"},
// clang-format on
};

View file

@ -13,9 +13,9 @@ namespace Service::PM {
PM_DBG::PM_DBG() : ServiceFramework("pm:dbg", 3) {
static const FunctionInfo functions[] = {
// clang-format off
{0x00010140, nullptr, "LaunchAppDebug"},
{0x00020140, nullptr, "LaunchApp"},
{0x00030000, nullptr, "RunQueuedProcess"},
{IPC::MakeHeader(0x0001, 5, 0), nullptr, "LaunchAppDebug"},
{IPC::MakeHeader(0x0002, 5, 0), nullptr, "LaunchApp"},
{IPC::MakeHeader(0x0003, 0, 0), nullptr, "RunQueuedProcess"},
// clang-format on
};