feat(libkernel_sys): report physical page size #10335

Merged
MarcZX10 merged 2 commits from upstream-pr/10335 into main 2026-11-04 17:35:02 +00:00
MarcZX10 commented 2026-10-23 18:22:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T18:22:15Z.


What

Implement sceKernelGetPhysPageSize by returning AnyPS5's existing 16 KiB guest page size, PS5_PAGE_SIZE. This keeps the export consistent with libkernel's direct-memory and mapping implementation. Console behaviour is unverified.

Tested

  • Linux, GCC 12.2: C++20 syntax-only compile of core/libs/prx/libkernel_sys/Export.Discovery.cpp — passed.
  • git diff --check — passed.
  • python3 tools/pr_overlap.py --branch codex/libkernel-sys-phys-page-size --repo boykopovar/AnyPS5 --base main — no overlap with open pull requests.
  • python3 tools/check_conventions.py --base origin/main — completed with 568 findings (289 errors) across the repository, including unrelated existing silent stubs and historical merge commit subjects. No changed-path-specific diagnostic was observed in the output.
  • No PS5 hardware test or full product build was run.

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: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4987400701 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10335). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-23T18:22:15Z. --- ### What Implement `sceKernelGetPhysPageSize` by returning AnyPS5's existing 16 KiB guest page size, `PS5_PAGE_SIZE`. This keeps the export consistent with libkernel's direct-memory and mapping implementation. Console behaviour is unverified. ### Tested - Linux, GCC 12.2: C++20 syntax-only compile of `core/libs/prx/libkernel_sys/Export.Discovery.cpp` — passed. - `git diff --check` — passed. - `python3 tools/pr_overlap.py --branch codex/libkernel-sys-phys-page-size --repo boykopovar/AnyPS5 --base main` — no overlap with open pull requests. - `python3 tools/check_conventions.py --base origin/main` — completed with 568 findings (289 errors) across the repository, including unrelated existing silent stubs and historical merge commit subjects. No changed-path-specific diagnostic was observed in the output. - No PS5 hardware test or full product build was run. ### Checklist - [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: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-11-02 04:57:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T04:57:15Z.

Review: COMMENTED


Reviewed — overlap note is stale, requested 16384 assertion present

The merge-order question no longer applies because #11032 has merged, and the 16384 page-size assertion requested by review is in the head.

What I ran

Head 307be471e0c00447de3057cfaaf01c1a6012c62b (live, OPEN). Read-only: gh pr view for 10335 and 11032, gh api GET on comments, gh pr diff, git diff upstream/main...<head>, git grep at the head. Nothing was built or run.

Results

Check Result Note
Hosted checks 5 success, none failing mergeStateStatus CLEAN
#11032 state MERGED 2026-10-28T07:39:52Z Gruzzberry's proposed order is moot
16384 assertion Present GuestKernelSys.cpp:908
sceKernelGetPhysPageSize returns PS5_PAGE_SIZE Confirmed Export.Discovery.cpp:924-925

Findings

  • Gruzzberry (2026-10-25 18:55Z) reports an overlap with #11032 on docs/dev/debt/libkernel_sys.md and proposes this PR go first. #11032 is merged, so the order question no longer applies. At head this PR adds one debt entry (hunk +4), and the line number 12 in the comment was not checked against this numbering.
  • oneandonlydean (2026-10-29 11:51Z) says the direct 16384-byte assertion was added and the console-unverified debt is unchanged. Confirmed: the assertion is at GuestKernelSys.cpp:908 and the export returns PS5_PAGE_SIZE at Export.Discovery.cpp:925.
  • babyhuey (2026-10-26) reports a Windows run where pr_overlap_encoding fails on main too. No question for you.

Sources

Not verified

  • The console page size of 16 KiB (the debt entry itself says it is unverified).
  • The overlap line numbers Gruzzberry gives.
  • The Windows run results (external).
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5732248158 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10335#pullrequestreview-5732248158). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-02T04:57:15Z. **Review:** COMMENTED --- # Reviewed — overlap note is stale, requested 16384 assertion present The merge-order question no longer applies because #11032 has merged, and the 16384 page-size assertion requested by review is in the head. ## What I ran Head `307be471e0c00447de3057cfaaf01c1a6012c62b` (live, OPEN). Read-only: `gh pr view` for 10335 and 11032, `gh api` GET on comments, `gh pr diff`, `git diff upstream/main...<head>`, `git grep` at the head. Nothing was built or run. ## Results | Check | Result | Note | |---|---|---| | Hosted checks | 5 success, none failing | mergeStateStatus CLEAN | | #11032 state | MERGED 2026-10-28T07:39:52Z | Gruzzberry's proposed order is moot | | 16384 assertion | Present | `GuestKernelSys.cpp:908` | | `sceKernelGetPhysPageSize` returns PS5_PAGE_SIZE | Confirmed | `Export.Discovery.cpp:924-925` | ## Findings - Gruzzberry (2026-10-25 18:55Z) reports an overlap with #11032 on `docs/dev/debt/libkernel_sys.md` and proposes this PR go first. #11032 is merged, so the order question no longer applies. At head this PR adds one debt entry (hunk `+4`), and the line number 12 in the comment was not checked against this numbering. - oneandonlydean (2026-10-29 11:51Z) says the direct 16384-byte assertion was added and the console-unverified debt is unchanged. Confirmed: the assertion is at `GuestKernelSys.cpp:908` and the export returns `PS5_PAGE_SIZE` at `Export.Discovery.cpp:925`. - babyhuey (2026-10-26) reports a Windows run where `pr_overlap_encoding` fails on main too. No question for you. ## Sources - https://github.com/boykopovar/AnyPS5/blob/307be471e0c00447de3057cfaaf01c1a6012c62b/core/libs/tests/GuestKernelSys.cpp#L908 - https://github.com/boykopovar/AnyPS5/blob/307be471e0c00447de3057cfaaf01c1a6012c62b/core/libs/prx/libkernel_sys/Export.Discovery.cpp#L924-L925 ## Not verified - The console page size of 16 KiB (the debt entry itself says it is unverified). - The overlap line numbers Gruzzberry gives. - The Windows run results (external).
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!10335
No description provided.