docs(debt): cite firmware 10.01 kernel data for four libkernel entries #9199

Merged
KernelPanicNT merged 6 commits from upstream-pr/9199 into main 2026-11-12 19:51:46 +00:00
KernelPanicNT commented 2026-10-21 15:05:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by KernelPanicNT on 2026-10-21T15:05:48Z.


What

Four libkernel debt entries say a value is unmeasured or unknown. This PR records what the firmware 10.01 kernel data holds for them. No code changes, because nothing AnyPS5 returns today contradicts that data.

Source of the behaviour. The source is a snapshot of the kernel .data/.rodata of a running PS5 on firmware 10.01: kern.version is r219814/releases/10.01 Sep 18 2024 20:36:55 and file offset 0 is VA 0xffffffff82510000. The snapshot is of my own console. It is not attached and cannot be shared, because it holds a private kernel message log. Reviewers cannot fetch it, so every value below comes with its offset for anyone who has a 10.01 kernel data dump. The snapshot has no kernel code. It shows only what the tables and constants hold, not what any handler does. Its kern.osrelease string is 0.0-prototype.

Entry On main Firmware 10.01 kernel data
hw.pagesize 16384 at {6, 7}; debt: "unmeasured" The OID at +0x1784230 is number 7 under hw, kind 0x80048002 (RD, CAPRD, MPSAFE, INT), arg1 NULL, arg2 16384: the FreeBSD 11.4 SYSCTL_INT with PAGE_SIZE = 16384
kern.sdk_version 0x01000000; debt: "the low two bytes are unknown" The OID at +0x1783d50 is number 46 under kern, kind 0x80048006 (RD, CAPRD, MPSAFE, UINT), arg2 0x10010000. 10.01 encodes as 0x1001 in the high bytes and 0 in the low two
vm.overcommit 0; a 12.70 payload gets ENOENT The OID at +0xdaea28 sits under vm with a number the console kernel auto-assigned, kind 0xc0040002 (RD, WR, MPSAFE, INT), and its variable at +0x1f52110 held 0. FreeBSD's vm.overcommit is the same read-write int with the fixed number VM_OVERCOMMIT
physhm_open, physhm_unlink Throwing stubs with no arguments, after shadPS4 In the native syscall table (sysent at +0x1ad100, names at +0x1764f80), syscall 629 is physhm_open with sy_narg 4 (+0x1b46f0) and syscall 630 is physhm_unlink with 1 (+0x1b4720)

The entries keep what is still unknown:

  • Writes to hw.pagesize and kern.sdk_version return EPERM; this was not tried on a console.
  • The vm.overcommit difference between 10.01 and a 12.70 payload process stays open.
  • The physhm argument types, results and behaviour stay open, and both functions still throw.
  • kern.sdk_version by MIB {1, 46} still throws: no title is known to ask for it.

