feat(libSceGnmDriverForNeoMode): answer the last 28 calls as PS4 firmware 10.71 does #16238

Merged
ntamas94 merged 7 commits from upstream-pr/16238 into main 2026-11-19 20:30:58 +00:00
ntamas94 commented 2026-11-05 21:44:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ntamas94 on 2026-11-05T21:44:30Z.


What

Builds on #15605, now merged into main. This PR's own changes are 8e78aa0a27 and d5a7de9991. All 28 libSceGnmDriverForNeoMode exports that still throw after #15605 now answer as the PS4 firmware 10.71 module does. The progress count for the library goes from 111 to 139 of 139, and no export of the library throws any more.

Export 10.71 vaddr Here
sceGnmGetGpuInfoStatus, sceGnmGetProtectionFaultTimeStamp, sceGnmGetGpuBlockStatus, sceGnmGetShaderStatus, sceGnmGetShaderProgramBaseAddress, sceGnmGetLastWaitedAddress 0x5e0–0x630 return 0
sceGnmInsertThreadTraceMarker 0x41b0 returns 0
sceGnmGetCoredumpMode(uint32_t*) 0x6d0 writes 0 and returns 0; a null output returns 1
sceGnmIsCoredumpValid, sceGnmGetCoredumpProtectionFaultTimestamp 0x690, 0x6b0 return 0, the module's answer while its coredump area is unmapped
sceGnmDestroyWorkloadStream(uint32_t) 0x850 returns 0 for streams 1 to 15, otherwise 1
sceGnmGetNumTcaUnits, sceGnmLogicalTcaUnitToPhysical(uint32_t) 0x760, 0x6f0 2 units and the map 0x10, the module's answer when its GC ioctl 0xc004811f fails
sceGnmDrawOpaqueAuto 0x1c70 7-word packet: DRAW_INDEX_AUTO with count 0x10 and initiator 0x42, then a NOP
sceGnmDrawIndexMultiInstanced 0x1d20 13-word packet: opcode 0x3a with eight body words, then a NOP; refuses a null or odd index address, or an object id address with a nonzero low byte
sceGnmGpuPaDebugEnter, sceGnmGpuPaDebugLeave, sceGnmRegisterGnmLiveCallbackConfig 0x5a0, 0x5b0, 0x3900 lone ret, now void
sceGnmSetWaveLimitMultiplier, sceGnmSetWaveLimitMultipliers 0x56f0, 0x5710 return 1 without applying the limits (the module passes them to ioctl 0xc030811e)
sceGnmSubmitCommandBuffersForWorkload, sceGnmSubmitAndFlipCommandBuffersForWorkload 0xf80, 0x1410 0x80D11000 for null address or size arrays, ccb sizes without addresses, a dcb size of 0 or a size of 0x3ffffd or more (no checks for a count of 0); otherwise 0x80D110FF, the module's answer when the GC ioctl 0xc0088101 refuses the queue
sceGnmRequestFlipAndSubmitDoneForWorkload 0x17c0 0x80D11001 below 0x100 command words, otherwise 0x80D110FF from the same ioctl, before it writes the command
sceGnmMapComputeQueueWithPriority 0x3f40 0x80D17000 to 0x80D17004 for pipe, queue, ring size, ring base, then read pointer or priority, in that order; otherwise 0x80D170FF, the module's answer when the mapping ioctl fails
sceGnmDingDongForWorkload 0x4090 returns 0 and rings nothing, since no queue can be mapped
R3TYO7Tdv5o, ut57TBmRQN0, sKhoi2ectC0 (unnamed) 0x1a10, 0x1a60, 0x1ab0 set, clear and read a module flag that the module's workload flip paths read

Both draw writers take the predicate bit from flag bit 0, as the module does.

AnyPS5 has no GC device and nothing on main consumes a GNM command buffer or runs a GNM compute queue. The submits and the queue map therefore return the module's refused-ioctl codes rather than succeeding, so a caller sees that GPU submission is unavailable. A valid submit reads no command buffer.

docs/dev/debt/libSceGnmDriverForNeoMode.md:

  • adds a Silent stubs section for the three ret bodies, the wave limit calls and sceGnmDingDongForWorkload;
  • adds Functional entries for the returns, the coredump and TCA queries, the draw packets, the workload submits, the queue map and the flip option;
  • removes the pending exports entry and drops sceGnmDingDongForWorkload from Unknown function info.

Source

PS4 firmware 10.71 system/common/lib/libSceGnmDriverForNeoMode.sprx (decrypted ELF sha256 fd3e06cd7d130b675334cd0e1dfb52d2aab0d6960624d51d2db8ffd7842cf07b), read from disassembly, not run on a console. Addresses come from the module's dynamic symbol table. Parameter lists are read from the registers each body uses; the types are unverified.

Source: every one of the 28 follows PS4 firmware 10.71 libSceGnmDriverForNeoMode.sprx, read from disassembly. The PS5 module (13.42 or 13.60) was not available to read, so none of them is checked against it; the debt entries state the PS4 source.

Tested

