Repository navigation
fix(libSceAgc): emit NOP packets for the DCB workload calls - #3789
Conversation
adriadam10
left a comment
There was a problem hiding this comment.
Thanks for the PR. Two problems, both about returning a plausible result where main threw:
Workload.cpp:13-19: the packet size and contents are invented. KytyPS5 (src/libs/agc.cpp,AgcDcbSetWorkloadsActive/AgcDcbSetWorkloadComplete) writes an 18-dword (active) / 12-dword (complete)IT_NOPpacket carrying the stream id and the workload mask (complete: stream id, workload id, clear mask). A 2-dword NOP is not what any reference emits, and the TechnicalDebt line itself says the real packet is unknown.- No argument validation: prosper's console oracle (
tests/data/console_oracle/agcbuild.golden.tsv,agcbuild_DcbSetWorkloadsActive_*/agcbuild_DcbSetWorkloadComplete_*) measures a null return on a real console for unregistered streams, and KytyPS5 also returns null for stream id outside 1..31, workload id > 63, duplicate ids, and count 0 or > 63 (active). This PR returns a packet in all those cases, andtestWorkloadspins that.
Suggested direction: follow KytyPS5's packet layouts and checks (the workload stream registry comes from sceAgcDriverRegisterWorkloadStream, so that is a prerequisite, or the unregistered case has to throw), pin the values in the test from the reference, and keep unverified parts in TechnicalDebt. Otherwise keep throwing.
|
Thanks, both points are right. Pushed AI-assisted (Claude Code). |
|
Conflicts with main in No title was run. Please run PPSA29866 on the branch and quote the line where it stops on main and the one where it stops with this. |
sceAgcDcbSetWorkloadsActive and sceAgcDcbSetWorkloadComplete threw. They now write a plain two-dword NOP and keep no workload state. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…r unregistered streams sceAgcDcbSetWorkloadsActive writes an 18-dword IT_NOP packet (stream id, 64-bit workload mask) and sceAgcDcbSetWorkloadComplete a 12-dword one (stream id, workload id, 64-bit clear mask), following KytyPS5. Both return null for a null buffer, an unregistered or out-of-range stream, a workload id above 63, and for active a duplicate id or a count of 0 or above 63. sceAgcDriverRegisterWorkloadStream and sceAgcDriverUnregisterWorkloadStream now record the stream ids the DCB calls check. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
a167cb2 to
2a7b38a
Compare
|
@adriadam10 rebased onto current AI-assisted (Claude Code). |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
|
Title run as requested, PPSA29866 (Tomba! 2 SE), Windows, GCC, RTX 4080 SUPER, on current main + #3819 (the title's missing imports):
Only the workload calls were checked this way; whether the packet contents match a console is not tested (layouts follow KytyPS5 as in the earlier comment). AI-assisted (Claude Code). |
The points from this review are in the current head.
Review on boykopovar#8302: the ACB workload calls and the DCB stream-inactive call throw again for a registered stream until a title is shown stopping on them (as boykopovar#3789 did for the DCB calls, and as boykopovar#4709 kept). The debt entry keeps the firmware's packet layout as the record of what is missing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
What
sceAgcDcbSetWorkloadsActiveandsceAgcDcbSetWorkloadCompletethrew. They now follow KytyPS5 (src/libs/agc.cpp): an 18-dword (active) or 12-dword (complete)IT_NOPpacket carrying the stream id, and for active the 64-bit mask of the workload ids, for complete the workload id and the 64-bit clear mask. Both return null for a null command buffer, an unregistered or out-of-range stream (1 to 31), a workload id above 63, and for active a duplicate id or a count of 0 or above 63.sceAgcDriverRegisterWorkloadStreamandsceAgcDriverUnregisterWorkloadStreamrecord the stream ids that the DCB calls check; registration still returns 0 for every argument, since the console's error codes for an invalid or repeated registration are unknown. This changes the first version of this PR (a plain two-dword NOP), after review.Tested
maina11c8f7 plus this branch:ctest -R "agc_commands|agc_initialization|guest_agc_driver_resources"passes.testWorkloadspins the packet header, stream id, mask, clear mask and the zero tail for ids {3,4} and workload 33, and each null case above, including after unregistration.python tools/check_conventions.py --base upstream/mainpasses.sceAgcDcbSetWorkloadsActive). Not tested: Linux, macOS.agcbuild.golden.tsv) measures a null return for unregistered streams, not the packet of a registered one; this and the registration behaviour are in TechnicalDebt.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository🤖 Generated with Claude Code