feat(libkernel): declare physhm_open and physhm_unlink #6915
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6915"
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 Nixitov on 2026-10-16T18:00:02Z.
What
Declare
physhm_openandphyshm_unlinkin libkernel. Forever Launcher (bizkut/ps5-forever, PPSA99030) stops atphyshm_openon currentmain:The PS5 physical shared memory API is not documented, and shadPS4's module generator also declares both with no arguments and returns
ORBIS_OK, so the no-argumentintsignature follows shadPS4 and the console's behaviour is unmeasured. The relinker resolves no call site for either in this title, so both are declared as throwing exports (NotImplemented_nid_no_patch) rather than fabricating a handle, like the declaration-only exports already in this file; recorded indocs/dev/debt/libkernel.md.Tested
Windows 11, MinGW-w64 GCC 15.2.0 (WinLibs r7), Release.
bizkut/ps5-forever, PPSA99030, v01.000.006),eboot.binunwrapped and relinked with the built relinker--windows: on currentmainit stops atn371J5cP+uo(physhm_open); with this change it passesphyshm_openandphyshm_unlinkand stops atb7uXQmnfB2s(sysarch, libkernel), which this PR does not cover.python tools/check_conventions.py --base origin/mainpasses.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)bizkut/ps5-forever, PPSA99030) — removes its current start-up stop; it then stops atsysarchImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-16T18:00:39Z.
Progress report (
134a351→ce8f328)📉 System libraries: 91.44% (-0.05%, +2 declared functions)
🆕 2 declared as stubs
physhm_open_nid_postfixphyshm_unlink_nid_postfixImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-16T18:44:46Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
docs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/Unimplemented.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdImported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-16T20:20:45Z.
A Linux check of Forever Launcher (PPSA99030, 01.000.006, catalog build), Ubuntu 24.04, GCC 13.3, Release,
main1b1f8483c:main, it stops at load onn371J5cP+uo(physhm_open).sysarch, your next stop), it gets past both.nmthen lists three imports that no library exports: the two libSceSystemService PsmKit exports (cltshBrDLC0,7cTc7seJLfQ, now #6939) andK1A7IJp5xYc(sceKeyboardSetProcessPrivilege, #6787).sysctl_nid_postfix: unsupported MIB 1.14.32.3(kern.proc.vmmap).AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-17T10:05:15Z.
An update for the current catalog build of Forever Launcher (PPSA99030, 01.000.012), Linux,
mainbf20538169:mainit still stops at load onn371J5cP+uo(physhm_open).sysctl_nid_postfix: unsupported MIB 1.14.32.3(kern.proc.vmmap), 2 of 2 runs. I opened #7070 for that.ntdll.soloads andwineboot.exe -ibegins), then exits with status 1 when Wine maps its shared user data at 0x7ffe0000, below the guest arena.One note for whoever merges second: this PR and #6028 both add a declaration at the same place in
libkernel/Unimplemented.cpp, so the second one needs a rebase. I'll rebase #6028 if this one goes in first.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-18T15:53:59Z.
Windows runs of Forever Launcher (PPSA99030, catalog 01.000.012). Windows 11, RTX 3080, WinLibs GCC 15.2, Release, on
maine5f18ea99. Plain merges, no conflicts;Unimplemented.cppmerged cleanly. No warnings inUnimplemented.cpp. This PR adds no test, so none was run.main: fails to load (0xC0000139, no window). The Windows loader reports every missing import at once:n371J5cP+uoandAUqJNkobQ1c(libkernel),7cTc7seJLfQandcltshBrDLC0(libSceSystemService),K1A7IJp5xYc(libSceKeyboard).44e9c138f):n371J5cP+uoandAUqJNkobQ1cresolve. It still fails to load on the other three, which #6939 and #6787 provide.f69e6c093), #6787 (cc941b976) and #7070 (5fcb7e8a8) as well (#6028 is already inmain), 2 of 2 60 s runs load with every import resolved. Its Wine runtime starts: the psmkit-wine start-up stages all return 0, andwineboot.exe -ibegins in/data/forever/prefix. It then exits 1 onerr:virtual:virtual_alloc_first_teb wine: failed to map the shared user data: c0000018.That is the same stop as on Linux: Wine fails to place its shared user data at
0x7ffe0000. A memory trace on Windows shows the guest never asks the emulator for a fixed mapping there: every anonymous map request on this path reachesDoMapAnonwith no address and noMAP_FIXED, and each succeeds inside the guest arena.c0000018is Wine's own result after the page lands elsewhere. (An earlier version of this comment blamed Windows' ownKUSER_SHARED_DATApage; the trace doesn't show that.)AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-19T01:22:12Z.
@babyhuey thanks for the Windows runs, and sorry for the slow answer. That's the same stop I hit on Linux. On Linux it goes away with #6469 (QRMOE, still a draft), which honours a low mapping hint, so Wine's shared user data lands at
0x7ffe0000.On
mainwith #6915, #6939, #6787, #7070 and #6469, the next stop issendmsgwithSCM_RIGHTS(#7090). After that, Forever Launcher ran the whole 60 s, 2 of 2, on Linux;NOTE_LOWAT(#7092) andsysarch(#7095) are already inmain. It then reaches its own prefix setup and Wine exits with 0xC0000135, because the prefix "must be initialized by payload Wine". On Windows, #7090 still refusesSCM_RIGHTS(control data is not supported on Windows), so that's likely the next stop there after #6469.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T13:19:56Z.
Checked the NIDs against the name table, the throwing-stub pattern used by the neighbouring exports and the debt entry; Linux and Windows runs from @milescoviello and @babyhuey confirm both imports now resolve; merged.