docs(agc): record the console's workload packets #8302
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8302"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-20T09:33:27Z.
What
Records in
docs/dev/debt/libSceAgc.mdwhat the console writes for the six workload calls, taken from the decryptedlibSceAgc.sprxandlibSceAgcDriver.sprx. No code changes: after review, the registered-stream throw insceAgcDcbSetWorkloadStreamInactiveand the three ACB calls is kept, as #4709 kept it, because no title has been shown stopping on these calls on current main. The DCB active and completeIT_NOPstand-ins (#3789) are unchanged.What the console writes. The libSceAgc calls reserve
sceAgcDriverGet*PacketSize()dwords and callsceAgcDriverSetWorkloadsActive/SetWorkloadComplete/SetWorkloadStreamInactive, passing engine 0 for DCB and 1 for ACB. The driver calls write:SET_UCONFIG_REGto0x342with a tag:0xCC000000 | streamfor active and inactive,0xCD000000 + workload * 32 + streamfor complete. It carries the first dword of an 8-byte payload (the active mask, or zero for inactive), and aWRITE_DATAto register0xC343carries the rest.ATOMIC_MEM(control0x267or0x275, bit 30 set on the DCB). It ORs the mask into, or ANDs the cleared bit out of, the stream's 64-bit word in a table the driver allocates at module start.That gives 18 / 12 / 9 dwords. The executor has no
ATOMIC_MEMand no workload table, and an unpredicatedSET_UCONFIG_REGis rejected on a compute queue.mainnow describes the current stand-ins in its own two entries. This PR adds one entry beside them that leads with that gap and stays under the length limit. It includes what orezraey measured on a PS5 at firmware 13.60: theWRITE_DATAdwords, the header low bytes, and the table address. The registration error codes are left to their follow-up.The Horizon Call of the Mountain thread (#6214) lists the three ACB calls among its stubs, but that title currently stops earlier (
sceHmd2ReprojectionSetAllowPositionalReprojection). Once a title is shown stopping on one of these calls, a follow-up can write the stand-in packets.Tested
Linux (CachyOS, GCC, Release):
agc_commandspasses unchanged.tools/check_conventions.pyis clean.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T09:34:15Z.
Progress report (
8a7ba4b→6a4913c)📈 System libraries: 65.23% (+0.06%, +4 implemented functions)
✅ 4 implemented
sceAgcAcbSetWorkloadCompletesceAgcAcbSetWorkloadStreamInactivesceAgcAcbSetWorkloadsActivesceAgcDcbSetWorkloadStreamInactiveImported from boykopovar/AnyPS5. Originally posted by nikowolf123 on 2026-10-20T22:04:06Z.
Acb/src/Control.cppL75-85 andDcbState/src/Workload.cppL59-64 replace the registered-stream throw with a stand-in packet.Example: after
sceAgcDriverRegisterWorkloadStream(1, record), the callsceAgcAcbSetWorkloadsActive(acb, 1, {3, 4}, 2)throwssceAgcAcbSetWorkloadsActive not implementedon main. With this PR it returns an 18-dwordIT_NOP(0xC0101000, 1, 0x18, 0, …). The console writes a different sequence: a SET_UCONFIG_REG to 0x342/0x343, a WRITE_DATA to 0xC343 and a 9-dword SET_WORKLOAD (0x1E) packet with the mask for stream 1's slot (OpenAGCacb.cL490-516,agc_workload_packet.cL18-51). The new debt entry says the same thing: "the console packets are not written".A title probably can't see the difference, because the dropped writes only reach the thread-trace user-data registers and a table the driver owns. Still, this throw was kept on purpose, and the description doesn't say why it can be removed now:
IT_NOPstand-in for the DCB calls (#3789) was merged only after PPSA29866 was shown stopping onsceAgcDcbSetWorkloadsActive not implemented.sceHmd2ReprojectionSetAllowPositionalReprojection not implemented.Could you quote the log line of a title that stops on one of these four calls on current main, as #3789 did, and mention #4709 in the description? Until a title does, I'd keep the throw for a registered stream. For the three ACB calls that means main's
RejectUnregisteredWorkloadStream. InAgc::Workload::StreamInactiveit would be:Moving the DCB builders into
Agc::Workloadcan stay either way.Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-20T23:34:29Z.
Thanks @nikowolf123, that's fair. I can't point to a title that stops on these four calls on current main: Horizon (#6214) stops earlier, on
sceHmd2ReprojectionSetAllowPositionalReprojection. So as of966018783fthe registered-stream throw is back. The ACB calls use main'sRejectUnregisteredWorkloadStreamandsceAgcDcbSetWorkloadStreamInactivethrows again, which revertsControl.cpp,Workload.cpp/.hppandCommands.cppto main. With no ACB caller left, I dropped the builder move too.The PR now only records the firmware's packet layout in
docs/dev/debt/libSceAgc.md: the SET_UCONFIG_REG tag at 0x342, the WRITE_DATA to 0xC343, and the ATOMIC_MEM on the driver's per-stream mask. That keeps the evidence for whoever writes the packets once a title needs them. The title and description now mention #4709 and say why the throw stays.agc_commandspasses unchanged.#8318 no longer needs anything from this PR except the neighbouring debt lines.
Imported from boykopovar/AnyPS5. Originally posted by orezraey on 2026-10-21T14:03:09Z.
I measured these on a retail PS5 (firmware 13.60). A homebrew probe registers a stream and calls the six functions on a plain command buffer; the source and log are in this gist. The packets match what you recorded. These details are not in the entry:
WRITE_DATA: dwords 5 to 8 are0x06010000,0xc343,0and the high half of the mask (0 for inactive).0x04on the DCBSET_UCONFIG_REGandWRITE_DATA,0x00on the ACB ones. TheATOMIC_MEMheader is0xc0071e00on both.0xfe003a000 + 8 * stream(stream 10xfe003a008, stream 310xfe003a0f8). The pointer passed tosceAgcDriverRegisterWorkloadStreamis never written, and a pointer misaligned by 1 or 4 bytes is accepted.0x8a6c0033for id 0, id 32 or an id already registered, and0x8a6c0035for a null stream;0x8a6c0033for id 0 or 32, and0x8a6c003afor a stream that is not registered.I'll open a separate PR for the registration codes only. It doesn't touch the packets, but it edits the same debt entry.
Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-22T01:43:35Z.
@orezraey thank you, that's the console evidence this entry was missing. I merged
mainand added an entry (inbea151e189ande8abcba78f) besidemain's two current workload entries. It records the firmware sequence and your measurements, linked to your gist:WRITE_DATAdwords 5 to 8;ATOMIC_MEMheader0xC0071E00;0xFE003A000 + 8 * stream;I left out the registration and unregistration codes, as you're putting those in your own PR. The null-return cases you list match the checks
main's entry already describes (63 accepted, 64 rejected), so I didn't repeat them.