Skip to content

feat(libkernel): declare five exports by their hash-verified names - #5123

Closed
parl0v wants to merge 1 commit into
boykopovar:mainfrom
parl0v:feat/names-kernel
Closed

parl0v wants to merge 1 commit into
boykopovar:mainfrom
parl0v:feat/names-kernel

Conversation

@parl0v

@parl0v parl0v commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

What

Declares 5 exports by name: direct-memory aliasing, resident flexible-memory count, kernel heap usage, mmap2 and __sys_dynlib_unload_prx. Each is a throwing stub (NotImplemented_nid_no_patch) declared without parameters, with an Unknown function info entry in its library's technical debt file.

Library NID Name zecoxao/sce_symbols
libkernel GQli4UAXTfQ __sys_dynlib_unload_prx #22 (merged)
libkernel RbhD-epf6c0 sceKernelEnableDmemAliasing3 #22 (merged)
libkernel pQiLz-exzR4 sceKernelKernelHeapUsage2 #22 (merged)
libkernel tGtH2GTWbyE mmap2 #22 (merged)
libkernel zx9n-9bt7IA sceKernelGetResidentFmemCount2 #22 (merged)

The names come from the shared NID database, where I added them (zecoxao/sce_symbols #22 and #23). Each name hashes to its NID with tools/nid_names.py compute_nid, and the library is the module that exports the NID in the 10.01 system modules.

No title I know of imports these yet, so nothing calls them today. With them declared, a title that does import one resolves it by name and stops with that name in the NotImplemented message instead of an unresolved NID at load. Implementations can then replace the stubs one by one.

Tested

  • Windows 10 19045, MinGW-w64 GCC 15.2: the libs target builds; tools/check_conventions.py --base origin/main passes.
  • Every name re-hashed against its NID before the commit.

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
  • Unblocks: none
  • AI-assisted: yes

@github-actions github-actions Bot mentioned this pull request Oct 13, 2026
10 tasks done
@github-actions

Copy link
Copy Markdown

Progress report (a2a3a3a → 553e51f)

📉 System libraries: 87.72% (-0.12%, +5 declared functions)

🆕 5 declared as stubs
Library Name
libkernel __sys_dynlib_unload_prx_nid_postfix
libkernel mmap2_nid_postfix
libkernel sceKernelEnableDmemAliasing3
libkernel sceKernelGetResidentFmemCount2
libkernel sceKernelKernelHeapUsage2

@github-actions

github-actions Bot commented Oct 13, 2026 •

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
#5061 docs/dev/debt/libkernel.md L95

@CnRJay CnRJay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The names check out the way the description says (they hash to their NIDs, and the library matches the 10.01 modules). The blocker is the current export policy: reviewers have closed export-only PRs that don't name a title which reaches the export on main (for example #1205, #1208 and #950). The PR states that no known title imports these yet.

As it stands, declaring them changes only the stop message, from an unresolved NID at load to a NotImplemented with a name. The policy has been to wait until a title actually reaches them. It might be better to keep the name mappings in the NID database (where they already are, in sce_symbols #22) and open this once a title's log shows one of them, with the title ID and log line in the description.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants