Applet Manager services: Difference between revisions
No edit summary |
|||
Line 3,608: | Line 3,608: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| | | 1 || [[#InitializeGraphicsWithTransferMemory]] | ||
|- | |- | ||
| | | 4 || [[#InitializeGraphics]] | ||
|- | |- | ||
| 101 || [[# | | 11 || [[#SetCurrentProcessHandle]] | ||
|- | |||
| 12 || | |||
|- | |||
| 101 || [[#StartGraphics]] | |||
|- | |- | ||
| 111 || | | 111 || | ||
Line 3,644: | Line 3,648: | ||
| 391 || | | 391 || | ||
|- | |- | ||
| 401 || | | 401 || [[#PrepareGpuManagerSession]] | ||
|- | |- | ||
| 402 || | | 402 || [[#StartGpuManagerSession]] | ||
|- | |- | ||
| 423 || | | 423 || | ||
Line 3,652: | Line 3,656: | ||
| 434 || | | 434 || | ||
|- | |- | ||
| 497 || | | 494 || | ||
|- | |||
| 496 || [[#CreateGpuManagerSessionWithTransferMemory]] | |||
|- | |||
| 497 || [[#CreateGpuManagerSession]] | |||
|- | |- | ||
| 901 || | | 901 || | ||
Line 3,682: | Line 3,690: | ||
| 1102 || | | 1102 || | ||
|- | |- | ||
| 1401 || [[# | | 1401 || [[#CreateNvDrv2UserSessionWithTransferMemory]] | ||
|- | |- | ||
| 1402 || [[# | | 1402 || [[#CreateNvDrv2UserSession]] | ||
|- | |- | ||
| 1501 || | | 1411 || [[#GetNvDrv2UserTransferMemoryUsage]] | ||
|- | |||
| 1501 || | |||
|- | |- | ||
| 1502 || | | 1502 || | ||
Line 3,703: | Line 3,713: | ||
|} | |} | ||
== | == InitializeGraphicsWithTransferMemory == | ||
Unofficial name. | |||
Takes a TransferMemory handle, an input [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]] and an input u64 '''TransferMemorySize'''. No output. | |||
== InitializeGraphics == | |||
Unofficial name. | Unofficial name. | ||
Takes a Process handle, an input [[Applet_Manager_services#AppletResourceUserId|AppletResourceUserId]] and five input u64s. No output. | |||
The first u64 appears to be a version ([19.0.0] 0x8000000000000001, [20.1.1] 0x8000000000000005), the last u64 is the output from new [[SVC#InfoType|InfoType]] 31 or 32 and the remaining u64s are all 0. | |||
== | == SetCurrentProcessHandle == | ||
Unofficial name. | Unofficial name. | ||
Takes a Process handle. No output. | |||
Called directly after [[#InitializeGraphicsWithTransferMemory]] or [[#InitializeGraphics]]. | |||
== | == StartGraphics == | ||
Unofficial name. | Unofficial name. | ||
No input/output. | |||
== | Called directly after [[#SetCurrentProcessHandle]]. | ||
== PrepareGpuManagerSession == | |||
Unofficial name. | Unofficial name. | ||
No input/output. | |||
== | Called directly after [[#CreateGpuManagerSessionWithTransferMemory]] or [[#CreateGpuManagerSession]]. | ||
== StartGpuManagerSession == | |||
Unofficial name. | |||
No input/output. | |||
Called directly after [[#PrepareGpuManagerSession]]. | |||
== CreateGpuManagerSessionWithTransferMemory == | |||
Unofficial name. | |||
Takes a TransferMemory handle and two input u64s '''Version''' and '''TransferMemorySize'''. Returns a [[#GpuManagerSession]]. | |||
[19.0.0] '''Version''' must be 2. | |||
== CreateGpuManagerSession == | |||
Unofficial name. | |||
Takes an input u64 '''Version'''. Returns a [[#GpuManagerSession]]. | |||
[19.0.0] '''Version''' must be 2. | |||
== CreateNvDrv2UserSessionWithTransferMemory == | |||
Unofficial name. | |||
Takes a TransferMemory handle, an input u64 '''TransferMemorySize''' and an input u8. Returns an [[#INvDrv2User]]. | |||
== CreateNvDrv2UserSession == | |||
Unofficial name. | Unofficial name. | ||
No input. Returns an [[#INvDrv2User]]. | No input. Returns an [[#INvDrv2User]]. | ||
== GetNvDrv2UserTransferMemoryUsage == | |||
Unofficial name. | |||
No input. Returns three u64s '''TotalTransferMemorySize''', '''UsedTransferMemorySize''' and '''MaxTransferMemorySize'''. | |||
== GpuManagerSession == | |||
Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Cmd || Name | |||
|- | |||
| 11 || [[#GetEventIdRange]] | |||
|- | |||
| 12 || [[#CreateEvent]] | |||
|- | |||
| 21 || [[#RequestGpuSession]] | |||
|- | |||
| 22 || [[#GetGpuSession]] | |||
|- | |||
| 33 || | |||
|- | |||
| 41 || | |||
|- | |||
| 42 || | |||
|- | |||
| 102 || | |||
|- | |||
| 200 || | |||
|- | |||
| 201 || | |||
|- | |||
| 202 || | |||
|} | |||
=== GetEventIdRange === | |||
Unofficial name. | |||
No input. Returns two u32s '''EventIdMin''' and '''EventIdMax'''. | |||
=== CreateEvent === | |||
Unofficial name. | |||
Takes an input u32 '''EventId'''. Returns an output Event handle. | |||
=== RequestGpuSession === | |||
Unofficial name. | |||
Takes an input u32 '''EventId'''. No output. | |||
'''EventId''' must have been previously passed to [[#CreateEvent]] and the returned Event handle will be signalled when the session is ready. | |||
=== GetGpuSession === | |||
Unofficial name. | |||
No input. Returns a [[#GpuSession]]. | |||
Called after [[#RequestGpuSession]] and the Event handle has been signalled. | |||
=== GpuSession === | |||
Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Cmd || Name | |||
|- | |||
| 101 || [[#CreateGpuMemory]] | |||
|- | |||
| 102 || [[#DestroyGpuMemory]] | |||
|- | |||
| 201 || | |||
|- | |||
| 202 || | |||
|- | |||
| 203 || | |||
|- | |||
| 204 || | |||
|- | |||
| 205 || | |||
|- | |||
| 207 || | |||
|} | |||
==== CreateGpuMemory ==== | |||
Unofficial name. | |||
Takes two input u64s '''MemoryAddressStart''' and '''MemoryAddressEnd''' and two u8s. Returns an output u32 '''GpuMemoryHandle'''. | |||
The memory region between '''MemoryAddressStart''' and '''MemoryAddressEnd''' must have been passed to [[#SVC|SVC]] 0x80 with attribute 0x20. | |||
==== DestroyGpuMemory ==== | |||
Unofficial name. | |||
Takes two input u32s '''GpuMemoryHandle''' and '''EventId'''. No output. | |||
The Event handle associated with '''EventId''' will be signalled when the memory is released. | |||
== INvDrv2User == | == INvDrv2User == | ||
Line 3,751: | Line 3,897: | ||
| 12 || Ioctl3 | | 12 || Ioctl3 | ||
|- | |- | ||
| 13 || | | 13 || [[#SetConfiguration]] | ||
|} | |} | ||
=== SetConfiguration === | |||
Unofficial name. | |||
Takes an input u32 '''Configuration'''. No output. | |||
Bit 0 in '''Configuration''' represents the old '''GraphicsFirmwareMemoryMarginEnabled''' option. | |||
= Library Applets = | = Library Applets = |