Commit Graph
291 Commits
Author SHA1 Message Date
BunnyFlandClaude Opus 5.5 069a2849fe Merge upstream main into feat/libkernel-amm-mapper-calls-1030
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 23:16:47 +01:00
Adrià 0399b0a2c9 Merge pull request #13487 from BunnyFl/feat/libkernel-amm-remaining
feat(libkernel_sys): add the remaining AMM command writers
2026-10-30 22:41:55 +01:00
Adrià ce7bc15837 Merge pull request #13428 from BunnyFl/feat/libkernel-is-module-loaded
feat(libkernel_sys): implement sceKernelIsModuleLoaded
2026-10-30 21:35:35 +01:00
Adrià 4ac53f763c Merge pull request #12658 from xdCloudy/feat/libkernel-sys-vm-map-timestamp
feat(libkernel_sys): implement VM map timestamp proxy
2026-10-30 21:23:50 +01:00
Adrià 0814d32375 Merge pull request #13351 from BunnyFl/feat/libkernel-title-workaround-limit
fix(libkernel_sys): accept all 128 title workaround bits and add the misspelled export
2026-10-30 19:52:35 +01:00
BunnyFlandClaude Opus 5.5 8794fec072 feat(libkernel_sys): add the AMM mapper calls
sceKernelCallIndirectBuffer, sceKernelCallIndirectBuffer2,
sceKernelCallIndirectBuffer3, sceKernelGiveDirectMemoryToMapper and
sceKernelMapperGetParam follow firmware 13.42's libkernel_sys: the
submit calls queue the buffer on the AMM queue, the direct memory call
keeps the library's 2 MiB checks and the parameter call copies the
size and the AMM address ranges. The kernel-side checks that are not
known throw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 18:46:30 +01:00
BunnyFlandClaude Opus 5.5 dd0bc0b781 feat(libkernel_sys): add the AMM writers for PRT maps, address and counter writes, waits and event queues
sceKernelWriteMapCommand2, sceKernelWriteUnmapToPrtCommand,
sceKernelWriteWriteAddressCommand, sceKernelWriteWriteCounterCommand,
sceKernelWriteWaitOnAddressCommand, sceKernelWriteWaitOnCounterCommand
and sceKernelWriteEventQueueOnCompletionCommand follow the checks of
firmware 13.42's libkernel and record this project's command layout.
Without the PRT flag, sceKernelWriteMapCommand2 is
sceKernelWriteMapCommand, as on the console. The debt files record where
the existing writers' checks differ from the firmware.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 17:45:00 +01:00
BunnyFlandClaude Opus 5.5 004b47eda7 fix(libkernel_sys): accept all 128 title workaround bits and add the misspelled export
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 15:41:32 +01:00
DeveshB-1 7b00701824 fix(libkernel_sys): return EFAULT from sceKernelGetCompiledSdkVersion for an unwritable store 2026-10-30 15:37:31 +01:00
BunnyFlandClaude Opus 5.5 d42d595b51 feat(libkernel_sys): implement sceKernelIsModuleLoaded
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 15:12:19 +01:00
Adrià 96ff704249 Merge pull request #12667 from xdCloudy/feat/libkernel-sys-pthread-attr-helpers
feat(libkernel_sys): implement mutex attribute generation helpers
2026-10-30 14:02:33 +01:00
Adrià 563d839a7a Merge pull request #12955 from JJenkx/windows/libkernel-sys-linkat-symlink-itself
fix(libkernel_sys): hard-link a symbolic link itself in linkat on Windows
2026-10-30 13:45:28 +01:00
xdCloudy c4e365d226 feat(libkernel_sys): implement VM map timestamp proxy 2026-10-30 12:52:16 +01:00
Dean 5e145816b1 Merge pull request #13259 from DeveshB-1/fix/get-authinfo-efault
fix(libkernel_sys): return EFAULT from get_authinfo for an unwritable store
2026-10-30 22:50:47 +13:00
Adrià b4cd3c0648 Merge pull request #12959 from zaryabzip/feat/kernel-get-upd-version
feat(libkernel_sys): forward sceKernelGetUpdVersion to sysKernelGetUpdVersion as firmware 13.42 does
2026-10-30 10:18:32 +01:00
JJenkxandClaude Opus 5.5 a11e2192e9 fix(libkernel_sys): hard-link a symbolic link itself in linkat on Windows
Without AT_SYMLINK_FOLLOW, linkat of a symbolic link threw on Windows.
CreateHardLinkW links the link's own reparse point rather than its target,
dangling or not, so it gives FreeBSD's behaviour. NTFS cannot hard-link a
directory, so a symbolic link or junction to a directory still throws there.

