Loader services: Difference between revisions
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
= ldr:shel = | = ldr:shel = | ||
This is "nn::ldr::detail::IShellInterface". | This is "nn::ldr::detail::IShellInterface". | ||
This service has IPC max_sessions 3. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 12: | Line 14: | ||
== SetProgramArgument == | == SetProgramArgument == | ||
Takes a type-0x9 input buffer with launch arguments (as string), an u32 (size of arguments string), and an input | Takes a type-0x9 input buffer with launch arguments (as string), an u32 (size of arguments string), and an input [[NCM_services#ProgramId|ProgramId]]. No output. | ||
[11.0.0+] Now takes a type-0x5 buffer instead of type-0x9. Now takes a total of 8-bytes of input, instead of 0x10-bytes total. | [11.0.0+] Now takes a type-0x5 buffer instead of type-0x9. Now takes a total of 8-bytes of input, instead of 0x10-bytes total. | ||
Line 20: | Line 22: | ||
== FlushArguments == | == FlushArguments == | ||
No input/output. | |||
Clears the loaded processes waiting queue. | Clears the loaded processes waiting queue. | ||
= ldr:dmnt = | = ldr:dmnt = | ||
This is "nn::ldr::detail::IDebugMonitorInterface". | This is "nn::ldr::detail::IDebugMonitorInterface". | ||
This service has IPC max_sessions 2. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 29: | Line 35: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || [[# | | 0 || [[#SetProgramArgument2]] | ||
|- | |- | ||
| 1 || [[# | | 1 || [[#FlushArguments2]] | ||
|- | |- | ||
| 2 || [[#GetProcessModuleInfo]] | | 2 || [[#GetProcessModuleInfo]] | ||
|} | |} | ||
== SetProgramArgument2 == | |||
Same as [[#SetProgramArgument]]. | |||
== FlushArguments2 == | |||
Same as [[#FlushArguments]]. | |||
== GetProcessModuleInfo == | == GetProcessModuleInfo == | ||
Takes | Takes a type-0xA output buffer of [[#ModuleInfo]] and an input u64 ProcessId. Returns an output s32. | ||
= ldr:pm = | = ldr:pm = | ||
This is "nn::ldr::detail::IProcessManagerInterface". | This is "nn::ldr::detail::IProcessManagerInterface". | ||
This service has IPC max_sessions 1. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 46: | Line 60: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || CreateProcess | | 0 || [[#CreateProcess]] | ||
|- | |- | ||
| 1 || [[#GetProgramInfo]] | | 1 || [[#GetProgramInfo]] | ||
Line 56: | Line 70: | ||
| 4 || [10.0.0+] [[#SetEnabledProgramVerification]] | | 4 || [10.0.0+] [[#SetEnabledProgramVerification]] | ||
|} | |} | ||
== CreateProcess == | |||
Takes an input [[#PinId]], an input [[#CreateProcessFlag]] and an input ResourceLimit handle. Returns an output Process handle. | |||
== GetProgramInfo == | == GetProgramInfo == | ||
Takes | Takes a type-0x1A output buffer containing a [[#ProgramInfo]] and a [[NCM_services#ProgramLocation|ProgramLocation]]. No output. | ||
[20.0.0+] Now takes an additional input u16. | |||
== PinProgram == | == PinProgram == | ||
Takes an | Takes a [[NCM_services#ProgramLocation|ProgramLocation]]. Returns an output [[#PinId]]. | ||
== UnpinProgram == | == UnpinProgram == | ||
Takes | Takes an input [[#PinId]]. No output. | ||
== SetEnabledProgramVerification == | == SetEnabledProgramVerification == | ||
Takes an input bool. No output. | |||
When the flag is zero, it will set ret=0 instead of ret={error} when verifying the fixed-key [[NPDM]] ACID signature fails. This also skips verifying the [[ | When the flag is zero, it will set ret=0 instead of ret={error} when verifying the fixed-key [[NPDM]] ACID signature fails. This also skips verifying the [[NCA#Header|NCA Header]] signature using the ACID key. Note that if verifying the fixed-key ACID signature is successful, and verifying the ACID-key NCA header signature fails, it will throw an error and abort. | ||
= CreateProcessFlag = | |||
{| class="wikitable" border="1" | |||
|- | |||
! Value | |||
! Description | |||
|- | |||
| 0 || EnableDebug | |||
|- | |||
| 1 || DisableAslr | |||
|} | |||
= PinId = | |||
This is an u64. | |||
= ModuleInfo = | = ModuleInfo = | ||
Line 84: | Line 117: | ||
| 0x20 | | 0x20 | ||
| 0x8 | | 0x8 | ||
| | | Address | ||
|- | |- | ||
| 0x28 | | 0x28 | ||
| 0x8 | | 0x8 | ||
| | | Size | ||
|} | |} | ||
Line 100: | Line 133: | ||
| 0x0 | | 0x0 | ||
| 0x1 | | 0x1 | ||
| | | MainThreadPriority | ||
|- | |- | ||
| 0x1 | | 0x1 | ||
| 0x1 | | 0x1 | ||
| DefaultCpuId | | DefaultCpuId | ||
|- | |- | ||
| 0x2 | | 0x2 | ||
| | | 0x2 | ||
| | | Flags | ||
|- | |- | ||
| 0x4 | | 0x4 | ||
| 0x4 | | 0x4 | ||
| MainThreadStackSize | | MainThreadStackSize | ||
|- | |- | ||
| 0x8 | | 0x8 | ||
| 0x8 | | 0x8 | ||
| | | [[NCM_services#ProgramId|ProgramId]] | ||
|- | |- | ||
| 0x10 | | 0x10 | ||
| 0x4 | | 0x4 | ||
| | | AcidSacSize | ||
|- | |- | ||
| 0x14 | | 0x14 | ||
| 0x4 | | 0x4 | ||
| | | AciSacSize | ||
|- | |- | ||
| 0x18 | | 0x18 | ||
| 0x4 | | 0x4 | ||
| | | AcidFacSize | ||
|- | |- | ||
| 0x1C | | 0x1C | ||
| 0x4 | | 0x4 | ||
| | | AciFacSize | ||
|- | |- | ||
| 0x20 | | 0x20 | ||
| | | 0x10 | ||
| | | [19.0.0+] Reserved | ||
|- | |||
| [19.0.0+] 0x30 ([1.0.0-18.1.0] 0x20) | |||
| Variable | |||
| AcidSac | |||
|- | |- | ||
| | | Variable | ||
| | | Variable | ||
| | | AciSac | ||
|- | |- | ||
| | | Variable | ||
| | | Variable | ||
| | | AcidFac | ||
|- | |- | ||
| | | Variable | ||
| | | Variable | ||
| | | AciFac | ||
|} | |} | ||
[[Category:Services]] | [[Category:Services]] |