feat(libSceAgcDriver): implement diagnostic fallbacks #9086

Merged
xdCloudy merged 1 commit from upstream-pr/9086 into main 2026-10-22 23:11:17 +00:00
xdCloudy commented 2026-10-21 12:01:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xdCloudy on 2026-10-21T12:01:30Z.


What

Implement two diagnostic exports using behavior observed in the retail PS5 libSceAgcDriver.sprx:

  • sceAgcDriverGetCoredumpAddress returns the shared coredump-area pointer, which is null when no area is allocated. AnyPS5 currently disables coredump mode and allocates no such area, so the export returns null.
  • sceAgcDriverSetTargetRingForDiag returns 0x8A6D0001 (DRIVER_FEATURE_UNAVAILABLE), matching the retail export's observed response.

A focused test covers both responses. The technical-debt entry records that coredump-area support and the retail diagnostic log are not implemented. No scanner, progress, UI, history, or percentage behavior changes are included.

Evidence: disassembly of the retail PS5 libSceAgcDriver.sprx; the coredump-mode and allocation state in AnyPS5.

Tested

  • Built the focused agc_driver_unsupported_diagnostics_tests target and ran ctest -R agc_driver_unsupported_diagnostics successfully.
  • python tools/check_conventions.py --base upstream/main passed.
  • The latest overlap-bot report lists #7965 as a real debt-file line conflict in docs/dev/debt/libSceAgcDriver.md (main lines 11–12). A pairwise git merge-tree check confirms the conflict. The bot reports no same-export overlap. I manually checked the shared CMake warnings; they do not register or change agc_driver_unsupported_diagnostics_tests.
  • git diff --check passed.
  • Full project build and upstream CI have not been run. The full local build remains limited by the SDL2 submodule/XRandR dependency.

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 (#7965 has merged; its measurement notes are now in current main)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4951197321 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9086). Originally posted by [xdCloudy](https://github.com/xdCloudy) on 2026-10-21T12:01:30Z. --- ### What Implement two diagnostic exports using behavior observed in the retail PS5 `libSceAgcDriver.sprx`: - `sceAgcDriverGetCoredumpAddress` returns the shared coredump-area pointer, which is null when no area is allocated. AnyPS5 currently disables coredump mode and allocates no such area, so the export returns null. - `sceAgcDriverSetTargetRingForDiag` returns `0x8A6D0001` (`DRIVER_FEATURE_UNAVAILABLE`), matching the retail export's observed response. A focused test covers both responses. The technical-debt entry records that coredump-area support and the retail diagnostic log are not implemented. No scanner, progress, UI, history, or percentage behavior changes are included. Evidence: disassembly of the retail PS5 `libSceAgcDriver.sprx`; the coredump-mode and allocation state in AnyPS5. ### Tested - Built the focused `agc_driver_unsupported_diagnostics_tests` target and ran `ctest -R agc_driver_unsupported_diagnostics` successfully. - `python tools/check_conventions.py --base upstream/main` passed. - The latest overlap-bot report lists #7965 as a real debt-file line conflict in `docs/dev/debt/libSceAgcDriver.md` (main lines 11–12). A pairwise `git merge-tree` check confirms the conflict. The bot reports no same-export overlap. I manually checked the shared CMake warnings; they do not register or change `agc_driver_unsupported_diagnostics_tests`. - `git diff --check` passed. - Full project build and upstream CI have not been run. The full local build remains limited by the SDL2 submodule/XRandR dependency. ### 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 (#7965 has merged; its measurement notes are now in current main) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
xdCloudy commented 2026-10-21 17:01:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xdCloudy on 2026-10-21T17:01:05Z.


Manual review of the overlap report:

  • #7965's shared debt-file hunk documents sceAgcDriverSubmitAcb and other submission/packet behavior. This PR documents the separate sceAgcDriverGetCoredumpAddress and sceAgcDriverSetTargetRingForDiag responses and removes those two names from the unresolved-stub list. The overlap is adjacent edits in the same debt list; the exports and implementation regions are distinct.
  • The CMake warnings are shared-file warnings for other test/build sections. I reviewed their patches; none registers agc_driver_unsupported_diagnostics_tests or duplicates this test name.
  • The other debt-file warnings come from branches with base conflicts. I reviewed their reported hunks; they concern separate AGC behavior entries, not these two diagnostic exports.

The bot could not complete those comparisons because of the base conflicts, so this is a manual review. GitHub currently reports this PR mergeable. No unrelated PRs were changed.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6321729579 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9086#issuecomment-6321729579). Originally posted by [xdCloudy](https://github.com/xdCloudy) on 2026-10-21T17:01:05Z. --- Manual review of the overlap report: - #7965's shared debt-file hunk documents `sceAgcDriverSubmitAcb` and other submission/packet behavior. This PR documents the separate `sceAgcDriverGetCoredumpAddress` and `sceAgcDriverSetTargetRingForDiag` responses and removes those two names from the unresolved-stub list. The overlap is adjacent edits in the same debt list; the exports and implementation regions are distinct. - The CMake warnings are shared-file warnings for other test/build sections. I reviewed their patches; none registers `agc_driver_unsupported_diagnostics_tests` or duplicates this test name. - The other debt-file warnings come from branches with base conflicts. I reviewed their reported hunks; they concern separate AGC behavior entries, not these two diagnostic exports. The bot could not complete those comparisons because of the base conflicts, so this is a manual review. GitHub currently reports this PR mergeable. No unrelated PRs were changed.
fma-rc commented 2026-10-21 23:44:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-21T23:44:07Z.

Review: APPROVED


Checked against the PS5 12.70 libSceAgcDriver module: sceAgcDriverGetCoredumpAddress returns the driver's coredump area pointer, which stays null until that area is allocated, and sceAgcDriverSetTargetRingForDiag logs and returns 0x8A6D0001. Both match what this PR does. Built on Linux together with main and your other open PRs; agc_driver_unsupported_diagnostics passes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5607578722 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9086#pullrequestreview-5607578722). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-21T23:44:07Z. **Review:** APPROVED --- Checked against the PS5 12.70 libSceAgcDriver module: sceAgcDriverGetCoredumpAddress returns the driver's coredump area pointer, which stays null until that area is allocated, and sceAgcDriverSetTargetRingForDiag logs and returns 0x8A6D0001. Both match what this PR does. Built on Linux together with main and your other open PRs; agc_driver_unsupported_diagnostics passes.
xdCloudy commented 2026-10-22 01:33:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xdCloudy on 2026-10-22T01:33:50Z.


Relevant: the conflict with #7965 in docs/dev/debt/libSceAgcDriver.md (lines 11–12) is confirmed. I’ve updated this PR’s Depends on entry and asked #7965’s author to confirm the landing order; the report shows no same-export overlap. The other entries are skipped comparisons, so I’ll continue reviewing those shared files manually.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6330524404 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9086#issuecomment-6330524404). Originally posted by [xdCloudy](https://github.com/xdCloudy) on 2026-10-22T01:33:50Z. --- Relevant: the conflict with #7965 in docs/dev/debt/libSceAgcDriver.md (lines 11–12) is confirmed. I’ve updated this PR’s Depends on entry and asked #7965’s author to confirm the landing order; the report shows no same-export overlap. The other entries are skipped comparisons, so I’ll continue reviewing those shared files manually.
xdCloudy commented 2026-10-22 02:26:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xdCloudy on 2026-10-22T02:26:17Z.


Follow-up to my note above: the remaining skipped comparisons have now been reviewed. The CMake warnings do not add a competing registration for gc_driver_unsupported_diagnostics_tests; the related edits are in other build/test sections. The debt-file warnings describe other AGC routines, while this PR's entries concern only sceAgcDriverGetCoredumpAddress and sceAgcDriverSetTargetRingForDiag. My earlier review summary is at https://github.com/boykopovar/AnyPS5/pull/9086#issuecomment-6321729579. #7965 remains the one confirmed adjacent debt-list conflict, and I have requested landing-order confirmation there.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6331191751 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9086#issuecomment-6331191751). Originally posted by [xdCloudy](https://github.com/xdCloudy) on 2026-10-22T02:26:17Z. --- Follow-up to my note above: the remaining skipped comparisons have now been reviewed. The CMake warnings do not add a competing registration for gc_driver_unsupported_diagnostics_tests; the related edits are in other build/test sections. The debt-file warnings describe other AGC routines, while this PR's entries concern only sceAgcDriverGetCoredumpAddress and sceAgcDriverSetTargetRingForDiag. My earlier review summary is at https://github.com/boykopovar/AnyPS5/pull/9086#issuecomment-6321729579. #7965 remains the one confirmed adjacent debt-list conflict, and I have requested landing-order confirmation there.
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!9086
No description provided.