fix(libkernel): answer sceKernelGetPageTableStats #4101
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4101"
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 xXPBSXx on 2026-10-11T23:14:26Z.
What
Resonance: A Plague Tale Legacy (PPSA30601) stops at
sceKernelGetPageTableStats not implementedonce its imports are exported (#4067). The call now answers instead of throwing:int sceKernelGetPageTableStats(int* cpuTotal, int* cpuAvailable, int* gpuTotal, int* gpuAvailable), as in OpenOrbis'libkernel.h, the Orbital type database and SharpProspero (KernelMemoryQuery.cs: "how many page-table entries the module was given for each side and how many are left").KernelGetPageTableStats) and all of them available. KytyPS5 additionally counts the 2 MiB entries of the committed ranges as used; this PR does not. A null pointer returnsSCE_KERNEL_ERROR_EFAULT, as in KytyPS5.CheckPageTableStatsinGuestMemory.cppcovers the answer and the four null-pointer cases; without the change the call throws and the test aborts.Tested
mainwith #4021 applied (the Windows build ofmainis broken byHostPoll; unrelated to this change):ctest -R guest_memorypasses;tools/check_conventions.py --base upstream/mainpasses.guest_memory_pool_statswas not built here.mainalone), and what the title does with the numbers.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T23:15:30Z.
Progress report (
529f7bf→d283d48)📈 System libraries: 87.39% (+0.02%, +1 implemented functions)
✅ 1 implemented
sceKernelGetPageTableStatsImported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T05:43:58Z.
Merged current
maininto the branch (conflict incore/libs/tests/GuestMemory.cpponly, both new test calls kept:CheckPageTableStatsandCheckMunmapOverUnmappedPages). Windows, GCC:guest_memorytests pass,tools/check_conventions.py --base upstream/mainpasses. No code change.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T08:25:15Z.
Please rebase onto main instead of merging it in: 5cec557c is a merge commit, and branches here carry none. No code change needed.
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T17:37:13Z.
Rebased onto current
main(2a5eca11c) as requested: one commit, no merge commit, the branch was force-updated with a lease. Tests on this base (Windows, MinGW, no GPU tests):guest_memory_pool_statsandguest_memorypass,check_conventionspasses.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T20:47:38Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)docs/dev/debt/libkernel.mdL160docs/dev/debt/libkernel.mdL160docs/dev/debt/libkernel.mdL160docs/dev/debt/libkernel.mdL160core/libs/tests/GuestMemory.cppL115docs/dev/debt/libkernel.mdL160Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-12T21:02:30Z.
Checked against KytyPS5
KernelGetPageTableStats(constants,EFAULTon null pointers), merged onto currentmainwith a scoped build and ctest (141/141,guest_memoryandguest_memory_pool_statspass), andguest_memoryfails without the change. The debt entry records the unmeasured values and the missing used-entry count; merging.