aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/svc.cpp
Commit message (Collapse)AuthorAgeFilesLines
* svc: name the handles a traced WaitSynchronization waits onTakoroka5 days1-0/+17
| | | | | | With EDEN_NX2_SVC_TRACE, WaitSynchronization now logs its handles and, for events services created, the names they gave them (a title that never draws usually polls one: Minecraft waits on AM's message event).
* Performance diagnostics and small wins for title 1Takoroka6 days1-5/+17
| | | | | | | | | | | | | | | | | | - eden-cli: SDL called SDL_AppIterate back to back, keeping a host core at 100% polling input; run the main callbacks at 240 Hz. - EDEN_NX2_IDLE_SPIN_US: optional spin before an idle core blocks (measured: no gain on title 1, so off by default). - EDEN_NX2_SVC_TRACE=<first>:<last>: trace SVCs (with thread ids) for a range of presents only. - MME DMA reads flush GPU-written memory first (never triggered on title 1, kept for correctness); render-enable override histogram instead of the first-400 log. Measured on title 1's title screen (RTX 4070 Laptop): GPU ~20% busy, the six emulated cores ~0.9 host cores in total, Eden's GPU thread 45-70% busy and largely waiting: on host fences for semaphore acquires (GPU accuracy High delays every release to host completion), on ASTC upload Finish(), and in a 1 ms poll sleep. gpu_accuracy=Low: ~12.5 -> ~16 fps.
* Switch 2: native memory/images, GPU-accessible attribute, TSG subcontexts, ↵Takoroka7 days1-6/+27
| | | | | | | | | | | | | syncpoint shim - gsv 111/112/114/423/429/430/314/315/435 track native memory and images with real ids (meanings from changes.patch); 1510/435 use its block-linear layout. - svc 0x80 sets a real GpuAccessible (0x20) memory attribute (from changes.patch). - Characteristics report TSG subcontexts (flag 22, 64 per TSG at 0xb4); NvRm otherwise allows one subcontext and a second NVN queue fails its setup. - Syncpoint shim: flag 26, address-space ioctl 0xB, and GPU reads of the shim page return guest syncpoint values (scheme from changes.patch). - EDEN_NX2_IPC_TRACE also logs TIPC commands; gdbrsp.py watch/mem improvements.
* Switch 2: aud:u audio, REv revision tag, job-slot events, open-file limitTakoroka7 days1-1/+1
| | | | | | | | | | | - aud:u (nn::audio::CreateUserClientSessionByHipc) command 2 returns Eden's IAudioRendererManager; the renderer accepts Switch 2's 'REv?' update tag by comparing revision numbers. - nx2:gpu sub 211 signals the job slot in request word 17, not word 2; mapping jobs no longer stall once the SDK rotates slots. - eden-cli raises the CRT open-file limit (_setmaxstdio(8192)) like the Qt frontend, so loose RomFS folders don't run out of handles. - Per-mapping GPU logs moved to Debug.
* Switch 2 GPU memory: svc 0x80, gpu sub-session jobs, VM range, SM 0x808Takoroka8 days1-1/+8
| | | | | | | | | | | | | - svc 0x80 (address, size, mask 0x20, attr 0x20) marks memory GPU accessible for nn::gpu::sdk::CreateGpuAccessibleMemory; accept it. - gpu 22's sub-session is served by the gpu object; sub 101 registers memory, sub 211 submits a job whose id event is signalled at once. - gpu 203 reports [0x8000000, 0xC000000000) as the in-process VirtualMachine range that serves AllocSpace (NVN reserves fixed VA at 0x8000000 up to 512 GiB). - Report SM 0x808: NVN2's engine class table is only returned for it. With this NVN device init allocates its GPU memory and opens /dev/nvhost-tsg-gpu.
* kernel: optional SVC trace (EDEN_NX2_SVC_TRACE=1)Takoroka8 days1-0/+11
|
* [svc] don't truncate 64-bit SVC args on trace logs (#4374)lizzie2026-09-091-6/+7
| | | | | | | | | | | | | | | | Small inconvenience with args Signed-off-by: lizzie <lizzie@eden-emu.dev> - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4374 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Maufeat <sahyno1996@gmail.com>
* [hle/kernel] mark invalid SVC paths as unreachable (#3023)lizzie2025-12-041-6/+2
| | | | | | | | | | | | Should improve performance of SVC by a very, very tiny margin. Codegen seems to be better from the exclusion of all domains beyond >=0x92 Signed-off-by: lizzie lizzie@eden-emu.dev Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3023 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [hle/kernel] allow primitive tracing of svcs on debug builds (#3005)lizzie2025-11-181-1/+3
| | | | | | | | | Signed-off-by: lizzie lizzie@eden-emu.dev Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3005 Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [tools, hle/kernel] generate condensed version of svc.cpp; move ↵lizzie2025-11-071-3004/+1063
| | | | | | | | | | | | | | | svc_generator.py and generate_converters.py to tools (#2791) Eventually we'd want cmake to do the build for us (as a build step) instead of having git be polluted with commits to update the autogenerated file... Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2791 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [kernel] Implement code address offset for Skyline compatibility (#2858)JPikachu2025-10-311-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | - Add debug logging for 32-bit syscall argument tracking. - Add CodeStartOffset constant (0x500000) applied to only 32-bit code address space types in KProcess::LoadFromMetadata. - Replace CheckMemoryStateContiguous with two-stage CheckMemoryState in KPageTableBase::UnmapCodeMemory to discover and verify memory state more accurately. Based on similar fixes in Ryujinx (commit 5e9678c8fe) Fixes compatibility with: - Skyline 32-bit modding framework - CTGP-DX (Mario Kart 8 Deluxe mod) - Other homebrew using 32bit Skyline Co-authored-by: JPikachu <jpikachu.eden@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2858 Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev> Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Reviewed-by: Lizzie <lizzie@eden-emu.dev> Co-authored-by: JPikachu <jpikachu@eden-emu.dev> Co-committed-by: JPikachu <jpikachu@eden-emu.dev>
* [meta] remove MicroProfile (#185)crueter2025-08-061-6/+3
| | | | | | Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/185 Reviewed-by: Lizzie <lizzie@eden-emu.dev>
* Add cmake option to enable microprofile (#179)Gamer642025-08-021-0/+4
| | | | | | | | | | | | Backported from https://github.com/azahar-emu/azahar/commit/dd9c743041308112c8dc349c5c237c04b2c4c75f. Co-authored-by: PabloMK7 <hackyglitch2@gmail.com> Co-authored-by: Shinmegumi <shinmegumi@eden-emu.dev> Co-authored-by: Gamer64 <76565986+Gamer64ytb@users.noreply.github.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/179 Co-authored-by: Gamer64 <gamer64@eden-emu.dev> Co-committed-by: Gamer64 <gamer64@eden-emu.dev>
* core: refactor emulated cpu core activationLiam2023-12-041-1475/+1480
|
* kernel: update KProcessLiam2023-10-211-1/+1
|
* kernel: prefer std::addressofLiam2023-03-121-90/+90
|
* svc: Fix type consistency (exposed on macOS)Merry2023-02-211-8/+8
|
* kernel: use GetCurrentProcessLiam2023-02-131-1/+1
|
* kernel/svc: switch to generated wrappersLiam2023-02-061-429/+4415
|
* kernel/svc: Split implementations into separate filesLiam2023-02-041-2683/+3
|
* kernel: KPageTable: updateLiam2023-01-221-2/+2
|
* Revert "Revert "k_page_group: synchronize""bunnei2023-01-071-1/+1
|
* Revert "k_page_group: synchronize"gidoly2022-12-291-1/+1
|
* k_page_group: synchronizeLiam2022-12-251-1/+1
|
* kernel: svc: Fix duplicated InfoType enumNarr the Reg2022-12-151-90/+47
|
* kernel: process: Implement GetFreeThreadCountNarr the Reg2022-12-151-1/+14
| | | | Used by Just Dance® 2023 Edition
* kernel: implement FlushProcessDataCacheLiam2022-11-121-8/+18
|
* kernel/svc_types: refreshLiam2022-11-091-69/+48
|
* Merge pull request #9173 from bunnei/kern-update-15liamwhite2022-11-051-1/+1
|\ | | | | Kernel: Various updates for FW 15.0.x
| * core: hle: kernel: Add KEventInfo.bunnei2022-11-031-1/+1
| |
* | kernel: fix port trackingLiam2022-10-311-1/+0
| |
* | kernel: invert session request handling flowLiam2022-10-311-2/+4
|/
* general: Enforce C4800 everywhere except in video_coreMorph2022-10-221-2/+2
|
* core: hle: kernel: k_process: Improve management of page table & cleanup.bunnei2022-10-181-1/+1
|
* core: hle: kernel: k_process: Change Status -> State.bunnei2022-10-181-2/+2
|
* Merge pull request #9061 from liamwhite/writable-eventliamwhite2022-10-141-13/+12
|\ | | | | kernel: remove KWritableEvent
| * kernel: remove KWritableEventLiam2022-10-121-13/+12
| |
* | k_server_session: preliminary support for userspace server sessionsLiam2022-10-111-14/+68
| |
* | Add implementation of svcCreateSessionLiam2022-10-111-1/+89
|/
* kernel: use KScheduler from mesosphereLiam2022-07-141-6/+1
|
* Merge pull request #8512 from german77/nnResultMorph2022-06-281-150/+144
|\ | | | | Replace multiple names with a better name
| * core: kernel: Replace instances of KPageLinkedList with KPageGroupgerman772022-06-261-1/+1
| |
| * core: Replace all instances of ResultCode with Resultgerman772022-06-261-149/+143
| |
* | Merge pull request #8504 from comex/mesosphere-current-processbunnei2022-06-271-0/+24
|\ \ | |/ |/| Support `InfoType_MesosphereCurrentProcess`
| * Re-add missing `case` and braces, and trim whitespacecomex2022-06-251-1/+3
| |
| * Update src/core/hle/kernel/svc.cppcomex2022-06-251-6/+14
| | | | | | Co-authored-by: liamwhite <liamwhite@users.noreply.github.com>
| * Support InfoType_MesosphereCurrentProcesscomex2022-06-251-0/+14
| |
* | kernel: make current thread pointer thread localLiam2022-06-231-7/+6
|/
* Implement ExitProcess svcNikita Strygin2022-06-161-1/+2
| | | | | | | Currently this just stops all the emulation This works under assumption that only application will try to use ExitProcess, with services not touching it If application exits - it quite makes sense to end the emulation
* Merge pull request #8457 from liamwhite/kprocess-suspendFernando S2022-06-161-1/+1
|\ | | | | kernel: implement KProcess suspension