GSP Services

GSP Services

GSP service “gsp::Gpu” #

Command HeaderAvailable since system versionGSP rights requiredDescription
0x00010082YesWriteHWRegs
0x00020084YesWriteHWRegsWithMask
0x00030082YesWriteHWRegRepeat
0x00040080YesReadHWRegs
0x00050200YesSetBufferSwap
0x00060082NoSetCommandList (Stubbed)
0x000700C2NoRequestDma (Stubbed)
0x00080082NoFlushDataCache
0x00090082NoInvalidateDataCache
0x000A0044NoRegisterInterruptEvents (Stubbed)
0x000B0040See belowSetLcdForceBlack
0x000C0000NoTriggerCmdReqQueue
0x000D0140NoSetDisplayTransfer (Stubbed)
0x000E0180NoSetTextureCopy (Stubbed)
0x000F0200NoSetMemoryFill (Stubbed)
0x00100040NoSetAxiConfigQoSMode
0x00110040NoSetPerfLogMode
0x00120000NoGetPerfLog
0x00130042NoRegisterInterruptRelayQueue
0x00140000NoUnregisterInterruptRelayQueue
0x00150002NoTryAcquireRight
0x00160042NoAcquireRight
0x00170000NoReleaseRight
0x00180000NoImportDisplayCaptureInfo
0x00190000See belowSaveVramSysArea
0x001A0000See belowRestoreVramSysArea
0x001B0000YesResetGpuCore
0x001C0040NoSetLedForceOff
0x001D0040NoSetTestCommand (Stubbed)
0x001E0080NoSetInternalPriorities
0x001F00828.0.0-18NoStoreDataCache

The GSP module starts a thread for handling commands for each service session, a maximum of 4 processes can use this service at once. Official applications have an optional code-path which writes to registers during initialization, this is normally not used however.

If a process has acquired rights, attempting to set LCDs to black from another process will fail. Saving/restoring VRAM requires bit0 of process flags to be set.

GSP service “gsp::Lcd” #

Command HeaderAvailable since system versionDescription
0x00010040EnableABL
0x00020040DisableABL
0x00030080SetRSLut
0x000400C0SetRSParams
0x00050140SetABLArea
0x00060140?
0x00070080SetInertia
0x000800C0SetDitherMode
0x00090140SetDitherParams
0x000A0080SetBrightnessRaw
0x000B0080SetBrightness
0x000C0040ReloadConfig
0x000D0040RestoreConfig
0x000E0000GetPowerState
0x000F0000PowerOnAllBacklights
0x00100000PowerOffAllBacklights
0x00110040PowerOnBacklight
0x00120040PowerOffBacklight
0x00130040SetLedForceOff
0x001400008.0.0-18GetVendor New3DS-only, stubbed on Old3DS: This only returns an error. Uninitialized data(not set by this command itself) is also written to u8 cmdreply_word[2].
0x001500408.0.0-18GetBrightness New3DS-only, stubbed on Old3DS: This only returns an error. Uninitialized data(not set by this command itself) is also written to u32 cmdreply_word[2].

Unlike gsp::Gpu, GSP module does not start a separate thread for handling these service commands.

Version history #

VersionChanges
v8196Support for the new LINEAR memory region was implemented(for cache commands and vaddr->physaddr conversion). Support for the new process-mem 0x1E800000 region(however the GPU can’t actually access this memory) was added for vaddr->physaddr conversion. Originally GSP module ignored vaddr->physaddr conversion errors(like with vaddrs outside of the handled ranges) and just wrote physaddr value0 to the GPU registers, however now GSP module returns an error for that instead(see here regarding errors being written to GSP shared-mem). New services commands were added too, see above.

New3DS #

There’s separate GSP-module titles for Old3DS and New3DS. PTM CheckNew3DS is only used by the New3DS title, for copying that flag into a state field. Elsewhere that field is checked for running additional code only on New3DS, for processing various state / using QTM commands.

Category:Services