Skip to content

feat(libkernel): implement sceKernelGetSystemSwVersion - #2906

Closed
pushkarreddyy wants to merge 1 commit into
boykopovar:mainfrom
pushkarreddyy:feat/libkernel-system-sw-version
Closed

pushkarreddyy wants to merge 1 commit into
boykopovar:mainfrom
pushkarreddyy:feat/libkernel-system-sw-version

Conversation

@pushkarreddyy

@pushkarreddyy pushkarreddyy commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

What

ProsperoStore (PPSA99000) stops at startup on main (57f96fd2) on missing system export sceKernelGetSystemSwVersion (NID Mv1zUObHvXI) in libkernel.

In PR #2543 (kill, merged as 9a704771), startup logging verified:
With this PR applied, PPSA99000 moves past kill, next stop = ./app.elf: symbol lookup error: ./app.elf: undefined symbol: Mv1zUObHvXI.

This PR implements sceKernelGetSystemSwVersion_nid_postfix:

  • Declares struct SceKernelSystemSwVersion (size, versionString, version, unk_24, total size 40 bytes / 0x28).
  • Validates null pointer and reports EFAULT (14).
  • Validates struct size equals sizeof(SceKernelSystemSwVersion) and reports EINVAL (22) on mismatch.
  • Populates versionString with baseline "01.000.000", zeroes remaining buffer bytes, sets version = 0x01000000, and sets unk_24 = 0.
  • Adds unit tests in core/libs/tests/GuestSystemConfiguration.cpp.
  • Documents baseline assumption in docs/dev/TechnicalDebt.md.

Tested

  • Unit test guest_system_configuration (core/libs/tests/GuestSystemConfiguration.cpp): checks null pointer handling, size validation under/overflow, pre-dirty buffer overwrite, zero padding, and errno preservation.
  • Checked python tools/check_conventions.py --base origin/main (all conventions checks passed).
  • NID Mv1zUObHvXI verified with tools/nid_names.py (compute_nid("sceKernelGetSystemSwVersion")).
  • Python test suite passed: python -m unittest discover tools/tests (52/52 passed).

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 in TechnicalDebt
  • 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: feat(libkernel): support kern.sdk_version in sysctlbyname #2902
  • AI-assisted: yes

@github-actions github-actions Bot added the intake paused Closed while PR intake is limited to authors with at least 10 PRs merged into main label Oct 10, 2026
@github-actions

Copy link
Copy Markdown

Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

@github-actions

Copy link
Copy Markdown

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.

Pull request Conflicting files (lines on main) Same exports Same new files
#2902 core/libs/tests/GuestSystemConfiguration.cpp L54, L56

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

Updated error handling to return SCE_KERNEL_ERROR_EFAULT and SCE_KERNEL_ERROR_EINVAL without altering errno, and updated guest unit tests per upstream review on #2945:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

intake paused Closed while PR intake is limited to authors with at least 10 PRs merged into main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant