Return CPU mode based on param.sfo attributes (#3846)
Some checks failed
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-sdl-gcc (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled

Values are based on hardware observations.
This commit is contained in:
Stephen Miller 2025-12-01 02:21:19 -06:00 committed by GitHub
parent cf866ab294
commit a5f9280841
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,6 +42,16 @@ s32 PS4_SYSV_ABI sceKernelGetCompiledSdkVersion(s32* ver) {
}
s32 PS4_SYSV_ABI sceKernelGetCpumode() {
LOG_DEBUG(Lib_Kernel, "called");
auto& attrs = Common::ElfInfo::Instance().GetPSFAttributes();
u32 is_cpu6 = attrs.six_cpu_mode.Value();
u32 is_cpu7 = attrs.seven_cpu_mode.Value();
if (is_cpu6 == 1 && is_cpu7 == 1) {
return 2;
}
if (is_cpu7 == 1) {
return 5;
}
return 0;
}