The entries also change in two smaller ways:

  • Each entry now states its gap first.
  • The hw.pagesize link pointed to FreeBSD main (#L177, a line that has moved since). It now points to the 11.4 release commit used elsewhere in this file.

Tested

Not tested: this PR changes documentation only.

Checks:

  • python3 tools/check_conventions.py --base origin/main passes ("All conventions checks passed.").
  • python3 tools/pr_overlap.py --branch docs/libkernel-kdata-fw1001 reports one text conflict: #8910 rewrites the libkernel.md entry just above hw.pagesize, so whichever merges second needs a one-line rebase. It could not compare 22 pull requests that conflict with main and share libkernel.md; checked by hand, none of their changed lines mention physhm, vm.overcommit, kern.sdk_version or hw.pagesize.

Checklist

  • Based on current main (cecb540a6); 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: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4953773258 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9199). Originally posted by [KernelPanicNT](https://github.com/KernelPanicNT) on 2026-10-21T15:05:48Z. --- ### What Four libkernel debt entries say a value is unmeasured or unknown. This PR records what the firmware 10.01 kernel data holds for them. No code changes, because nothing AnyPS5 returns today contradicts that data. **Source of the behaviour.** The source is a snapshot of the kernel `.data`/`.rodata` of a running PS5 on firmware 10.01: `kern.version` is `r219814/releases/10.01 Sep 18 2024 20:36:55` and file offset 0 is VA `0xffffffff82510000`. The snapshot is of my own console. It is not attached and cannot be shared, because it holds a private kernel message log. Reviewers cannot fetch it, so every value below comes with its offset for anyone who has a 10.01 kernel data dump. The snapshot has no kernel code. It shows only what the tables and constants hold, not what any handler does. Its `kern.osrelease` string is `0.0-prototype`. | Entry | On `main` | Firmware 10.01 kernel data | | --- | --- | --- | | [`hw.pagesize`](https://github.com/boykopovar/AnyPS5/blob/27bcd6a29e2fd69aba0626610b2350eb8f2847f6/core/libs/prx/libkernel/System/src/SystemConfiguration.cpp#L256-L263) | 16384 at {6, 7}; debt: "unmeasured" | The OID at +0x1784230 is number 7 under `hw`, kind `0x80048002` (RD, CAPRD, MPSAFE, INT), arg1 NULL, arg2 16384: the [FreeBSD 11.4 `SYSCTL_INT`](https://github.com/freebsd/freebsd-src/blob/8c639945a44588f6cfdddfb057bb5aad88735da0/sys/kern/kern_mib.c#L151-L152) with `PAGE_SIZE` = 16384 | | [`kern.sdk_version`](https://github.com/boykopovar/AnyPS5/blob/27bcd6a29e2fd69aba0626610b2350eb8f2847f6/core/libs/prx/libkernel/System/src/SystemConfiguration.cpp#L419-L426) | `0x01000000`; debt: "the low two bytes are unknown" | The OID at +0x1783d50 is number 46 under `kern`, kind `0x80048006` (RD, CAPRD, MPSAFE, UINT), arg2 `0x10010000`. 10.01 encodes as `0x1001` in the high bytes and 0 in the low two | | [`vm.overcommit`](https://github.com/boykopovar/AnyPS5/blob/27bcd6a29e2fd69aba0626610b2350eb8f2847f6/core/libs/prx/libkernel/System/src/SystemConfiguration.cpp#L414-L418) | 0; a 12.70 payload gets `ENOENT` | The OID at +0xdaea28 sits under `vm` with a number the console kernel auto-assigned, kind `0xc0040002` (RD, WR, MPSAFE, INT), and its variable at +0x1f52110 held 0. FreeBSD's [`vm.overcommit`](https://github.com/freebsd/freebsd-src/blob/8c639945a4/sys/vm/swap_pager.c#L158-L161) is the same read-write `int` with the fixed number `VM_OVERCOMMIT` | | [`physhm_open`, `physhm_unlink`](https://github.com/boykopovar/AnyPS5/blob/27bcd6a29e2fd69aba0626610b2350eb8f2847f6/core/libs/prx/libkernel/Unimplemented.cpp#L13-L21) | Throwing stubs with no arguments, after shadPS4 | In the native syscall table (`sysent` at +0x1ad100, names at +0x1764f80), syscall 629 is `physhm_open` with `sy_narg` 4 (+0x1b46f0) and syscall 630 is `physhm_unlink` with 1 (+0x1b4720) | The entries keep what is still unknown: - Writes to `hw.pagesize` and `kern.sdk_version` return `EPERM`; this was not tried on a console. - The `vm.overcommit` difference between 10.01 and a 12.70 payload process stays open. - The physhm argument types, results and behaviour stay open, and both functions still throw. - `kern.sdk_version` by MIB {1, 46} still throws: no title is known to ask for it. The entries also change in two smaller ways: - Each entry now states its gap first. - The `hw.pagesize` link pointed to FreeBSD `main` (`#L177`, a line that has moved since). It now points to the 11.4 release commit used elsewhere in this file. ### 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. --> Not tested: this PR changes documentation only. Checks: - `python3 tools/check_conventions.py --base origin/main` passes ("All conventions checks passed."). - `python3 tools/pr_overlap.py --branch docs/libkernel-kdata-fw1001` reports one text conflict: #8910 rewrites the `libkernel.md` entry just above `hw.pagesize`, so whichever merges second needs a one-line rebase. It could not compare 22 pull requests that conflict with `main` and share `libkernel.md`; checked by hand, none of their changed lines mention `physhm`, `vm.overcommit`, `kern.sdk_version` or `hw.pagesize`. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main` (`cecb540a6`); 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: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
DoubleAAGuy commented 2026-10-21 15:53:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DoubleAAGuy on 2026-10-21T15:53:58Z.


Hi KernelPanicNT, the overlap check on #8910 reports a debt-line overlap with #9199 in libkernel.md. I reviewed the diffs: #9199 updates firmware data for vm.overcommit, kern.sdk_version and hw.pagesize; #8910 documents unknown sysctl name lookup, so there is no behavior overlap, but the docs hunk may need a rebase. Which order would you prefer? I can rebase #8910 after #9199 if you would like your documentation change to land first.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6320284549 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9199#issuecomment-6320284549). Originally posted by [DoubleAAGuy](https://github.com/DoubleAAGuy) on 2026-10-21T15:53:58Z. --- Hi KernelPanicNT, the overlap check on #8910 reports a debt-line overlap with #9199 in libkernel.md. I reviewed the diffs: #9199 updates firmware data for vm.overcommit, kern.sdk_version and hw.pagesize; #8910 documents unknown sysctl name lookup, so there is no behavior overlap, but the docs hunk may need a rebase. Which order would you prefer? I can rebase #8910 after #9199 if you would like your documentation change to land first.
KernelPanicNT commented 2026-10-21 19:03:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by KernelPanicNT on 2026-10-21T19:03:19Z.


Thanks for checking the diffs so carefully, and for asking! I agree, there's no behaviour overlap, just neighbouring lines in libkernel.md. I don't mind the order at all: if #8910 is ready, go ahead, and I'll rebase #9199 on top of it. No need to wait for mine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6324168025 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9199#issuecomment-6324168025). Originally posted by [KernelPanicNT](https://github.com/KernelPanicNT) on 2026-10-21T19:03:19Z. --- Thanks for checking the diffs so carefully, and for asking! I agree, there's no behaviour overlap, just neighbouring lines in `libkernel.md`. I don't mind the order at all: if #8910 is ready, go ahead, and I'll rebase #9199 on top of it. No need to wait for mine.
THEMANnt commented 2026-10-28 12:06:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-28T12:06:06Z.

Review: APPROVED


Reviewed 71973aa772d8cb1816f30de59aa6232fd47fc690 against author merge base d13b3d7c55a433c7a5040076d849dbe59fad4b53 — approve the documentation change.

The host-side distinctions match the referenced source: physhm exports still throw, vm.overcommit reads the host’s modeled zero, sdk_version remains synthetic, and pagesize uses MIB {6,7}. The firmware-10.01 offsets and syscall argument counts are documented as snapshot observations, with libkernel passthrough and title-process behavior still qualified. I did not independently inspect that console snapshot.

Validation: inspected the Markdown diff and pinned source references; relative links resolve and git diff --check passed. This is documentation/source consistency review. Title disassembly, console snapshots and hardware measurements were not independently reproduced; no runtime regression result is claimed.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5682297184 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9199#pullrequestreview-5682297184). Originally posted by [THEMANnt](https://github.com/THEMANnt) on 2026-10-28T12:06:06Z. **Review:** APPROVED --- Reviewed `71973aa772d8cb1816f30de59aa6232fd47fc690` against author merge base `d13b3d7c55a433c7a5040076d849dbe59fad4b53` — approve the documentation change. The host-side distinctions match the referenced source: physhm exports still throw, vm.overcommit reads the host’s modeled zero, sdk_version remains synthetic, and pagesize uses MIB {6,7}. The firmware-10.01 offsets and syscall argument counts are documented as snapshot observations, with libkernel passthrough and title-process behavior still qualified. I did not independently inspect that console snapshot. Validation: inspected the Markdown diff and pinned source references; relative links resolve and `git diff --check` passed. This is documentation/source consistency review. Title disassembly, console snapshots and hardware measurements were not independently reproduced; no runtime regression result is claimed.
gabichuuuuu commented 2026-11-10 17:48:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-10T17:48:09Z.

Review: COMMENTED


Read 355d421183 against main.

Correctness. The code agrees with the new text. SystemConfiguration.cpp:sysctlbyname_nid_postfix returns 0 (4 bytes) for vm.overcommit (line 631) and 0x01000000 for kern.sdk_version (line 639), and both writes fail with EPERM. sysctlnametomib_nid_postfix (line 792) has no kern.sdk_version entry, so it falls through to ENOENT, and no MIB {1, 46} branch exists in sysctl_nid_postfix, so it ends in the "unsupported MIB" throw. hw.pagesize maps to {6, 7} (lines 687 and 803) and its write returns EPERM. Unimplemented.cpp:9-15 still declares physhm_open and physhm_unlink with (void) and throws. The FreeBSD links resolve: kern_mib.c#L151-L152 is the hw.pagesize SYSCTL_INT and swap_pager.c#L158-L161 is vm.overcommit. The firmware 10.01 kernel-data offsets and syscall numbers cannot be checked from the tree.

Non-blocking. The vm.overcommit text says FreeBSD's entry "has an OID_AUTO number", but the cited swap_pager.c line declares it with VM_OVERCOMMIT. Say that the console kernel's number is auto-assigned, as the kernel data shows, so the sentence does not read as a property of the linked source. GitHub reports the PR as conflicting with main in libkernel.md; it needs a rebase.

Not run here; this is from reading the code.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5846638204 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9199#pullrequestreview-5846638204). Originally posted by [gabichuuuuu](https://github.com/gabichuuuuu) on 2026-11-10T17:48:09Z. **Review:** COMMENTED --- Read `355d421183` against `main`. **Correctness.** The code agrees with the new text. `SystemConfiguration.cpp:sysctlbyname_nid_postfix` returns 0 (4 bytes) for `vm.overcommit` (line 631) and `0x01000000` for `kern.sdk_version` (line 639), and both writes fail with EPERM. `sysctlnametomib_nid_postfix` (line 792) has no `kern.sdk_version` entry, so it falls through to ENOENT, and no MIB {1, 46} branch exists in `sysctl_nid_postfix`, so it ends in the "unsupported MIB" throw. `hw.pagesize` maps to {6, 7} (lines 687 and 803) and its write returns EPERM. `Unimplemented.cpp:9-15` still declares `physhm_open` and `physhm_unlink` with `(void)` and throws. The FreeBSD links resolve: `kern_mib.c#L151-L152` is the `hw.pagesize` `SYSCTL_INT` and `swap_pager.c#L158-L161` is `vm.overcommit`. The firmware 10.01 kernel-data offsets and syscall numbers cannot be checked from the tree. **Non-blocking.** The `vm.overcommit` text says FreeBSD's entry "has an OID_AUTO number", but the cited `swap_pager.c` line declares it with `VM_OVERCOMMIT`. Say that the console kernel's number is auto-assigned, as the kernel data shows, so the sentence does not read as a property of the linked source. GitHub reports the PR as conflicting with `main` in `libkernel.md`; it needs a rebase. Not run here; this is from reading the code. AI-assisted: yes.
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!9199
No description provided.