Commit Graph

21 Commits

Author SHA1 Message Date
Adelmo Junior 72211b70fe fix(kernel): honor the declared flexible memory budget
Read the optional aligned budget from param.json and apply it consistently to configured, available and mapped flexible memory. Add parser and allocation regression coverage.
2026-10-13 20:13:14 -03:00
Dean c13dc7e6b4
Merge pull request #4558 from MiniRML/fix/kernel-json-number-locale
fix(kernel): parse JSON numbers independently of host locale
2026-10-13 15:37:49 +13:00
Dean 7cad853fc1
Merge pull request #4690 from David-cmrg/fix/libkernel-create-data-dir
fix(libkernel): create /data at start-up
2026-10-13 15:37:26 +13:00
David-cmrg bed1b15096 fix(libkernel): create /data at start-up 2026-10-12 21:27:00 +02:00
PrintOrb 9c007805d6
Merge branch 'main' into fix/videoout-high-frame-rate 2026-10-12 11:15:48 -05:00
MiniRML b4d7a3b6c9 fix(kernel): parse JSON numbers independently of host locale 2026-10-12 08:34:20 -07:00
Dean f4b395e28e
Merge pull request #3971 from arreina/fix/param-json-nesting
fix(libkernel): limit param.json nesting depth
2026-10-13 02:33:55 +13:00
PrintOrb 665cca43a0
Merge branch 'main' into fix/videoout-high-frame-rate 2026-10-11 17:21:16 -05:00
Alberto Ruiz e31b757c1e fix(libkernel): limit param.json nesting depth
parseJsonValue recursed without a limit, so a param.json with tens of
thousands of nested arrays overflowed the stack. Reject nesting beyond 512
levels, the limit libSceJson2 uses.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R5WJS4ZdQynAJesCZKH5hb
2026-10-11 22:15:15 +02:00
PrintOrb 63434686bf fix(videoout): support permitted high-frame-rate output 2026-10-11 13:40:31 -05:00
MrMha 474c2b9ff1 fix(libkernel): reject malformed UTF-8 in param JSON 2026-10-11 19:56:55 +04:00
LeandroLP23 c1c7c7fc56 fix(kernel): skip the download0 mount when param.json cannot be read
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 16:07:18 +02:00
LeandroLP23 84fa55722d fix(kernel): create /download0 at start-up when the title declares download data
On the console a title whose param.json declares downloadDataSize finds
/download0 mounted from the start. The host directory was only created
by sceAppContentDownloadDataGetAvailableSpaceKb, so a title that opens
files there directly got ENOENT. libkernel now creates it when it loads,
reading only the run directory's param.json, without resolving guest
paths, so the libc path root is still fixed at first use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 10:18:22 +02:00
Chad 3b6183a208 fix(libSceAppContent): read user defined app params from param.json
sceAppContentAppParamGetInt numbers the SKU flag 0 and
USER_DEFINED_PARAM_1..4 as 1..4 (fpPS4 ps4_libsceappcontent). Id 1
returned the SKU flag and 2..5 returned zero. UFC 6 (PPSA23566) checks
that param 1 is its title number, userDefinedParam1 in param.json, and
crashes otherwise. Absent params read as zero.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 07:49:16 +02:00
Bloxive 457f852944 fix(libkernel): reject leading-zero numbers in param.json 2026-10-07 16:06:40 -04:00
Merijn 9489b851ae fix(libkernel): read defaultLanguage from localizedParameters
A PS5 param.json keeps defaultLanguage inside localizedParameters, next to
the language entries. The parser looked for it at the root only, then fell
back to en-US and to the first member, which is the defaultLanguage string
when no en-US entry exists (PPSA12544 has only en-GB), and threw
"expected JSON object". defaultLanguage is now read from
localizedParameters first, and the fallback takes the first language
object.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:48:06 +02:00
Tomás Ortellado 23008762cc fix(libkernel): preserve 64-bit metadata download sizes 2026-10-05 09:13:05 -03:00
STL1te 6b36c050fe style: drop the branch's code comments per CONVENTIONS.md
Only the lines this branch added lose their comments; the commits before
keep them, with the reasoning behind each change, for whoever digs into
that code later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:25:29 +03:00
STL1te c206f7049a feat(kernel, libc): memory, files and threads for retail title boot
libkernel:
- direct memory keeps its contents per physical page across unmap and
  remap; a page mapped at two live addresses at once throws
- sceKernelDirectMemoryQuery answers from tracked allocations
- SCE protections read back as set, GPU and AMPR bits included
- APR prefix path resolve, file size and stat by id, positional reads,
  fsync/pread/pwrite; directories open as descriptors on Windows
- sceKernelCheckReachability, getpeername, shutdown
- Dinkumware C11 threads (_Mtx_*, _Cnd_*, _Thrd_*) in the title libc
  layout; any pthread stack size, rounded at thread creation

libc:
- unaddressed guest mappings go to the system-managed area from
  0x2_0000_0000, leaving the application area to fixed mappings
- the process starts in /app0
- guest sscanf on Windows; a null %s prints as (null) as on FreeBSD
- localeconv, _FNan, _FDtest, _FExp, __udivti3, wcsncpy_s, aligned
  operator new, _Throw_Cpp_error

Tests: direct memory following physical pages, guest formatting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:22:13 +03:00
boykopovar 762b91df59 feat(libkernel): app metadata param.json parsing impl 2026-09-23 15:18:48 +03:00
boykopovar cf1953058b feat(libkernel): add app metadata reading module 2026-09-23 15:09:31 +03:00