guest_kernel_sys now runs the symbolic link linkat checks on Windows too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 08:40:33 +01:00
Cloudy d833429467 feat(libkernel_sys): implement pthread attribute helpers 2026-10-30 08:12:52 +01:00
DeveshB-1 b00fb513e5 fix(libkernel_sys): return EFAULT from get_authinfo for an unwritable store 2026-10-30 11:42:01 +05:30
Adrià acf46d4ff8 Merge pull request #12577 from iAbdulrrahman/feat/libkernel-sys-is-ps4-process
feat(libkernel_sys): implement sceKernelIsPs4Process query
2026-10-30 03:03:26 +01:00
Adrià 87d938c650 Merge pull request #12556 from babyhuey/fix/sched-efault
fix(libkernel): return EFAULT from rtprio_thread and sched_rr_get_interval for a bad pointer
2026-10-30 02:32:23 +01:00
Adrià 365f857609 Merge pull request #12427 from simnJS/feat/kernel-is-neo-mode
feat(libkernel_sys): answer sceKernelIsNeoMode from the param.sfo Neo-mode attribute
2026-10-30 02:30:27 +01:00
Adrià d85a6745c2 Merge pull request #12368 from kyon-eth/feat/kernel-sys-1360-inventory
feat(libkernel_sys): declare 328 missing callable exports
2026-10-30 02:01:59 +01:00
Adrià f9a8813b11 Merge pull request #12179 from p3n1cillin/claude/kernel-executable-module-handle
feat(libkernel): add sceKernelGetExecutableModuleHandle
2026-10-30 02:01:01 +01:00
Adrià c8bc4a20d7 Merge pull request #12606 from EagleBearerYS/feat/libkernel-sys-settimeofday
feat(libkernel_sys): implement sceKernelSettimeofday
2026-10-29 21:20:32 +01:00
zaryabzip 6c02d185dc feat(libkernel_sys): forward sceKernelGetUpdVersion to sysKernelGetUpdVersion as firmware 13.42 does
Firmware 13.42's sceKernelGetUpdVersion runs the same code as
sysKernelGetUpdVersion, which is already implemented.
2026-10-29 23:07:26 +05:00
iAbdulrrahman 2281511a01 feat(libkernel_sys): identify PS4 compatibility process from CUSA title ID prefix 2026-10-29 16:18:34 +01:00
iAbdulrrahman a59bf262a2 feat(libkernel_sys): implement sceKernelIsPs4Process query 2026-10-29 16:18:34 +01:00
Dean 478b5f1a93 Merge pull request #12635 from Lindamea1/feat/libkernel-sys-internal-libc-mutex-init
feat(libkernel_sys): implement scePthreadMutexInitForInternalLibc and scePthreadMutexattrInitForInternalLibc
2026-10-30 02:26:47 +13:00
Dean b6408701c7 Merge pull request #12636 from Lindamea1/feat/libkernel-sys-kldstat
feat(libkernel_sys): implement kldstat
2026-10-30 02:20:06 +13:00
p3nicillinandClaude Opus 5.5 4cf7411a46 feat(libkernel): add sceKernelGetExecutableModuleHandle
Return the main program's handle, the first one sceKernelGetModuleList
lists and one sceKernelGetModuleInfo accepts. reSOT (PPSA99023) imports
it from libkernel and passes the handle to sceKernelGetModuleInfo to find
its own code segment; before this its eboot failed to load on the
unresolved import.

