Skip to content

test(libSceAgc): pin the measured poll word and cache control echo of sceAgcDcbAcquireMem - #21202

Closed
olegon85 wants to merge 1 commit into
boykopovar:mainfrom
olegon85:test/libsceagc-acquire-mem-poll-word
Closed

olegon85 wants to merge 1 commit into
boykopovar:mainfrom
olegon85:test/libsceagc-acquire-mem-poll-word

Conversation

@olegon85

Copy link
Copy Markdown
Contributor

What

docs/dev/debt/libSceAgc.md records for sceAgcDcbAcquireMem that "the poll word is the poll cycles shifted right by four and bit 14 of the cache control also sets bit 15, as a PS5 (firmware 11.60, payload process, no driver context) wrote them for polls 0 to 1000000, and saturated it at 0xffff, without an error, for the polls 0x100000, 0xfffff0, 0x1000000, 0xffffffff and 0x44444444", and separately that a range of exactly 2^40 bytes "is emitted as the whole-address-space packet (size field 0, address 0)". The new test pins those recorded answers on the emitted packet: the poll word for the measured polls including the saturating ones, the cache-control echo with and without bit 14, the engine and cbDbOp word, the encoded size and address for a plain range, the whole-address-space encoding at exactly 2^40, just above it and at 2^64-1, and that an oversized poll still produces a packet instead of an error. The differences the debt file lists as not modelled (the 1 << 40 word-3 value, the unbounded-size range, the dropped cbDbOp bits) are deliberately not asserted. No console measurement is claimed beyond what the debt file records.

Tested

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 (no GPU or driver code changed; the added test encodes packets in memory only)
  • AI-assisted: yes

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi olegon85, I am closing this one because main already pins the same behaviour. testAcquireMem in core/libs/prx/libSceAgc/tests/Commands.cpp checks the poll word (cycles shifted right by four, including the zero and large cases), the cache control echo (bit 15 set with bit 14, including 0x4000 to 0xc000 and 0x4001 to 0xc001), the whole-address-space cases (all ones, above 1 TiB, exactly 1 TiB), the engine 2 refusal and the 32 byte size. The extra rows here (engine 1 packet words, 0xfffff0 style poll values) do not exercise a new branch of sceAgcDcbAcquireMem, and the new test binary would add a CI target for no new coverage. If you have a case that the current test misses, a row added to testAcquireMem would be welcome.

@olegon85

Copy link
Copy Markdown
Contributor Author

Confirmed: testAcquireMem in core/libs/prx/libSceAgc/tests/Commands.cpp already pins every branch my guest test reached, including the engine-1 word through sceAgcAcbAcquireMem and the whole-address-space rows. My coverage scan only looked under core/libs/tests and missed the library's own tests directory — closing accepted, no rows to add.

@olegon85
olegon85 deleted the test/libsceagc-acquire-mem-poll-word branch November 16, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants