fix(libkernel): report machdep.tsc_freq from sysctlbyname #5387
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5387"
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 milescoviello on 2026-10-13T18:30:53Z.
What
PS5SX2 (PPSA99203, from the homebrew catalog) reads
machdep.tsc_freqwithsysctlbynameat start-up. Onmainthat name throws, which ends the title before its first frame:FreeBSD 11.4 defines the name in
sys/x86/x86/tsc.cas an unsigned 64-bit value:sysctlbynamenow answers it with the frequencysceKernelGetTscFrequencyalready measures. It goes through the sameCopyOutaskern.sdk_version:ENOMEM.EPERM, as an unprivileged write to a sysctl does.guest_system_configurationgainsCheckTscFrequencySysctl, covering those three cases and that the value equalssceKernelGetTscFrequency(). The libkernel debt file records that the value is the host's measured frequency; the console's value is not checked.Tested
Ubuntu 24.04, GCC 13.3 (CI's compiler), Release with CI's configure flags, on
main18c438b10, RTX 4070 Ti (NVIDIA 580.142):main'sSystemConfiguration.cppand the new test,guest_system_configurationaborts; with the change it passes 20/20.guest_*tests pass in two runs.eboot.binunwrapped from its fSELF and relinked with--to-intel --trap-sdk-syscall-stubs, see #2136):main's libraries it stops at 0 s with the lines above.tools/check_conventions.py --base upstream/mainpasses.Not checked on a console.
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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T18:38:29Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libkernel/System/src/SystemConfiguration.cppL22, L212core/libs/tests/GuestSystemConfiguration.cppL24core/libs/tests/GuestSystemConfiguration.cppL24, L262docs/dev/debt/libkernel.mdL18core/libs/tests/GuestSystemConfiguration.cppL262Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-13T20:09:15Z.
Closing as a duplicate of #4776, which makes the same change and was opened first. I posted the PS5SX2 (PPSA99203) title evidence there.
AI-assisted: yes
Pull request closed