feat(libSceAjm): build sceAjmBatchJobRunBufferRa jobs as firmware 13.42 does #12372
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12372"
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 zaryabzip on 2026-10-28T11:44:38Z.
What
Makes
sceAjmBatchJobRunBufferRawrite the bytes firmware 13.42 writes, and implements the throwing libSceAjmi copy with the same routine. It builds on #11238 (now merged): the test reuses its libSceAjmi loader and thelibSceAjmi.prxargument.Merge order with #3205, which also changes
core/libs/tests/GuestAjm.cppand needs a rebase: this PR, then #3205 rebased on top (proposed on #3205).BunnyFl ran 13.42's
sceAjmBatchJobRunBufferRafromlibSceAjm.sprx(0xb90) andlibSceAjmi.sprx(0xc50) in an x86-64 emulator on a 0xCC-filled buffer. Both modules wrote the same bytes, returned the same pointer and called no import (layout, flags). It has not been measured on a console. Againstmain, the routine differs in two ways:mainwrites all of these words fresh, assceAjmBatchJobInlineBufferdid before #11238's review.0x0000e00000001fff. Bits 0-12 go to the second word, and bits 45-47 go to the payload. The rest are dropped.mainstores every bit. The same mask is prosper'sAJM_RUN_FLAGS_MASK.The run left two points open, because the fill had those bits clear:
Both follow the PS4 trace already recorded in
docs/dev/debt/libSceAjm.native.md.The libSceAjm reader already ignores the kept bits.
TestConsoleStaleHeaderBitscovers that, and the end-to-end run jobs inTestConsoleBufferJobsandTestConsoleInlineBuffernow go through stale bits and still decode.sceAjmBatchJobRunBufferRano longer forwards tosceAjmBatchJobRunSplitBufferRa. NeithersceAjmBatchJobRunSplitBufferRanorsceAjmBatchJobControlBufferRawas run, so both still write fresh words and every flag bit. The debt entry says so.In libSceAjmi,
sceAjmBatchJobRunBufferRa_nid_disambig1now has the full signature and the same writes. That makes both of its declared exports implemented.The test checks both libraries against BunnyFl's bytes:
TestConsoleBufferJobsnow expects the kept bits in the run job's chunk words.Tested
Rebased onto
main578b8311acfor the review; the rebase was clean and only context lines changed. Windows 11 Home 25H2 (i7-11800H, WinLibs MinGW-w64 GCC 15.2.0 UCRT r7, CMake 4.3.1, Ninja 1.13.2, Release,BUILD_TESTING=ON) at6a7a2c7ccf, and Ubuntu 24.04.5 on WSL2 (GCC 13.3.0, CMake 3.28.3) with it merged intomain1db077e876:ctest -R "guest_ajm|atrac9":100% tests passed, 0 tests failed out of 7on Windows, andout of 8on Linux (Linux addsguest_ajm_teardown).guest_ajmwith--repeat until-fail:3: 3 of 3 on both hosts.main1db077e876with only thisGuestAjm.cpp,guest_ajmbuilds and then aborts on both hosts (Windows exit 0xc0000409).Requiregives no message, but the return address maps toTestConsoleBufferJobs, the function whose run-chunk expectation this PR changes.libSceAjmi.prxexportsstlghnic3JcandElslOCpOInsonce each, andlibSceAjm.prxandlibSceAjm.native.prxexport the builder NIDs once each.tools/check_conventions.pypasses.tools/pr_overlap.pylists only #3205, whose order is above.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T12:00:38Z.
Review: CHANGES_REQUESTED
Reviewed exact head
6deff286e38136ecdd53e663b81bb0a056a6e724. The focused Linux build completed forguest_ajm_testsandlibSceAjmi(215 Ninja steps). Native execution aborts before test code because this host lacks required Zen 2 CPU features; running the same test underqemu-x86_64 -cpu maxsucceeds (exit 0).git diff --checkandtools/check_conventions.py --base upstream/mainpass. The hosted conventions, intake, labels, eligibility and report checks pass; the Windows test is still pending.One integration item remains under
CONTRIBUTING.md: the PR overlap workflow could not compare #3205 because that branch conflicts withmain. I inspected the sharedGuestAjm.cppchanges and ran a three-way merge of the exact heads; it reports content conflicts at the include/declaration area and test insertion points. #3205 is still open and hasneeds rebase; I found no documented merge-order agreement. Please coordinate with its author on which change should land first and record the order (andDepends onif this PR needs #3205) so the test-file conflict is handled deliberately. This is an integration request, not a request to drop either PR.