shadPS4/src/core/libraries/kernel
Stephen Miller ee2bc97248
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
Windows: Limit address space maximum when higher addresses are not needed (#3775)
* Earlier initialization of elf info.

Everything used for elf info initialization comes from the param.sfo, so we can initialize this earlier to have this information accessible during memory init.

* Extract compiled SDK version from pubtoolinfo string

Up until now, we've been using the game's reported "firmware version" as our compiled SDK version. This behavior is inaccurate, and is something that has come up in my hardware tests before.

For the actual compiled SDK version, we should use the SDK version in the PUBTOOLINFO string of the param.sfo, only falling back on the firmware version when that the sdk_ver component isn't present.

* Store compiled SDK version in ElfInfo

* Limit address space for compiled SDK version at or above FW 3

Sony placed a hard cap at 0xfc00000000, with a slight extension for stack mappings. For now, though stack mappings aren't implemented, there's no harm in keeping a slightly extended address space (since this cap is lower than our old user max).

Limiting the max through address space is necessary for Windows due to performance issues, in the future I plan to properly implement checks in memory manager code to properly handle this behavior for all platforms.

* Use compiled SDK version for sceKernelGetCompiledSdkVersion

I think this is pretty self explanatory.

* Log SDK version

Since this value is what most internal firmware version checks are against, logging the value will help with debugging.

* Update address_space.cpp

* Update emulator.cpp

* Backwards compatible logging

Because that's apparently an issue now
2025-11-10 17:07:17 +02:00
..
sync kernel: Improvements to condvars. (#3592) 2025-09-13 08:41:26 -07:00
threads More OpenOrbis stuff (#3776) 2025-11-06 13:22:26 +02:00
aio.cpp Core: Remove checks for symbol version_major and version_minor (#3540) 2025-09-08 19:30:03 -07:00
aio.h sceKernelAio* implementation (#2160) 2025-01-16 18:27:52 +02:00
debug.cpp Core: Remove checks for symbol version_major and version_minor (#3540) 2025-09-08 19:30:03 -07:00
debug.h Minor libkernel changes (#2721) 2025-03-30 01:27:33 +02:00
equeue.cpp equeue: Few fixes for sceKernelWaitEqueue (#3548) 2025-09-08 19:47:12 -07:00
equeue.h equeue: Few fixes for sceKernelWaitEqueue (#3548) 2025-09-08 19:47:12 -07:00
file_system.cpp filesystem: return st_mtim in posix_stat (fixes RB4 / CUSA02901 DLC crash) (#3781) 2025-11-06 22:47:40 +02:00
file_system.h Filesystem: Abstract handling of directory files (#3455) 2025-08-25 23:41:24 +03:00
kernel.cpp Libkernel: Implement/stub some functions (#3774) 2025-11-05 16:58:15 -08:00
kernel.h Libkernel: Implement/stub some functions (#3774) 2025-11-05 16:58:15 -08:00
memory.cpp Fix alignment for mmap (#3716) 2025-10-07 16:22:21 -07:00
memory.h Core: Memory code cleanup and further direct memory fixes (#3655) 2025-09-26 02:28:32 -07:00
orbis_error.h core: Library cleanup (#1631) 2024-11-30 22:37:36 +02:00
posix_error.h core: Library cleanup (#1631) 2024-11-30 22:37:36 +02:00
process.cpp Windows: Limit address space maximum when higher addresses are not needed (#3775) 2025-11-10 17:07:17 +02:00
process.h Libraries: Implement sceKernelIsInSandbox, update OrbisSysModule enum (#3546) 2025-09-07 13:11:15 -07:00
threads.cpp kernel: Rewrite pthread emulation (#1440) 2024-11-21 22:59:38 +02:00
threads.h kernel: Implement scePthreadGetaffinity (#2916) 2025-05-12 10:46:53 -07:00
time.cpp fix divide by zero (#3759) 2025-10-31 15:36:27 +02:00
time.h Make libSceRtc fully HLE (#3330) 2025-08-06 20:08:26 +03:00