Switch 2: GSV services: Difference between revisions

From Nintendo Switch Brew
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
This is a TIPC interface so the command numbers are subtracted by 16.
This is a TIPC interface so the command numbers are subtracted by 16.


This multiplexes several interfaces into a single session that can be acquired through [[#Applet_Manager_services|am]].
This multiplexes several interfaces into a single session that can be acquired through [[Applet_Manager_services|am]].


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 30: Line 30:
| 187 || NativeMemory || QueryNativeMemoryNvsNvRmMemIdForDebug
| 187 || NativeMemory || QueryNativeMemoryNvsNvRmMemIdForDebug
|-
|-
| 201 || Syncpt || CreateSyncptContext
| 201 || Syncpt || [[#CreateSyncptContext|CreateSyncptContext]]
|-
|-
| 202 || Syncpt || InitializeSyncptContext
| 202 || Syncpt || [[#InitializeSyncptContext|InitializeSyncptContext]]
|-
|-
| 211 || Syncpt || CreateDebugSyncDevice
| 211 || Syncpt || [[#CreateDebugSyncDevice|CreateDebugSyncDevice]]
|-
|-
| 213 || Syncpt || CreateDebugSyncCounter
| 212 || Syncpt || [[#DestroyDebugSyncDevice|DestroyDebugSyncDevice]]
|-
|-
| 214 || Syncpt || DestroyDebugSyncCounter
| 213 || Syncpt || [[#CreateDebugSyncCounter|CreateDebugSyncCounter]]
|-
|-
| 215 || Syncpt || ReportDebugSyncCounterValue
| 214 || Syncpt || [[#DestroyDebugSyncCounter|DestroyDebugSyncCounter]]
|-
|-
| 301 || Display || CreateDisplayContext
| 215 || Syncpt || [[#ReportDebugSyncCounterValue|ReportDebugSyncCounterValue]]
|-
|-
| 303 || Display || DestroyDisplayContext
| 301 || Display || [[#CreateDisplayContext|CreateDisplayContext]]
|-
|-
| 305 || Display || InitializeDisplayContext
| 303 || Display || [[#DestroyDisplayContext|DestroyDisplayContext]]
|-
| 305 || Display || [[#InitializeDisplayContext|InitializeDisplayContext]]
|-
|-
| 311 || Display ||  
| 311 || Display ||  
Line 59: Line 61:
|-
|-
| 327 || Display ||
| 327 || Display ||
|-
| 361 || Display ||
|-
|-
| 391 || Display || CalculateRequiredBufferMemory
| 391 || Display || CalculateRequiredBufferMemory
Line 65: Line 69:
|-
|-
| 402 || Gpu || [[#InitializeGpuContext|InitializeGpuContext]]
| 402 || Gpu || [[#InitializeGpuContext|InitializeGpuContext]]
|-
| 403 || Gpu || [[#DestroyGpuContext|DestroyGpuContext]]
|-
|-
| 423 || Gpu ||
| 423 || Gpu ||
|-
| 424 || Gpu ||
|-
| 425 || Gpu ||
|-
|-
| 426 || Gpu || MapNativeImage
| 426 || Gpu || MapNativeImage
Line 72: Line 82:
| 427 || Gpu || UnmapNativeImage
| 427 || Gpu || UnmapNativeImage
|-
|-
| 428 || Gpu || [[#QueryNativeImage|QueryNativeImage]]
| 428 || Gpu || QueryNativeImage
|-
|-
| 429 || Gpu || [[#CreateNativeImage|CreateNativeImage]]
| 429 || Gpu || CreateNativeImage
|-
|-
| 430 || Gpu || DestroyNativeImage
| 430 || Gpu || DestroyNativeImage
Line 80: Line 90:
| 434 || Gpu || ExistsAddressSpace
| 434 || Gpu || ExistsAddressSpace
|-
|-
| 435 || Gpu || [[#CalculateNativeImageSize|CalculateNativeImageSize]]
| 435 || Gpu || CalculateNativeImageSize
|-
|-
| 437 || Gpu || CreateNativeMemoryWithGpukMemHandle
| 437 || Gpu || CreateNativeMemoryWithGpukMemHandle
Line 88: Line 98:
| 494 || Gpu ||
| 494 || Gpu ||
|-
|-
| 496 || Gpu || [[#CreateGpuManagerSessionWithTransferMemory|CreateGpuManagerSessionWithTransferMemory]]
| 496 || Gpu || [[#CreateGpuSessionWithTransferMemory|CreateGpuSessionWithTransferMemory]]
|-
|-
| 497 || Gpu || [[#CreateGpuManagerSessionWithRemoteMemory|CreateGpuManagerSessionWithRemoteMemory]]
| 497 || Gpu || [[#CreateGpuSessionWithRemoteMemory|CreateGpuSessionWithRemoteMemory]]
|-
|-
| 498 || Gpu || TryQueryDonatedTransferMemoryUsage
| 498 || Gpu || TryQueryDonatedTransferMemoryUsage
Line 186: Line 196:
| 691 || Camera || CalculateImageArraySize
| 691 || Camera || CalculateImageArraySize
|-
|-
| 901 || VideoDecoder || CreateVideoDecoderContext
| 801 || ||
|-
| 802 || ||
|-
| 803 || ||
|-
| 811 || ||
|-
| 812 || ||
|-
| 813 || ||
|-
| 814 || ||
|-
| 861 || ||
|-
| 891 || ||
|-
| 901 || VideoDecoder || [[#CreateVideoDecoderContext|CreateVideoDecoderContext]]
|-
|-
| 902 || VideoDecoder || InitializeVideoDecoderContext
| 902 || VideoDecoder || [[#InitializeVideoDecoderContext|InitializeVideoDecoderContext]]
|-
|-
| 903 || VideoDecoder || DestroyVideoDecoderContext
| 903 || VideoDecoder || [[#DestroyVideoDecoderContext|DestroyVideoDecoderContext]]
|-
|-
| 904 || VideoDecoder || InitializeVideoDecoderContextForSystem
| 904 || VideoDecoderForSystem || [[#InitializeVideoDecoderContextForSystem|InitializeVideoDecoderContextForSystem]]
|-
|-
| 905 || VideoDecoder ||
| 905 || VideoDecoder || [[#InitializeVideoDecoderContext2|InitializeVideoDecoderContext2]]
|-
|-
| 911 || VideoDecoder || InitializeDecoderImagePool
| 911 || VideoDecoder || InitializeDecoderImagePool
Line 204: Line 232:
| 922 || VideoDecoderForSystem || FinalizeDecoderAliasImagePool
| 922 || VideoDecoderForSystem || FinalizeDecoderAliasImagePool
|-
|-
| 961 || VideoDecoderForSystem || ReadDecoderOutput
| 961 || VideoDecoder ||  
|-
|-
| 991 || VideoDecoderForSystem || CalculateDecoderImagePoolBuffer
| 991 || VideoDecoder ||  
|-
|-
| 1001 || VideoEncoder || CreateVideoEncoderContext
| 1001 || VideoEncoder || [[#CreateVideoEncoderContext|CreateVideoEncoderContext]]
|-
|-
| 1002 || VideoEncoder || InitializeVideoEncoderContext
| 1002 || VideoEncoder || [[#InitializeVideoEncoderContext|InitializeVideoEncoderContext]]
|-
|-
| 1003 || VideoEncoder || DestroyVideoEncoderContext
| 1003 || VideoEncoder || [[#DestroyVideoEncoderContext|DestroyVideoEncoderContext]]
|-
|-
| 1004 || VideoEncoder || InitializeVideoEncoderContextForSystem
| 1004 || VideoEncoderForSystem || [[#InitializeVideoEncoderContextForSystem|InitializeVideoEncoderContextForSystem]]
|-
|-
| 1011 || VideoEncoder || InitializeEncoderImagePool
| 1011 || VideoEncoder || InitializeEncoderImagePool
Line 224: Line 252:
| 1022 || VideoEncoderForSystem || FinalizeEncoderAliasImagePool
| 1022 || VideoEncoderForSystem || FinalizeEncoderAliasImagePool
|-
|-
| 1061 || VideoEncoderForSystem || WriteEncoderInput
| 1061 || VideoEncoder ||  
|-
|-
| 1091 || VideoEncoderForSystem || CalculateEncoderImagePoolBuffer
| 1091 || VideoEncoder ||  
|-
|-
| 1101 || GraphicsFrame || CreateGraphicsFrameContext
| 1101 || GraphicsFrame || CreateGraphicsFrameContext
Line 267: Line 295:
|-
|-
| 1502 || InterModuleImage || InitializeInterModuleImageContext
| 1502 || InterModuleImage || InitializeInterModuleImageContext
|-
| 1510 || InterModuleImage ||
|-
|-
| 1601 || ||
| 1601 || ||
Line 306: Line 336:


Called directly after [[#SetCurrentProcessHandle]].
Called directly after [[#SetCurrentProcessHandle]].
== CreateSyncptContext ==
Unofficial name.
No input/output.
== InitializeSyncptContext ==
Unofficial name.
No input. Returns a [[#SyncptSession]].
== CreateDebugSyncDevice ==
Unofficial name.
No input/output.
== DestroyDebugSyncDevice ==
Unofficial name.
No input/output.
== CreateDebugSyncCounter ==
Unofficial name.
Takes an input u32. Returns an output u32 and an output u64.
== DestroyDebugSyncCounter ==
Unofficial name.
Takes 2 input u32s. No output.
== ReportDebugSyncCounterValue ==
Unofficial name.
Takes an input u32, an input u64 and an input u8. No output.
== CreateDisplayContext ==
Unofficial name.
No input/output.
== DestroyDisplayContext ==
Unofficial name.
No input/output.
== InitializeDisplayContext ==
Unofficial name.
Takes an input u64 '''Version'''. Returns a [[#DisplaySession]].
[19.0.0] '''Version''' must be 0x300010000.


== CreateGpuContext ==
== CreateGpuContext ==
Line 312: Line 394:
No input/output.
No input/output.


Called directly after [[#CreateGpuManagerSessionWithTransferMemory]] or [[#CreateGpuManagerSessionWithRemoteMemory]].
Called directly after [[#CreateGpuSessionWithTransferMemory]] or [[#CreateGpuSessionWithRemoteMemory]].


== InitializeGpuContext ==
== InitializeGpuContext ==
Line 320: Line 402:


Called directly after [[#CreateGpuContext]].
Called directly after [[#CreateGpuContext]].
== DestroyGpuContext ==
Unofficial name.
No input/output.


== GetImageInfo ==
== GetImageInfo ==
Line 326: Line 413:
Takes an input u32 '''ImageHandle'''. Returns an [[#(S2)_ImageInfo|ImageInfo]].
Takes an input u32 '''ImageHandle'''. Returns an [[#(S2)_ImageInfo|ImageInfo]].


== CreateGpuManagerSessionWithTransferMemory ==
== CreateGpuSessionWithTransferMemory ==
Unofficial name.
Unofficial name.


Takes a TransferMemory handle and two input u64s '''Version''' and '''TransferMemorySize'''. Returns a [[#GpuManagerSession]].
Takes a TransferMemory handle and two input u64s '''Version''' and '''TransferMemorySize'''. Returns a [[#GpuSession]].


[19.0.0] '''Version''' must be 2.
[19.0.0] '''Version''' must be 2.


== CreateGpuManagerSessionWithRemoteMemory ==
== CreateGpuSessionWithRemoteMemory ==
Unofficial name.
Unofficial name.


Takes an input u64 '''Version'''. Returns a [[#GpuManagerSession]].
Takes an input u64 '''Version'''. Returns a [[#GpuSession]].


[19.0.0] '''Version''' must be 2.
[19.0.0] '''Version''' must be 2.
== CreateVideoDecoderContext ==
Unofficial name.
No input/output.
== InitializeVideoDecoderContext ==
Unofficial name.
No input. Returns a [[#VideoDecoderCreatorSession]].
== DestroyVideoDecoderContext ==
Unofficial name.
No input/output.
== InitializeVideoDecoderContextForSystem ==
Unofficial name.
Takes an input u32. Returns a [[#VideoDecoderCreatorSession]].
== InitializeVideoDecoderContext2 ==
Unofficial name.
Takes an input u8. Returns a [[#VideoDecoderCreatorSession]].
== CreateVideoEncoderContext ==
Unofficial name.
No input/output.
== InitializeVideoEncoderContext ==
Unofficial name.
No input. Returns a [[#VideoEncoderCreatorSession]].
== DestroyVideoEncoderContext ==
Unofficial name.
No input/output.
== InitializeVideoEncoderContextForSystem ==
Unofficial name.
Takes an input u32. Returns a [[#VideoEncoderCreatorSession]].


== CreateAdrawContext ==
== CreateAdrawContext ==
Line 383: Line 515:
No input. Returns three u64s '''TotalTransferMemorySize''', '''UsedTransferMemorySize''' and '''MaxTransferMemorySize'''.
No input. Returns three u64s '''TotalTransferMemorySize''', '''UsedTransferMemorySize''' and '''MaxTransferMemorySize'''.


== GpuManagerSession ==
== SyncptSession ==
Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.
 
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 0 || [[#Ping|Ping]]
|-
| 1 ||
|-
| 21 ||
|-
| 22 ||
|-
| 103 ||
|-
| 201 ||
|-
| 202 ||
|}
 
=== Ping ===
Unofficial name.
 
Takes an input u64. Returns an output u64.
 
The output u64 should match the input u64. Official software sends the current system tick value.
 
== DisplaySession ==
Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.
 
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 1 ||
|-
| 3 ||
|-
| 5 ||
|-
| 11 ||
|-
| 13 ||
|-
| 21 ||
|-
| 31 ||
|-
| 32 ||
|-
| 51 ||
|-
| 53 ||
|-
| 101 ||
|-
| 102 ||
|-
| 103 ||
|-
| 104 ||
|-
| 105 ||
|-
| 106 ||
|-
| 107 ||
|-
| 111 ||
|-
| 112 ||
|-
| 113 ||
|-
| 201 ||
|-
| 202 ||
|-
| 212 ||
|-
| 228 ||
|-
| 229 ||
|-
| 251 ||
|-
| 252 ||
|-
| 261 ||
|-
| 262 ||
|-
| 263 ||
|-
| 264 ||
|-
| 265 ||
|-
| 266 ||
|-
| 267 ||
|-
| 268 ||
|-
| 269 ||
|-
| 270 ||
|-
| 271 ||
|-
| 272 ||
|-
| 301 ||
|-
| 302 ||
|-
| 351 ||
|}
 
== VideoDecoderCreatorSession ==
Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.
 
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 1 || [[#CreateVideoDecoderSession|CreateVideoDecoderSession]]
|}
 
=== CreateVideoDecoderSession ===
Unofficial name.
 
No input. Returns a [[#VideoDecoderSession]].
 
=== VideoDecoderSession ===
Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.
 
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 3 || GetVideoDecoderEvent
|-
| 6 || StartDecoding
|-
| 8 ||
|-
| 101 || Setup
|-
| 109 || Decode
|-
| 115 ||
|-
| 200 || InitializeVideoDecoderWithTransferMemory
|-
| 207 || StopDecoding
|-
| 210 || InitializeVideoDecoderWithRemoteMemory
|-
| 212 ||
|-
| 213 ||
|-
| 311 ||
|-
| 314 ||
|-
| 400 || Decode2
|}
 
== VideoEncoderCreatorSession ==
Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.
 
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 1 || [[#CreateVideoEncoderSession|CreateVideoEncoderSession]]
|}
 
=== CreateVideoEncoderSession ===
Unofficial name.
 
No input. Returns a [[#VideoEncoderSession]].
 
=== VideoEncoderSession ===
Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.
 
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 4 || GetVideoEncoderEvent
|-
| 5 || StartEncoding
|-
| 100 || InitializeVideoEncoder
|-
| 101 || Setup
|-
| 102 ||
|-
| 108 || Encode
|-
| 110 ||
|-
| 111 ||
|-
| 112 ||
|-
| 206 || StopEncoding
|}
 
== GpuSession ==
Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.
Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.



Latest revision as of 05:01, 26 June 2026

UserSession

This is a TIPC interface so the command numbers are subtracted by 16.

This multiplexes several interfaces into a single session that can be acquired through am.

Cmd Interface Name
1 Gsv BootWithTransferMemory
4 Gsv BootWithRemoteMemory
11 SetCurrentProcessHandle
12
101 CreateContext
111 NativeMemory CreateNativeMemory
112 NativeMemory DestroyNativeMemory
113 NativeMemory CreateNativeMemoryBlockByTransferMemory
114 NativeMemory CreateNativeMemoryBlock
115 NativeMemory BootNativeMemoryManagement
187 NativeMemory QueryNativeMemoryNvsNvRmMemIdForDebug
201 Syncpt CreateSyncptContext
202 Syncpt InitializeSyncptContext
211 Syncpt CreateDebugSyncDevice
212 Syncpt DestroyDebugSyncDevice
213 Syncpt CreateDebugSyncCounter
214 Syncpt DestroyDebugSyncCounter
215 Syncpt ReportDebugSyncCounterValue
301 Display CreateDisplayContext
303 Display DestroyDisplayContext
305 Display InitializeDisplayContext
311 Display
312 Display
314 Display
315 Display
321 Display
327 Display
361 Display
391 Display CalculateRequiredBufferMemory
401 Gpu CreateGpuContext
402 Gpu InitializeGpuContext
403 Gpu DestroyGpuContext
423 Gpu
424 Gpu
425 Gpu
426 Gpu MapNativeImage
427 Gpu UnmapNativeImage
428 Gpu QueryNativeImage
429 Gpu CreateNativeImage
430 Gpu DestroyNativeImage
434 Gpu ExistsAddressSpace
435 Gpu CalculateNativeImageSize
437 Gpu CreateNativeMemoryWithGpukMemHandle
493 Gpu CreateUserlandDebuggerSession
494 Gpu
496 Gpu CreateGpuSessionWithTransferMemory
497 Gpu CreateGpuSessionWithRemoteMemory
498 Gpu TryQueryDonatedTransferMemoryUsage
601 Camera CreateCameraContext
602 Camera InitializeCameraContext
603 Camera DestroyCameraContext
612 Camera DestroyOutputBufferPool
613 Camera CreateAliasOutputBufferPool
614 Camera DestroyAliasOutputBufferPool
615 Camera CreateOutputBufferPool
616 Camera ReadFrameDataAsync
620 Camera InitializeB
621 Camera FinalizeB
622 Camera ListCameras
623 Camera OpenCamera
624 Camera CloseCamera
626 Camera ListSensorMode
627 Camera SetSensorMode
628 Camera GetAvailableStreams
629 Camera GetRequiredWorkBufferSize
630 Camera CreateStream
632 Camera GetReadDoneEvent
633 Camera GetStreamOutputSize
634 Camera DestroyStream
636 Camera ReadFrameDataAsync
637 Camera GetAttachedEvent
638 Camera GetDetachedEvent
639 Camera GetFrameInfo
640 Camera GetFrameInfo2
641 Camera GetConnectionChangedEvent
650 Camera SetPictureQualityConfig
651 Camera GetPictureQualityConfig
652 Camera SetDigitalWindow
653 Camera GetDigitalWindow
654 Camera GetDigitalWindowCapability
655 Camera GetSupportedFunctions
656 Camera GetSupportedDebugFunctions
657 Camera GetCameraPrivacyCoverStatus
658 Camera GetCameraDeviceTemperature
659 Camera GetDeviceUniqueId
660 Camera GetSensorMode
661 Camera GetStride
662 Camera UnlinkSensor
663 Camera GetDeviceModel
664 Camera SetRawSensorMode
665 Camera GetAccessAllowed
666 Camera GetHostDrivenAeRegion
667 Camera SetHostDrivenAeRegion
691 Camera CalculateImageArraySize
801
802
803
811
812
813
814
861
891
901 VideoDecoder CreateVideoDecoderContext
902 VideoDecoder InitializeVideoDecoderContext
903 VideoDecoder DestroyVideoDecoderContext
904 VideoDecoderForSystem InitializeVideoDecoderContextForSystem
905 VideoDecoder InitializeVideoDecoderContext2
911 VideoDecoder InitializeDecoderImagePool
912 VideoDecoder FinalizeDecoderImagePool
921 VideoDecoderForSystem InitializeDecoderAliasImagePool
922 VideoDecoderForSystem FinalizeDecoderAliasImagePool
961 VideoDecoder
991 VideoDecoder
1001 VideoEncoder CreateVideoEncoderContext
1002 VideoEncoder InitializeVideoEncoderContext
1003 VideoEncoder DestroyVideoEncoderContext
1004 VideoEncoderForSystem InitializeVideoEncoderContextForSystem
1011 VideoEncoder InitializeEncoderImagePool
1012 VideoEncoder FinalizeEncoderImagePool
1021 VideoEncoderForSystem InitializeEncoderAliasImagePool
1022 VideoEncoderForSystem FinalizeEncoderAliasImagePool
1061 VideoEncoder
1091 VideoEncoder
1101 GraphicsFrame CreateGraphicsFrameContext
1102 GraphicsFrame InitializeGraphicsFrameContext
1111 GraphicsFrame SetGraphicsFrameLengthMode
1112 GraphicsFrame SetGraphicsFrameRestartMode
1113 GraphicsFrame SetGraphicsFrameGpuTimesliceMode
1201 Chat CreateChatContext
1202 Chat InitializeChatContext
1203 Chat DestroyChatContext
1211 Chat CreateImagePool
1212 Chat DestroyImagePool
1291 Chat CalculateRequiredBufferMemory
1301 Adraw CreateAdrawContext
1302 Adraw InitializeAdrawContext
1325 Adraw GetAdrawFrameBufferHandle
1326 Adraw GetAdrawImageHandle
1401 NvDrv CreateNvDrv2UserSessionWithTransferMemory
1402 NvDrv CreateNvDrv2UserSessionWithRemoteMemory
1411 NvDrv GetNvDrv2UserTransferMemoryUsage
1501 InterModuleImage CreateInterModuleImageContext
1502 InterModuleImage InitializeInterModuleImageContext
1510 InterModuleImage
1601
1602
1603
1611
1612
1691

BootWithTransferMemory

Unofficial name.

Takes a TransferMemory handle, an input AppletResourceUserId and an input u64 TransferMemorySize. No output.

BootWithRemoteMemory

Unofficial name.

Takes a Process handle, an input 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 InfoType 31 or 32 and the remaining u64s are all 0.

SetCurrentProcessHandle

Unofficial name.

Takes a Process handle. No output.

Called directly after #BootWithTransferMemory or #BootWithRemoteMemory.

CreateContext

Unofficial name.

No input/output.

Called directly after #SetCurrentProcessHandle.

CreateSyncptContext

Unofficial name.

No input/output.

InitializeSyncptContext

Unofficial name.

No input. Returns a #SyncptSession.

CreateDebugSyncDevice

Unofficial name.

No input/output.

DestroyDebugSyncDevice

Unofficial name.

No input/output.

CreateDebugSyncCounter

Unofficial name.

Takes an input u32. Returns an output u32 and an output u64.

DestroyDebugSyncCounter

Unofficial name.

Takes 2 input u32s. No output.

ReportDebugSyncCounterValue

Unofficial name.

Takes an input u32, an input u64 and an input u8. No output.

CreateDisplayContext

Unofficial name.

No input/output.

DestroyDisplayContext

Unofficial name.

No input/output.

InitializeDisplayContext

Unofficial name.

Takes an input u64 Version. Returns a #DisplaySession.

[19.0.0] Version must be 0x300010000.

CreateGpuContext

Unofficial name.

No input/output.

Called directly after #CreateGpuSessionWithTransferMemory or #CreateGpuSessionWithRemoteMemory.

InitializeGpuContext

Unofficial name.

No input/output.

Called directly after #CreateGpuContext.

DestroyGpuContext

Unofficial name.

No input/output.

GetImageInfo

Unofficial name.

Takes an input u32 ImageHandle. Returns an ImageInfo.

CreateGpuSessionWithTransferMemory

Unofficial name.

Takes a TransferMemory handle and two input u64s Version and TransferMemorySize. Returns a #GpuSession.

[19.0.0] Version must be 2.

CreateGpuSessionWithRemoteMemory

Unofficial name.

Takes an input u64 Version. Returns a #GpuSession.

[19.0.0] Version must be 2.

CreateVideoDecoderContext

Unofficial name.

No input/output.

InitializeVideoDecoderContext

Unofficial name.

No input. Returns a #VideoDecoderCreatorSession.

DestroyVideoDecoderContext

Unofficial name.

No input/output.

InitializeVideoDecoderContextForSystem

Unofficial name.

Takes an input u32. Returns a #VideoDecoderCreatorSession.

InitializeVideoDecoderContext2

Unofficial name.

Takes an input u8. Returns a #VideoDecoderCreatorSession.

CreateVideoEncoderContext

Unofficial name.

No input/output.

InitializeVideoEncoderContext

Unofficial name.

No input. Returns a #VideoEncoderCreatorSession.

DestroyVideoEncoderContext

Unofficial name.

No input/output.

InitializeVideoEncoderContextForSystem

Unofficial name.

Takes an input u32. Returns a #VideoEncoderCreatorSession.

CreateAdrawContext

Unofficial name.

No input/output.

InitializeAdrawContext

Unofficial name.

No input/output.

Called directly after #CreateAdrawContext.

GetAdrawFrameBufferHandle

Unofficial name.

Takes an input u64. Returns an output u32 FrameBufferHandle.

Official software sends the Id obtained with GetFrameBufferInfo from adraw.

GetAdrawImageHandle

Unofficial name.

Takes seven input u64s, two input u16s and two input u32s. Returns an output u32 ImageHandle.

Official software sends 0x100000000 in the first u64, 0 in all remaining u64s, Width and Height in the two u16s, BlockCount int the first u32 and the FrameBufferHandle from GetAdrawFrameBufferHandle in the last u32.

CreateNvDrv2UserSessionWithTransferMemory

Unofficial name.

Takes a TransferMemory handle, an input u64 TransferMemorySize and an input u8. Returns an INvDrv2User.

CreateNvDrv2UserSessionWithRemoteMemory

Unofficial name.

No input. Returns an INvDrv2User.

Only one session can be open at a time, otherwise returns error 0x200f3.

GetNvDrv2UserTransferMemoryUsage

Unofficial name.

No input. Returns three u64s TotalTransferMemorySize, UsedTransferMemorySize and MaxTransferMemorySize.

SyncptSession

Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.

Cmd Name
0 Ping
1
21
22
103
201
202

Ping

Unofficial name.

Takes an input u64. Returns an output u64.

The output u64 should match the input u64. Official software sends the current system tick value.

DisplaySession

Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.

Cmd Name
1
3
5
11
13
21
31
32
51
53
101
102
103
104
105
106
107
111
112
113
201
202
212
228
229
251
252
261
262
263
264
265
266
267
268
269
270
271
272
301
302
351

VideoDecoderCreatorSession

Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.

Cmd Name
1 CreateVideoDecoderSession

CreateVideoDecoderSession

Unofficial name.

No input. Returns a #VideoDecoderSession.

VideoDecoderSession

Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.

Cmd Name
3 GetVideoDecoderEvent
6 StartDecoding
8
101 Setup
109 Decode
115
200 InitializeVideoDecoderWithTransferMemory
207 StopDecoding
210 InitializeVideoDecoderWithRemoteMemory
212
213
311
314
400 Decode2

VideoEncoderCreatorSession

Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.

Cmd Name
1 CreateVideoEncoderSession

CreateVideoEncoderSession

Unofficial name.

No input. Returns a #VideoEncoderSession.

VideoEncoderSession

Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.

Cmd Name
4 GetVideoEncoderEvent
5 StartEncoding
100 InitializeVideoEncoder
101 Setup
102
108 Encode
110
111
112
206 StopEncoding

GpuSession

Unofficial name. This is a TIPC interface so the command numbers are subtracted by 16.

Cmd Name
11 GetEventIdRange
12 CreateEvent
21 RequestKUserWorkerSession
22 GetKUserWorkerSession
33 CreateGpuAddressSpace
41 CreateGraphicsDevice
42 DestroyGraphicsDevice
102
200 SynchronizeGpuAddressSpace
201 GetUserPartitionGpuAddress
202 GetGsvPartitionGpuAddress

GetEventIdRange

Unofficial name.

No input. Returns two u32s EventIdMin and EventIdMax.

CreateEvent

Unofficial name.

Takes an input u32 EventId. Returns an output Event handle.

RequestKUserWorkerSession

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.

GetKUserWorkerSession

Unofficial name.

No input. Returns a #GetKUserWorkerSession.

Called after #RequestKUserWorkerSession and the Event handle has been signalled.

KUserWorkerSession

This is "nn::gpuk::impl::kuser::KUserWorkerSession".

This is a TIPC interface so the command numbers are subtracted by 16.

Cmd Name
101 CreateGpuMemory
102 DestroyGpuMemory
171 EnsureGpuMemoryComptags
172 SetGpuMemoryUserDebugLabel
173 SetGpuMemorySdkDebugLabel
201 [19.0.0-19.1.0] NormalMapGpuMemory4K
202 [19.0.0-19.1.0] NormalUnmapGpuMemory4K
203 [19.0.0-19.1.0] CreateSparseRegion
204 [19.0.0-19.1.0] DestroySparseRegion
205 [19.0.0-19.1.0] ExecuteSparseMapRequests
207 [19.0.0-19.1.0] NormalModifyMemoryKind4K
209 [20.0.0+] SetGpuSegmentUserDebugLabel
210 [20.0.0+] SetGpuSegmentSdkDebugLabel
211 [20.0.0+] NormalMapGpuMemory4K
212 [20.0.0+] NormalModifyMemoryKind4K
213 [20.0.0+] NormalUnmapGpuMemory4K
214 [20.0.0+] CreateSparseRegion
215 [20.0.0+] DestroySparseRegion
216 [20.0.0+] ExecuteSparseMapRequests

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 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.

gsv:m

gsv:t

gsv:sv

gsv:s3

gsv:s4