docs(libkernel): record the version stubs, kern.boottime and the SoC power block as measured on a PS5 #11116

Merged
orezraey merged 4 commits from upstream-pr/11116 into main 2026-10-27 03:51:20 +00:00
orezraey commented 2026-10-25 18:34:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by orezraey on 2026-10-25T18:34:05Z.


What

Three libkernel entries recorded as measured on a retail PS5 (firmware 13.60) with homebrew probes from a payload process. This PR only records these console measurements in docs/dev/debt/libkernel.md and changes no host behaviour: AnyPS5 already matches the first two entries, while sceKernelGetSocPowerConsumption still differs from the console, as its bullet below says. The sources and console logs are in this gist (pexver, pboottime, psocpow).

  • sceKernelGetSystemExVersion, sysKernelGetLowerLimitSysexVersion, sysKernelGetLowerLimitUpdVersion and sceKernelGetTraceMemoryStats were read from 13.42 disassembly and not measured. On the console all four are exported by libkernel.sprx, libkernel_sys.sprx and libkernel_web.sprx at the same address and behave as the entry says: the first writes one zero byte to each output and returns a plain 22 if either is null; the lower limits write a zero byte and a zero 32-bit word, and return 0x80020016 for null; the trace statistics write 8 zero bytes to the first two outputs, skip null ones, leave the third and fourth alone and return 0. The meaning of the outputs stays open.
  • kern.boottime: the entry said the value a PS5 title gets was not measured. A payload process gets CLOCK_REALTIME minus CLOCK_UPTIME (1792934811.652920 against 1792934811.652919 read at the same time), unchanged 2 s later, from {1, 21} and from the name alike; an 8-byte buffer gets the first 8 bytes and ENOMEM, a 0-byte one ENOMEM. This is what AnyPS5 does. What a title process gets is still open.
  • sceKernelGetSocPowerConsumption: AnyPS5 returns EINVAL because the host has no power source to read, and that does not change. The entry now records what the console does: 0, 112 bytes (28 32-bit words) written, the first word about 4700 when idle (the PS5LM Plus reading it as milliwatts would show 4.7 W, so the unit is not known), and a fault for a null buffer.

Tested

Documentation only. Head f0a989a508 on main d17785dba8. tools/check_conventions.py passes; each changed entry is under 1000 characters.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #10132 and #11025 (mine, they edit the entries next to kern.boottime), #10671 (it edits the sceKernelGetSystemExVersion entry; merge order only)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5007517774 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11116). Originally posted by [orezraey](https://github.com/orezraey) on 2026-10-25T18:34:05Z. --- ### What Three libkernel entries recorded as measured on a retail PS5 (firmware 13.60) with homebrew probes from a payload process. This PR only records these console measurements in `docs/dev/debt/libkernel.md` and changes no host behaviour: AnyPS5 already matches the first two entries, while `sceKernelGetSocPowerConsumption` still differs from the console, as its bullet below says. The sources and console logs are in [this gist](https://gist.github.com/orezraey/4a43a77005796e7bf90b552fe6a5475e) (`pexver`, `pboottime`, `psocpow`). - **`sceKernelGetSystemExVersion`, `sysKernelGetLowerLimitSysexVersion`, `sysKernelGetLowerLimitUpdVersion` and `sceKernelGetTraceMemoryStats`** were read from 13.42 disassembly and not measured. On the console all four are exported by `libkernel.sprx`, `libkernel_sys.sprx` and `libkernel_web.sprx` at the same address and behave as the entry says: the first writes one zero byte to each output and returns a plain 22 if either is null; the lower limits write a zero byte and a zero 32-bit word, and return `0x80020016` for null; the trace statistics write 8 zero bytes to the first two outputs, skip null ones, leave the third and fourth alone and return 0. The meaning of the outputs stays open. - **`kern.boottime`**: the entry said the value a PS5 title gets was not measured. A payload process gets `CLOCK_REALTIME` minus `CLOCK_UPTIME` (1792934811.652920 against 1792934811.652919 read at the same time), unchanged 2 s later, from `{1, 21}` and from the name alike; an 8-byte buffer gets the first 8 bytes and `ENOMEM`, a 0-byte one `ENOMEM`. This is what AnyPS5 does. What a title process gets is still open. - **`sceKernelGetSocPowerConsumption`**: AnyPS5 returns `EINVAL` because the host has no power source to read, and that does not change. The entry now records what the console does: 0, 112 bytes (28 32-bit words) written, the first word about 4700 when idle (the PS5LM Plus reading it as milliwatts would show 4.7 W, so the unit is not known), and a fault for a null buffer. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Documentation only. Head `f0a989a508` on `main` `d17785dba8`. `tools/check_conventions.py` passes; each changed entry is under 1000 characters. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #10132 and #11025 (mine, they edit the entries next to `kern.boottime`), #10671 (it edits the `sceKernelGetSystemExVersion` entry; merge order only) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-10-25 18:40:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T18:40:16Z.

Review: CHANGES_REQUESTED


The documentation changes and linked console logs are consistent with the measurements I checked. I found one material mismatch in the PR description: its opening says “AnyPS5 already behaves as measured,” but the sceKernelGetSocPowerConsumption bullet and the existing debt entry both say AnyPS5 returns EINVAL and writes nothing, while the PS5 probe returns 0 and writes 112 bytes. Please revise the opening to say that the PR records console measurements without changing the host behavior (and that some measured behavior still differs). The distinction is already described in the detailed bullet; this request is only to make the summary accurate.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5644686737 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11116#pullrequestreview-5644686737). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T18:40:16Z. **Review:** CHANGES_REQUESTED --- The documentation changes and linked console logs are consistent with the measurements I checked. I found one material mismatch in the PR description: its opening says “AnyPS5 already behaves as measured,” but the `sceKernelGetSocPowerConsumption` bullet and the existing debt entry both say AnyPS5 returns `EINVAL` and writes nothing, while the PS5 probe returns 0 and writes 112 bytes. Please revise the opening to say that the PR records console measurements without changing the host behavior (and that some measured behavior still differs). The distinction is already described in the detailed bullet; this request is only to make the summary accurate.
MarcZX10 commented 2026-10-25 18:56:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T18:56:45Z.

Review: APPROVED


The author corrected the opening summary to accurately say this documentation-only PR records console measurements without changing AnyPS5 behavior, and that sceKernelGetSocPowerConsumption still differs. I verified the revised opening against the detailed bullet and existing debt behavior. The console logs and debt edits I reviewed earlier remain unchanged; conventions, eligibility, intake, and labels pass. Product build/test checks are skipped for this documentation-only change.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5644750958 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11116#pullrequestreview-5644750958). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T18:56:45Z. **Review:** APPROVED --- The author corrected the opening summary to accurately say this documentation-only PR records console measurements without changing AnyPS5 behavior, and that `sceKernelGetSocPowerConsumption` still differs. I verified the revised opening against the detailed bullet and existing debt behavior. The console logs and debt edits I reviewed earlier remain unchanged; conventions, eligibility, intake, and labels pass. Product build/test checks are skipped for this documentation-only change.
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
boykopovar/AnyPS5!11116
No description provided.