feat(libSceAgcDriver): answer a null sceAgcDriverGetRegShadowInfo as firmware 13.42 does #14950
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14950"
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 BunnyFl on 2026-11-02T03:17:44Z.
What
sceAgcDriverGetRegShadowInfo(CP-kVAMmWVw) andsceAgcDriverGetRegShadowInfoAgr(ME1eUot7+Qw) now return 0x8A6D0003 for a null argument, as firmware 13.42's libSceAgcDriver does, before reading anything else. Every other call still throws. The declarations gain thevoid* infoargument the code tests.The last commit,
fbe0cd6e1b, casts the two entries inmain'sUnsupportedDiagnostics.cppexport-name table to the table'sint (APS5_VABI*)(void)type (core/libs/prx/libSceAgcDriver/tests/UnsupportedDiagnostics.cpp:27-28atfbe0cd6e1b). That table came tomainwith #11104 after this branch forked, and with the new declarations (core/libs/prx/libSceAgcDriver/include/AgcDriver.hpp:14-15atfbe0cd6e1b) the merged tree did not compile; adam25136 found it. The table is only used to check that each name resolves:ExportsResolveByName(core/libs/tests/ExportLookup.hpp:20atfbe0cd6e1b) tests the pointer for null and looks the name up at lines 35-36, and never calls through it.The other path depends on state AnyPS5 does not model. Each export checks a field of the module's driver context: nonzero returns 0x8A6D0001, zero copies a 0x28-byte register-shadow record into
info. The module constructor (an unexported function at 0x7c90) fills that context at load:So the copied data and the gate are not settled by the module alone.
sceAgcDriverIsEsvmProcessreads bit 16 of the same queried value (the constructor stores that half withshr $0x10,%eaxat0x7cf1and the store to[context+0xc]at0x7cfa), so it keeps throwing too. The debt entry records this so it need not be traced again.Source: firmware 13.42
libSceAgcDriver.sprx(sha25678d5ad5fb70cc874b88841035218963a063199c4513607fa8f87242b66b6277b). Read to the return, disassembly only, not measured on a console.Tested
Windows 11 Pro 10.0.26300, WinLibs GCC, Release, head
fbe0cd6e1b(maindd00a9c54emerged in ata08d4c99fc, then the cast):agc_driver_unsupported_diagnostics_testsstops with the twoinvalid conversion from 'int (*)(void*)' to 'int (*)()'errors atUnsupportedDiagnostics.cpp:45. Witha08d4c99fc's file put back at this head, the same build fails again with those 2 errors.agc_driver_reg_shadow_info,agc_driver_unsupported_diagnosticsandpublic_headers. ThelibSceAgcDriverlibrary target builds too.agc_driver_reg_shadow_info_tests,agc_driver_unsupported_diagnostics_testsandlibSceAgcDriver(found by grepping the merged tree for both names and mapping each file to its CMake target).maindd00a9c54e: AMD Radeon RX 9070 XT (Windows driver version 32.0.32015.12012, fromWin32_VideoController),ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest -V: this head 3/3 (agc_driver_graphics,agc_driver_unsupported_diagnostics,agc_driver_reg_shadow_info),main2/2 (the first two;mainhas noagc_driver_reg_shadow_info). Neither log has the missing-layer message, aVUID-id or aSYNC-HAZARDid.tools/check_conventions.py --base upstream/mainon the committed headfbe0cd6e1b: all checks pass.git merge-treewithmaindd00a9c54eis clean.Windows 11, WinLibs GCC 15.2.0 r7, Release, on upstream/main
93dbd0f82a:agc_driver_reg_shadow_info(tests/RegShadowInfo.cpp, registered in its owntests/cmakefragment) passes. It checks that both exports return 0x8A6D0003 for null.public_headerspasses.93dbd0f82a: AMD Radeon RX 9070 XT (driver 32.0.32015.7029), Vulkan SDK 1.4.363 validation layer,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest -Vforagc_driver_graphicsandagc_driver_unsupported_diagnostics: 2/2 pass on both, none skipped. Neither log has the missing-layer message, aVUID-or aSYNC-HAZARDID. The new test passes under the same settings with no validation output.python3 tools/check_conventions.py --base upstream/main: all checks pass.python3 tools/pr_overlap.py --branch feat/agcdriver-regshadow-null: no shared exports. The checks first went intoUnsupportedDiagnostics.cpp, which #11104 also edits, so they now live in their own file, and this branch merges cleanly with #11104. 35 open PRs that conflict with main share onlydocs/dev/debt/libSceAgcDriver.md; none of their diffs names these exports.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)fbe0cd6e1b, 32.0.32015.7029 for the first run🤖 Generated with Claude Code