feat(libSceGnmDriverForNeoMode): return from 25 calls as firmware 13.42 does #15605

Merged
BunnyFl merged 1 commit from upstream-pr/15605 into main 2026-11-07 11:13:49 +00:00
BunnyFl commented 2026-11-03 21:27:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-03T21:27:25Z.


What

25 libSceGnmDriverForNeoMode exports threw. In firmware 13.42 each one returns at once, reading none of its arguments and writing nothing, and this change does the same:

Export NID Firmware body Returns here
KKsYtugjKLw (unnamed) KKsYtugjKLw ret nothing (void)
8+itHHi1ea0 (unnamed) 8+itHHi1ea0 ret nothing (void)
sceGnmValidateGetVersion HzMN7ANqYEc xor %eax,%eax 0
sceGnmDriverInternalVirtualQuery BvvO8Up88Zc xor %eax,%eax 0
sceGnmIsDebugResetAvailable xMMot887QXE xor %eax,%eax 0
sceGnmRaiseUserExceptionEvent +rJnw2e9O+0 xor %eax,%eax 0
sceGnmGetCoredumpAddress GviyYfFQIkc xor %eax,%eax 0
sceGnmPaHeartbeat tNuT48mApTc xor %eax,%eax 0
sceGnmPaDisableFlipCallbacks +N+wrSYBLIw xor %eax,%eax 0
sceGnmPaEnableFlipCallbacks 8WDA9RiXLaw xor %eax,%eax 0
unnamed -bNK8kTFf6s, UGePHM7rmgA, QP7vDGU0xDQ, 7LTGukH+M1A, 2T1zOhnddFQ, MLr+Fyrxf+8, QWuQed5Mus4 xor %eax,%eax 0
unnamed 6a3+Twrkogk, epUMKkeaze8, HEOIaxbuVTA, 5R1E24FRI4w, v7QcBXR48L8, gQNwGezNDgE, +RaJBCVJZVM, 1TRGZJsC5Y4 mov $0x8eee00ff,%eax 0x8EEE00FF (the file's Failure)

The named ones keep their no-parameter declarations. The two ret-only unnamed ones become void in include/InventoryExports.hpp, since their bodies leave rax as the caller left it.

Three named exports whose bodies are also a lone ret stay as they are: sceGnmGpuPaDebugEnter, sceGnmGpuPaDebugLeave and sceGnmRegisterGnmLiveCallbackConfig. A void body that does nothing is a silent stub under the Conventions check, and these don't unblock a title.

docs/dev/debt/libSceGnmDriverForNeoMode.md:

  • removes the sceGnmIsDebugResetAvailable entry;
  • changes the pending named exports from 33 to 25;
  • cuts "Additional callable exports" to the three NIDs that still throw (R3TYO7Tdv5o, sKhoi2ectC0, ut57TBmRQN0);
  • adds an "immediate returns" entry under Functional. It says the signatures and return types are unverified, and that the values are read from disassembly, not measured on a console. This follows the existing "retail-only answers" entry for sceGnmDriverTraceInProgress and the others.

Source

Firmware 13.42 system/common/lib/libSceGnmDriverForNeoMode.sprx (sha256 c2bf0635bc2c6f96ac672ddc03d1db255a6d065b2d49de4ad5e74c86d82bf960), read from disassembly, not run on a console. Export addresses come from the module's dynamic symbol table. Each body runs to its return:

100:  ret                       ; KKsYtugjKLw
110:  ret                       ; 8+itHHi1ea0
120:  xor %eax,%eax ; ret       ; -bNK8kTFf6s
1890: xor %eax,%eax ; ret       ; sceGnmValidateGetVersion
1990: xor %eax,%eax ; ret       ; sceGnmDriverInternalVirtualQuery
3c30: xor %eax,%eax ; ret       ; sceGnmIsDebugResetAvailable
4b0:  xor %eax,%eax ; ret       ; sceGnmRaiseUserExceptionEvent
4c0:  xor %eax,%eax ; ret       ; UGePHM7rmgA
4d0:  xor %eax,%eax ; ret       ; QP7vDGU0xDQ
4e0:  xor %eax,%eax ; ret       ; 7LTGukH+M1A
4f0:  xor %eax,%eax ; ret       ; sceGnmGetCoredumpAddress
530:  xor %eax,%eax ; ret       ; 2T1zOhnddFQ
580:  xor %eax,%eax ; ret       ; MLr+Fyrxf+8
590:  xor %eax,%eax ; ret       ; sceGnmPaHeartbeat
5a0:  xor %eax,%eax ; ret       ; sceGnmPaDisableFlipCallbacks
5b0:  xor %eax,%eax ; ret       ; sceGnmPaEnableFlipCallbacks
5c0:  xor %eax,%eax ; ret       ; QWuQed5Mus4
2130: mov $0x8eee00ff,%eax ; ret ; 6a3+Twrkogk
2140: mov $0x8eee00ff,%eax ; ret ; epUMKkeaze8
4fc0: mov $0x8eee00ff,%eax ; ret ; HEOIaxbuVTA
4fd0: mov $0x8eee00ff,%eax ; ret ; 5R1E24FRI4w
4ff0: mov $0x8eee00ff,%eax ; ret ; v7QcBXR48L8
5000: mov $0x8eee00ff,%eax ; ret ; gQNwGezNDgE
5010: mov $0x8eee00ff,%eax ; ret ; +RaJBCVJZVM
5120: mov $0x8eee00ff,%eax ; ret ; 1TRGZJsC5Y4

No argument register is read and nothing is stored. A null or invalid pointer is never dereferenced, here or in firmware.

Tested

  • Windows 11, WinLibs GCC, Release, head 4b7db6f280: 71 of 71 pass. That is the six guest_gnm_neo_* tests, public_headers and the 64 public_headers_compile_* batches.
  • core/libs/tests/GuestGnmNeoRetail.cpp now calls all 25: the 15 that return 0 join its existing 0 rows, the 8 unnamed 0x8EEE00FF ones get their own Failure row, and it calls the two void ones.
  • Negative control: I put NotImplemented_nid_no_patch(__func__) back at the top of the 25 bodies, which is main's behaviour, and kept this branch's signatures and test. guest_gnm_neo_retail then aborts with sceGnmDriverInternalVirtualQuery not implemented (1 of 1 failed).
  • tools/check_conventions.py --base upstream/main on the committed head: all checks pass.
  • tools/pr_overlap.py --branch: only #14212 shares a file. It is a repo-wide debt reformat that conflicts with main. In this file it only rewords the counts in the two entries changed here. No open PR changes these 25 functions.
  • Linux and macOS were not built or run. No title was run.

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

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5144770684 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15605). Originally posted by [BunnyFl](https://github.com/BunnyFl) on 2026-11-03T21:27:25Z. --- ### What 25 libSceGnmDriverForNeoMode exports threw. In firmware 13.42 each one returns at once, reading none of its arguments and writing nothing, and this change does the same: | Export | NID | Firmware body | Returns here | |---|---|---|---| | `KKsYtugjKLw` (unnamed) | `KKsYtugjKLw` | `ret` | nothing (`void`) | | `8+itHHi1ea0` (unnamed) | `8+itHHi1ea0` | `ret` | nothing (`void`) | | `sceGnmValidateGetVersion` | `HzMN7ANqYEc` | `xor %eax,%eax` | 0 | | `sceGnmDriverInternalVirtualQuery` | `BvvO8Up88Zc` | `xor %eax,%eax` | 0 | | `sceGnmIsDebugResetAvailable` | `xMMot887QXE` | `xor %eax,%eax` | 0 | | `sceGnmRaiseUserExceptionEvent` | `+rJnw2e9O+0` | `xor %eax,%eax` | 0 | | `sceGnmGetCoredumpAddress` | `GviyYfFQIkc` | `xor %eax,%eax` | 0 | | `sceGnmPaHeartbeat` | `tNuT48mApTc` | `xor %eax,%eax` | 0 | | `sceGnmPaDisableFlipCallbacks` | `+N+wrSYBLIw` | `xor %eax,%eax` | 0 | | `sceGnmPaEnableFlipCallbacks` | `8WDA9RiXLaw` | `xor %eax,%eax` | 0 | | unnamed | `-bNK8kTFf6s`, `UGePHM7rmgA`, `QP7vDGU0xDQ`, `7LTGukH+M1A`, `2T1zOhnddFQ`, `MLr+Fyrxf+8`, `QWuQed5Mus4` | `xor %eax,%eax` | 0 | | unnamed | `6a3+Twrkogk`, `epUMKkeaze8`, `HEOIaxbuVTA`, `5R1E24FRI4w`, `v7QcBXR48L8`, `gQNwGezNDgE`, `+RaJBCVJZVM`, `1TRGZJsC5Y4` | `mov $0x8eee00ff,%eax` | `0x8EEE00FF` (the file's `Failure`) | The named ones keep their no-parameter declarations. The two `ret`-only unnamed ones become `void` in `include/InventoryExports.hpp`, since their bodies leave `rax` as the caller left it. Three named exports whose bodies are also a lone `ret` stay as they are: `sceGnmGpuPaDebugEnter`, `sceGnmGpuPaDebugLeave` and `sceGnmRegisterGnmLiveCallbackConfig`. A `void` body that does nothing is a silent stub under the Conventions check, and these don't unblock a title. `docs/dev/debt/libSceGnmDriverForNeoMode.md`: - removes the `sceGnmIsDebugResetAvailable` entry; - changes the pending named exports from 33 to 25; - cuts "Additional callable exports" to the three NIDs that still throw (`R3TYO7Tdv5o`, `sKhoi2ectC0`, `ut57TBmRQN0`); - adds an "immediate returns" entry under Functional. It says the signatures and return types are unverified, and that the values are read from disassembly, not measured on a console. This follows the existing "retail-only answers" entry for `sceGnmDriverTraceInProgress` and the others. ### Source Firmware 13.42 `system/common/lib/libSceGnmDriverForNeoMode.sprx` (sha256 `c2bf0635bc2c6f96ac672ddc03d1db255a6d065b2d49de4ad5e74c86d82bf960`), read from disassembly, not run on a console. Export addresses come from the module's dynamic symbol table. Each body runs to its return: ``` 100: ret ; KKsYtugjKLw 110: ret ; 8+itHHi1ea0 120: xor %eax,%eax ; ret ; -bNK8kTFf6s 1890: xor %eax,%eax ; ret ; sceGnmValidateGetVersion 1990: xor %eax,%eax ; ret ; sceGnmDriverInternalVirtualQuery 3c30: xor %eax,%eax ; ret ; sceGnmIsDebugResetAvailable 4b0: xor %eax,%eax ; ret ; sceGnmRaiseUserExceptionEvent 4c0: xor %eax,%eax ; ret ; UGePHM7rmgA 4d0: xor %eax,%eax ; ret ; QP7vDGU0xDQ 4e0: xor %eax,%eax ; ret ; 7LTGukH+M1A 4f0: xor %eax,%eax ; ret ; sceGnmGetCoredumpAddress 530: xor %eax,%eax ; ret ; 2T1zOhnddFQ 580: xor %eax,%eax ; ret ; MLr+Fyrxf+8 590: xor %eax,%eax ; ret ; sceGnmPaHeartbeat 5a0: xor %eax,%eax ; ret ; sceGnmPaDisableFlipCallbacks 5b0: xor %eax,%eax ; ret ; sceGnmPaEnableFlipCallbacks 5c0: xor %eax,%eax ; ret ; QWuQed5Mus4 2130: mov $0x8eee00ff,%eax ; ret ; 6a3+Twrkogk 2140: mov $0x8eee00ff,%eax ; ret ; epUMKkeaze8 4fc0: mov $0x8eee00ff,%eax ; ret ; HEOIaxbuVTA 4fd0: mov $0x8eee00ff,%eax ; ret ; 5R1E24FRI4w 4ff0: mov $0x8eee00ff,%eax ; ret ; v7QcBXR48L8 5000: mov $0x8eee00ff,%eax ; ret ; gQNwGezNDgE 5010: mov $0x8eee00ff,%eax ; ret ; +RaJBCVJZVM 5120: mov $0x8eee00ff,%eax ; ret ; 1TRGZJsC5Y4 ``` No argument register is read and nothing is stored. A null or invalid pointer is never dereferenced, here or in firmware. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> - Windows 11, WinLibs GCC, Release, head `4b7db6f280`: 71 of 71 pass. That is the six `guest_gnm_neo_*` tests, `public_headers` and the 64 `public_headers_compile_*` batches. - `core/libs/tests/GuestGnmNeoRetail.cpp` now calls all 25: the 15 that return 0 join its existing 0 rows, the 8 unnamed `0x8EEE00FF` ones get their own `Failure` row, and it calls the two `void` ones. - **Negative control:** I put `NotImplemented_nid_no_patch(__func__)` back at the top of the 25 bodies, which is `main`'s behaviour, and kept this branch's signatures and test. `guest_gnm_neo_retail` then aborts with `sceGnmDriverInternalVirtualQuery not implemented` (1 of 1 failed). - `tools/check_conventions.py --base upstream/main` on the committed head: all checks pass. - `tools/pr_overlap.py --branch`: only #14212 shares a file. It is a repo-wide debt reformat that conflicts with `main`. In this file it only rewords the counts in the two entries changed here. No open PR changes these 25 functions. - Linux and macOS were not built or run. No title was run. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!15605
No description provided.