GSP Shared Memory: Difference between revisions
m lil redesign |
m Use conventional names |
||
(One intermediate revision by the same user not shown) | |||
Line 116: | Line 116: | ||
|- | |- | ||
| 2 | | 2 | ||
| Status ( | | Status (0x1 = halted, 0x80 = error) | ||
|- | |- | ||
| 3 | | 3 | ||
Line 126: | Line 126: | ||
After adding a command, [[GSPGPU:TriggerCmdReqQueue|TriggerCmdReqQueue]] must be used to start command processing (official code does so when the total commands field is 1). | After adding a command, [[GSPGPU:TriggerCmdReqQueue|TriggerCmdReqQueue]] must be used to start command processing (official code does so when the total commands field is 1). | ||
== Commands == | == Commands == | ||
Line 155: | Line 153: | ||
Addresses specified in command parameters are virtual addresses. Depending on the command, there might be constraints on the accepted parameters. In general, some commands require parameters to be aligned, and addresses are expected to be on [[Memory_Management#Memory_Mapping|linear]], [[Memory_layout#0x1F000000_.28New_3DS_only.29|QTM]] or VRAM memory. | Addresses specified in command parameters are virtual addresses. Depending on the command, there might be constraints on the accepted parameters. In general, some commands require parameters to be aligned, and addresses are expected to be on [[Memory_Management#Memory_Mapping|linear]], [[Memory_layout#0x1F000000_.28New_3DS_only.29|QTM]] or VRAM memory. | ||
=== | === RequestDMA === | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 187: | Line 185: | ||
Any process must have acquired rendering rights, otherwise the command does nothing. | Any process must have acquired rendering rights, otherwise the command does nothing. | ||
=== | === ProcessCommandList === | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 219: | Line 217: | ||
Any process must have acquired rendering rights, otherwise the command does nothing. | Any process must have acquired rendering rights, otherwise the command does nothing. | ||
=== | === MemoryFill === | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 255: | Line 253: | ||
Addresses should be aligned to 8 bytes and must be in linear, QTM or VRAM memory, otherwise error 0xE0E02BF5 (GSP_INVALID_ADDRESS) is returned. The start address for a buffer must be below its end address, else the same error is returned. If the start address for a buffer is 0, that buffer is skipped; otherwise, its relative PSC unit is used for the fill operation. | Addresses should be aligned to 8 bytes and must be in linear, QTM or VRAM memory, otherwise error 0xE0E02BF5 (GSP_INVALID_ADDRESS) is returned. The start address for a buffer must be below its end address, else the same error is returned. If the start address for a buffer is 0, that buffer is skipped; otherwise, its relative PSC unit is used for the fill operation. | ||
=== | === DisplayTransfer === | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 288: | Line 286: | ||
No error checking is performed on the parameters. Addresses should be aligned to 8 bytes and should be in linear, QTM or VRAM memory, otherwise PA 0 is used. | No error checking is performed on the parameters. Addresses should be aligned to 8 bytes and should be in linear, QTM or VRAM memory, otherwise PA 0 is used. | ||
=== | === TextureCopy === | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 324: | Line 322: | ||
No error checking is performed on the parameters. Addresses and size should be aligned to 8 bytes, and the addresses should be in linear, QTM or VRAM memory, otherwise PA 0 is used. | No error checking is performed on the parameters. Addresses and size should be aligned to 8 bytes, and the addresses should be in linear, QTM or VRAM memory, otherwise PA 0 is used. | ||
=== | === FlushCacheRegions === | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 361: | Line 359: | ||
Any process must have acquired rendering rights, otherwise the error 0xD8202A06 (GSP_NO_RIGHT) is returned. | Any process must have acquired rendering rights, otherwise the error 0xD8202A06 (GSP_NO_RIGHT) is returned. | ||
== Bugs == | |||
* When issuing a DMA request, GSP attempts to acquire an internal semaphore that rules CDMA access; this semaphore is never released on failure paths. While this is generally not an issue, as GSP breaks on DMA failures, it becomes a problem if the DMA request is done with cache flushing: in that case, GSP will error silently, causing a deadlock in DMA code. | |||
* When handling GX commands apart from RequestDMA and ProcessCommandList, GSP sets the relative busy flags in internal state before executing the commands. This means that, if the relevant interrupts are never triggered (eg. on invalid parameters), the busy flags never get reset, preventing execution of future commands of the same kind. |