Windows 11, MinGW GCC Release build. All six guest_gnm_neo_* tests pass. guest_gnm_neo_packets checks both new packets word by word and every refusal. guest_gnm_neo_retail checks the returns, the coredump mode output, the stream range, the TCA answers, the flag round trip, each submit and queue map refusal in order, and that the flip call writes nothing. tools/check_conventions.py passes.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5179181336 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16238). Originally posted by [ntamas94](https://github.com/ntamas94) on 2026-11-05T21:44:30Z. --- ### What Builds on #15605, now merged into `main`. This PR's own changes are `8e78aa0a27` and `d5a7de9991`. All 28 libSceGnmDriverForNeoMode exports that still throw after #15605 now answer as the PS4 firmware 10.71 module does. The progress count for the library goes from 111 to 139 of 139, and no export of the library throws any more. | Export | 10.71 vaddr | Here | |---|---|---| | `sceGnmGetGpuInfoStatus`, `sceGnmGetProtectionFaultTimeStamp`, `sceGnmGetGpuBlockStatus`, `sceGnmGetShaderStatus`, `sceGnmGetShaderProgramBaseAddress`, `sceGnmGetLastWaitedAddress` | 0x5e0–0x630 | return 0 | | `sceGnmInsertThreadTraceMarker` | 0x41b0 | returns 0 | | `sceGnmGetCoredumpMode(uint32_t*)` | 0x6d0 | writes 0 and returns 0; a null output returns 1 | | `sceGnmIsCoredumpValid`, `sceGnmGetCoredumpProtectionFaultTimestamp` | 0x690, 0x6b0 | return 0, the module's answer while its coredump area is unmapped | | `sceGnmDestroyWorkloadStream(uint32_t)` | 0x850 | returns 0 for streams 1 to 15, otherwise 1 | | `sceGnmGetNumTcaUnits`, `sceGnmLogicalTcaUnitToPhysical(uint32_t)` | 0x760, 0x6f0 | 2 units and the map `0x10`, the module's answer when its GC ioctl `0xc004811f` fails | | `sceGnmDrawOpaqueAuto` | 0x1c70 | 7-word packet: `DRAW_INDEX_AUTO` with count `0x10` and initiator `0x42`, then a NOP | | `sceGnmDrawIndexMultiInstanced` | 0x1d20 | 13-word packet: opcode `0x3a` with eight body words, then a NOP; refuses a null or odd index address, or an object id address with a nonzero low byte | | `sceGnmGpuPaDebugEnter`, `sceGnmGpuPaDebugLeave`, `sceGnmRegisterGnmLiveCallbackConfig` | 0x5a0, 0x5b0, 0x3900 | lone `ret`, now `void` | | `sceGnmSetWaveLimitMultiplier`, `sceGnmSetWaveLimitMultipliers` | 0x56f0, 0x5710 | return 1 without applying the limits (the module passes them to ioctl `0xc030811e`) | | `sceGnmSubmitCommandBuffersForWorkload`, `sceGnmSubmitAndFlipCommandBuffersForWorkload` | 0xf80, 0x1410 | `0x80D11000` for null address or size arrays, ccb sizes without addresses, a dcb size of 0 or a size of `0x3ffffd` or more (no checks for a count of 0); otherwise `0x80D110FF`, the module's answer when the GC ioctl `0xc0088101` refuses the queue | | `sceGnmRequestFlipAndSubmitDoneForWorkload` | 0x17c0 | `0x80D11001` below `0x100` command words, otherwise `0x80D110FF` from the same ioctl, before it writes the command | | `sceGnmMapComputeQueueWithPriority` | 0x3f40 | `0x80D17000` to `0x80D17004` for pipe, queue, ring size, ring base, then read pointer or priority, in that order; otherwise `0x80D170FF`, the module's answer when the mapping ioctl fails | | `sceGnmDingDongForWorkload` | 0x4090 | returns 0 and rings nothing, since no queue can be mapped | | `R3TYO7Tdv5o`, `ut57TBmRQN0`, `sKhoi2ectC0` (unnamed) | 0x1a10, 0x1a60, 0x1ab0 | set, clear and read a module flag that the module's workload flip paths read | Both draw writers take the predicate bit from flag bit 0, as the module does. AnyPS5 has no GC device and nothing on `main` consumes a GNM command buffer or runs a GNM compute queue. The submits and the queue map therefore return the module's refused-ioctl codes rather than succeeding, so a caller sees that GPU submission is unavailable. A valid submit reads no command buffer. `docs/dev/debt/libSceGnmDriverForNeoMode.md`: - adds a Silent stubs section for the three `ret` bodies, the wave limit calls and `sceGnmDingDongForWorkload`; - adds Functional entries for the returns, the coredump and TCA queries, the draw packets, the workload submits, the queue map and the flip option; - removes the pending exports entry and drops `sceGnmDingDongForWorkload` from Unknown function info. ### Source PS4 firmware 10.71 `system/common/lib/libSceGnmDriverForNeoMode.sprx` (decrypted ELF sha256 `fd3e06cd7d130b675334cd0e1dfb52d2aab0d6960624d51d2db8ffd7842cf07b`), read from disassembly, not run on a console. Addresses come from the module's dynamic symbol table. Parameter lists are read from the registers each body uses; the types are unverified. Source: every one of the 28 follows PS4 firmware 10.71 `libSceGnmDriverForNeoMode.sprx`, read from disassembly. The PS5 module (13.42 or 13.60) was not available to read, so none of them is checked against it; the debt entries state the PS4 source. ### Tested Windows 11, MinGW GCC Release build. All six `guest_gnm_neo_*` tests pass. `guest_gnm_neo_packets` checks both new packets word by word and every refusal. `guest_gnm_neo_retail` checks the returns, the coredump mode output, the stream range, the TCA answers, the flag round trip, each submit and queue map refusal in order, and that the flip call writes nothing. `tools/check_conventions.py` passes. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!16238
No description provided.