[PR #3774] [MERGED] Libkernel: Implement/stub some functions #3711

Closed
opened 2026-02-27 22:04:42 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3774
Author: @StevenMiller123
Created: 11/5/2025
Status: Merged
Merged: 11/6/2025
Merged by: @squidbus

Base: mainHead: kernel-funcs


📝 Commits (10+)

📊 Changes

3 files changed (+85 additions, -6 deletions)

View changed files

📝 src/core/libraries/kernel/kernel.cpp (+37 -6)
📝 src/core/libraries/kernel/kernel.h (+26 -0)
📝 src/core/libraries/kernel/process.cpp (+22 -0)

📄 Description

This PR does a few things:

  • Create a define for the latest firmware version number, this can be used in place of game firmware for sceKernelGetSystemSwVersion, and I used it for sceKernelGetAllowedSdkVersionOnSystem.
  • Fix get_authinfo with null authinfo struct. When I ran this edge case on my console, I got a -1 return with errno set to EPERM.
  • Stub sceKernelGetAppInfo, currently only populating the cusa name and has_param_sfo fields.
  • Implement sceKernelHasNeoMode, this returns true if you're running on a PS4 Pro (and doesn't require the param.sfo flag)
  • Implement sceKernelGetMainSocId based on hardware observations. This returns a chunk of data from a cpuid instruction, and is used by some libraries to determine if they're running on PS4 Pro hardware.
  • Stub sceKernelGetCurrentCpu, this is spammed by a few games.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/3774 **Author:** [@StevenMiller123](https://github.com/StevenMiller123) **Created:** 11/5/2025 **Status:** ✅ Merged **Merged:** 11/6/2025 **Merged by:** [@squidbus](https://github.com/squidbus) **Base:** `main` ← **Head:** `kernel-funcs` --- ### 📝 Commits (10+) - [`3773938`](https://github.com/shadps4-emu/shadPS4/commit/377393802a89f1d3c41cb32f1bb7474fb7844f8a) Define latest released firmware version, use that for sceKernelGetSystemSwVersion - [`85e2c64`](https://github.com/shadps4-emu/shadPS4/commit/85e2c64a957da81ed858708719d7ae279b183125) sceKernelGetAllowedSdkVersionOnSystem - [`8391ea7`](https://github.com/shadps4-emu/shadPS4/commit/8391ea778802baa3da9147b48469e0a7e510c794) sceKernelHasNeoMode - [`8168535`](https://github.com/shadps4-emu/shadPS4/commit/8168535b818a60a547e8d24cf7d0dd295a01d867) sceKernelGetAppInfo stub - [`2f07919`](https://github.com/shadps4-emu/shadPS4/commit/2f07919d3d72ed2cafe00008c309c4a969cee703) sceKernelGetCurrentCpu - [`d06a18b`](https://github.com/shadps4-emu/shadPS4/commit/d06a18b602130b61d2b8a397a88323acd426ea78) fixups - [`a336f99`](https://github.com/shadps4-emu/shadPS4/commit/a336f99607c328817c78f18d483e64a857a1eab5) sceKernelGetMainSocId - [`d7e2747`](https://github.com/shadps4-emu/shadPS4/commit/d7e2747f6aefe859ef31e2db14e4a543bc4bf0ae) Update process.cpp - [`fd67011`](https://github.com/shadps4-emu/shadPS4/commit/fd670117c2f8b14a5dffdecb9d6bf1511d8c4e21) Set has_param_sfo to true - [`478c98d`](https://github.com/shadps4-emu/shadPS4/commit/478c98d200740ce9c3aff5d7c5b1b939265343fb) Clang ### 📊 Changes **3 files changed** (+85 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/core/libraries/kernel/kernel.cpp` (+37 -6) 📝 `src/core/libraries/kernel/kernel.h` (+26 -0) 📝 `src/core/libraries/kernel/process.cpp` (+22 -0) </details> ### 📄 Description This PR does a few things: - Create a define for the latest firmware version number, this can be used in place of game firmware for sceKernelGetSystemSwVersion, and I used it for sceKernelGetAllowedSdkVersionOnSystem. - Fix get_authinfo with null authinfo struct. When I ran this edge case on my console, I got a -1 return with errno set to EPERM. - Stub sceKernelGetAppInfo, currently only populating the cusa name and has_param_sfo fields. - Implement sceKernelHasNeoMode, this returns true if you're running on a PS4 Pro (and doesn't require the param.sfo flag) - Implement sceKernelGetMainSocId based on hardware observations. This returns a chunk of data from a cpuid instruction, and is used by some libraries to determine if they're running on PS4 Pro hardware. - Stub sceKernelGetCurrentCpu, this is spammed by a few games. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:04:42 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#3711
No description provided.