The PS5 3.20 export lists have it in libkernel as well as libkernel_sys,
and on Windows a libkernel import never reaches libkernel_sys, so the
throwing libkernel_sys stub moves to libkernel as pselect did.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 12:17:59 +00:00
Adrià 578b8311ac Merge pull request #11267 from kallmek3nny/feat/libkernel-sem-setname
feat(libkernel): implement sem_setname
2026-10-29 11:31:34 +01:00
Adrià c70c75ad13 Merge pull request #9284 from DavidSamir/feat/libkernel-sys-ksem-unnamed
feat(libkernel): implement the unnamed ksem semaphores
2026-10-29 08:48:19 +01:00
Lindamea1andClaude Opus 5.5 443fea643c feat(libkernel_sys): implement scePthreadMutexInitForInternalLibc and scePthreadMutexattrInitForInternalLibc
Both call libkernel's pthread_mutex_init and pthread_mutexattr_init and
return 0x80020000 | errno on error, as shadPS4 (ce74386) exports them as
ORBIS(posix_pthread_mutex_init) and ORBIS(posix_pthread_mutexattr_init)
and ChonkyStation4 (c101a23) maps them to its POSIX init functions. A
mutex made without attributes is error-checking. FreeBSD 11.4's
malloc-internal _pthread_mutex_init_calloc_cb makes a normal mutex
instead; the gap is recorded in the libkernel_sys debt file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 23:16:31 +00:00
Lindamea1andClaude Opus 5.5 c85368d0b5 feat(libkernel_sys): implement kldstat
kldstat was a NotImplemented stub. It now follows FreeBSD 11.4's
sys_kldstat (sys/kern/kern_linker.c): only the version field is read
(EFAULT when that fails), and a version other than 1056
(struct kld_file_stat_1) or 2080 (struct kld_file_stat) is EINVAL.
No linker file is listed here, as for kldnext, so every file id then
gets ENOENT and the structure is never written.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 23:16:31 +00:00
Yunus Shaikh 3e5441dd86 feat(libkernel_sys): implement sceKernelSettimeofday 2026-10-28 21:05:36 +00:00
Dean 93909fb801 Merge pull request #10695 from MarcZX10/marc/signatures-libkernel-sys
feat(libkernel_sys): declare eight Discovery stubs with the OpenOrbis signatures
2026-10-29 07:27:07 +13:00
Dean 1847b0bd00 Merge pull request #11754 from iAbdulrrahman/feat/libkernel-sys-console-identity
feat(libkernel_sys): implement genuine console and platform identity queries
2026-10-29 07:23:11 +13:00
babyhuey c565100965 fix(libkernel): return EFAULT from rtprio_thread and sched_rr_get_interval for a bad pointer
rtprio_thread read and wrote the guest rtprio struct in place, and
sched_rr_get_interval wrote the interval in place, so a non-null pointer
into unmapped or read-only memory crashed the host. rtprio_thread now
copies the struct in with GuestCopyIn_nid_no_patch before the thread
lookup for RTP_SET, as FreeBSD's sys_rtprio_thread does, and builds the
RTP_LOOKUP result locally and copies it out with
GuestCopyOut_nid_no_patch. sched_rr_get_interval copies its interval out
the same way. A failed copy returns EFAULT.
2026-10-28 14:15:57 -04:00
kenny soloandClaude Opus 5.5 20c9a93999 feat(libkernel): implement sem_setname
Keep a copy of the name with the semaphore and move the export from the libkernel_sys stub into libkernel next to the other sem_* exports.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-28 14:51:17 +01:00
simnJS 215192dd37 feat(libkernel_sys): answer sceKernelIsNeoMode from the param.sfo Neo-mode attribute
A title with param.sfo gets bit 23 (0x00800000) of its ATTRIBUTE key,
the PS4 Pro (Neo) mode support flag, and 0 without the key, as shadPS4
answers on a Neo console; sceKernelHasNeoMode and sceKernelIsAuthenticNeo
already report one. A title with param.json still throws: what a PS5
application gets is unknown. The param.sfo parser now reads ATTRIBUTE and
libkernel exposes it to the other libraries.
2026-10-28 14:10:21 +01:00
Kyon facacb4684 fix(libkernel_sys): resolve known NID aliases and document identities 2026-10-28 12:40:14 +00:00
Dean 750cf6cf48 Merge pull request #11595 from alvaroelpob/fix/libkernel-sys-linkat-symlink-itself
fix(libkernel_sys): link a symbolic link itself in linkat without AT_SYMLINK_FOLLOW
2026-10-29 01:32:29 +13:00
Dean d580b1f552 Merge pull request #11441 from p3n1cillin/claude/kernel-cpumode-game
feat(libkernel_sys): implement sceKernelGetCpumodeGame and sceKernelSetCpumodeGame as measured on a PS5
2026-10-29 01:32:11 +13:00
AdriàandClaude Sonnet 5.5 735dd0bdd7 fix(libkernel): declare the unnamed ksem exports once in the public header
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-28 12:58:01 +01:00
David fd6513d6ff refactor(libkernel): move the unnamed ksem calls into libkernel
The PS5 3.20 export lists have ksem_* in libkernel as well as
libkernel_sys, and on Windows a libkernel import never reaches
libkernel_sys, so titles importing them from libkernel did not find
them. Following pipe1os's review on #9284, also: ENOSPC from
ksem_init when no descriptor is left, the SEM_MAX limit of 30 with
ENOSPC, and dup/dup2 from a ksem id throwing as for a kqueue.
2026-10-28 12:57:04 +01:00
David c2939224e8 feat(libkernel_sys): implement the unnamed ksem semaphores 2026-10-28 12:56:42 +01:00
Kyon d7e647cbc2 Merge remote-tracking branch 'origin/main' into feat/kernel-sys-1360-inventory 2026-10-28 11:14:02 +00:00
Adrià 241649ed7e Merge pull request #11296 from tablefrogpillow/fix/fpathconf-kqueue-shm-eopnotsupp
fix(libkernel_sys): fail fpathconf on a kqueue or shm descriptor with EOPNOTSUPP
2026-10-28 09:41:16 +01:00
Adrià d7fd416992 Merge pull request #11231 from Gruzzberry/feat/kldsym
feat(libkernel_sys): implement kldsym argument checks
2026-10-28 08:56:23 +01:00
AdriàandClaude Sonnet 5.5 f87b6289ac fix(libkernel): export the kqueue descriptor check to libkernel_sys
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-28 08:43:15 +01:00