Repository navigation
feat(agc): link calls through the AGC FS table - #6160
Merged
Merged
Conversation
This was referenced Oct 15, 2026
Draft
Contributor
|
MXGP 26 (PPSA30839), the title in #6117, with this PR on Linux. Setup: Ubuntu 24.04, GCC 13.3, Release, RTX 4070 Ti (NVIDIA 595.99),
Not checked on Windows. AI-assisted: yes |
This was referenced Oct 15, 2026
Merged
This was referenced Oct 16, 2026
fma-rc
force-pushed
the
feat/agc-fs-table-calls
branch
from
October 17, 2026 15:05
03cc2ef to
8f37cdd
Compare
12 tasks done
|
Tested on God of War Ragnarök (PPSA08330, 06.006.000): the computed
Tested and written with Claude Code (AI assistant) on a contributor's machine. Generated by Claude Code |
12 tasks done
11 tasks done
12 tasks done
12 tasks done
ycarogabriel-lgtm
added a commit
to ycarogabriel-lgtm/AnyPS5
that referenced
this pull request
Oct 18, 2026
…tta holds it Upstream's FS table calls (boykopovar#6160) map 2 MiB of AGC driver memory at 0xfe0000000 with MAP_FIXED_NOREPLACE, which macOS does not define, so libSceAgcDriver stopped building. The address cannot be mapped under Rosetta either: the translator reserves 0xfc0000000-0x1000000000 with a maximum protection of none, so a hinted mmap lands elsewhere and a fixed one fails with EACCES. On macOS the driver now maps the memory with the address as a hint, and when it does not get that address it says so once and starts without the table instead of failing every device; agc_driver_compute_fs_table_calls skips with the reason on such hosts. The limit is in the AGC debt file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 tasks done
ycarogabriel-lgtm
added a commit
to ycarogabriel-lgtm/AnyPS5
that referenced
this pull request
Oct 18, 2026
…tta holds it Upstream's FS table calls (boykopovar#6160) map 2 MiB of AGC driver memory at 0xfe0000000 with MAP_FIXED_NOREPLACE, which macOS does not define, so libSceAgcDriver stopped building. The address cannot be mapped under Rosetta either: the translator reserves 0xfc0000000-0x1000000000 with a maximum protection of none, so a hinted mmap lands elsewhere and a fixed one fails with EACCES. On macOS the driver now maps the memory with the address as a hint, and when it does not get that address it says so once and starts without the table instead of failing every device; agc_driver_compute_fs_table_calls skips with the reason on such hosts. The limit is in the AGC debt file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 605298a)
Open
11 tasks done
milescoviello
added a commit
to milescoviello/AnyPS5
that referenced
this pull request
Oct 19, 2026
An ANYPS5_ENABLE_ASAN build moves the guest arena up by 0x100000000000, past AddressSanitizer's shadow gap, but the AGC driver memory that holds the FS table (boykopovar#6160) is still mapped at the fixed 0xfe0000000. That address is in the shadow gap, so the mapping fails with EEXIST and no test that initializes the driver runs under ASan. The offset is now GuestArena::GuestAddressOffset in GuestArena.hpp, and the driver memory and the FS table move by it like the arena. Builds without ASan keep 0xfe0000000. agc_driver_compute_fs_table_calls skips in an ASan build: its shader builds the PS5's fixed table address from literals, as titles' shaders do, and that address can't be mapped there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 tasks done
This was referenced Oct 19, 2026
Closed
11 tasks done
ycarogabriel-lgtm
added a commit
to ycarogabriel-lgtm/AnyPS5
that referenced
this pull request
Oct 25, 2026
…tta holds it Upstream's FS table calls (boykopovar#6160) map 2 MiB of AGC driver memory at 0xfe0000000 with MAP_FIXED_NOREPLACE, which macOS does not define, so libSceAgcDriver stopped building. The address cannot be mapped under Rosetta either: the translator reserves 0xfc0000000-0x1000000000 with a maximum protection of none, so a hinted mmap lands elsewhere and a fixed one fails with EACCES. On macOS the driver now maps the memory with the address as a hint, and when it does not get that address it says so once and starts without the table instead of failing every device; agc_driver_compute_fs_table_calls skips with the reason on such hosts. The limit is in the AGC debt file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 605298a)
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
1348 Ex Voto (PPSA24249) stops on current
main2559e96 when a compute shader calls through libSceAgc's FS table:The shader builds the constant address
0xF_E0040000with twos_mov_b32, loads slot 0 there as a V#, reads a call target at +0x20 and skips thes_swappc_b64when it is zero. Issue #6117 reports the same shape in MXGP 26 and asks what a console keeps at that address.On the PS5 12.00 modules, libSceAgc's init gets a block from libSceAgcDriver, aborts unless the table lands at
0xF_E0040000, zeroes six 16-byte slots, and makes slot 0 a V# (stride 16, eight records) over a buffer of eight {routine address, 0} records. This PR:0xF_E0000000once per process when the driver is created (MAP_FIXED_NOREPLACEon Linux, a commit inside the guest arena on Windows), fills the table that way and registers the block withGuestAllocations;s_setpc_b64 s[14:15]); Sony's routines are not modeled (TechnicalDebt);s_mov_b32of constants, and lets the writer search cross a conditional branch that jumps past the call (the null check).Refs #6117 (same call; its unaligned atomic stays open).
Tested
Linux, current
main2559e96 plus this PR:mainRebased onto
main4524944 (2026-10-16):agc_driver_compute_fs_table_callspasses on RTX 5080 (NVIDIA 615.78.08), Radeon 610M (RADV) and lavapipe. Ex Voto, warm cache, 300 s:mainstops at 53.1 s with the sames_swappc_b64line; with this PR no stop, frame 851 at 300 s, on the title screen.With the PR and a warm cache, pressing Cross at the title screen reaches the main menu (Play / Options / Credits) with no stop in 390 s.
MXGP 26 (PPSA30839), tested by milescoviello on Linux (RTX 4070 Ti,
maind92a8da merged with d1a68c4, comment):mainstops at 135 s with the issue'ss_swappc_b64line; with this PR 2 of 2 runs reach the 180 s limit without it.Silent Hill: Townfall (PPSA33286), tested by tv7 on Windows (RTX 3070,
mainff23657 merged with d1a68c4, comment):mainstops on thes_swappc_b64line in 3 of 3 runs after about 2.5 min; with this PR it appears in none of 5 runs and 4 of 5 reach the 900 s limit (the fifth hits a render-thread timeout tv7 has seen before without this PR).Hot Wheels Infinite Rush (PPSA22408), tested by mrfelek on Linux (RTX 3080 Ti,
main5d9dcc4 merged with d1a68c4, comment):mainaborts on the sames_swappc_b64line at PC 0x134 after the boot screens; with this PR none of 3 runs shows it (one reaches the loading screen, one stops on a storage-image write-watch error also seen once without it, one runs out of device memory while storage images grow).agc_driver_compute_fs_table_calls(the Ex Voto shape: the marker store runs only after the call returns) andscalar_callfail withGraphBuilder.cppandLifecycle.cppfrommain(FS table at 0xfe0040000 is not mapped,scalar call regression; NVIDIA) and pass with the PR on NVIDIA RTX 5080 (615.78.08), RADV (Ryzen 7 7800X3D iGPU) and lavapipe. Windows (WinLibs GCC 15.2, VM): the full suite passes exceptguest_kernel_stack_protectandguest_kqueue, which fail the same way onmainthere.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)