aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/physical_core.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Performance diagnostics and small wins for title 1Takoroka6 days1-1/+18
| | | | | | | | | | | | | | | | | | - 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.
* [*, docs] remove UTF8 and make docs ASCII only (#4166)lizzie2026-07-071-1/+1
| | | | | | | | | | except for the AI policy doc which uses output for demonstrative purposes Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4166 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
* [video_core, hle] remove redundant parent references in system structs (#3908)lizzie2026-06-231-9/+10
| | | | | | | | | | reworked a bit to remove references of parent objects and instead pass as arguments to methods to prevent useless reloads Signed-off-by: lizzie <lizzie@eden-emu.dev> Co-authored-by: maufeat <sahyno1996@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3908 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: crueter <crueter@eden-emu.dev>
* [core] GDB improvements (#3848)Duncan Ogilvie2026-04-271-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commands to reproduce the issues are in the commit messages. I tested on Super Mario Odyssey using [nx2elf](https://github.com/shuffle2/nx2elf) converted binaries and gdb-multiarch: ``` (gdb) monitor info Process: 0x51 (Application) Program Id: 0x0100000000010000 Layout: Alias: 0x1103400000 - 0x21033fffff Heap: 0x2103400000 - 0x23033fffff Aslr: 0x0008000000 - 0x7fffffffff Stack: 0x1083400000 - 0x11033fffff Modules: 0x0080b3d000 - 0x0080b40fff nnrtld 0x0080b41000 - 0x0081ff1fff RedStar.nss 0x0081ff2000 - 0x008270efff multimedia 0x008270f000 - 0x00833e2fff nnSdk (gdb) monitor mappings Mappings: 0x0000000000 - 0x0080b3cfff Free ----- [0, 0] 0x0080b3d000 - 0x0080b3efff r-x Code ----- [0, 0] 0x0080b3f000 - 0x0080b3ffff r-- Code ----- [0, 0] 0x0080b40000 - 0x0080b40fff rw- CodeData ----- [0, 0] 0x0080b41000 - 0x008156bfff r-x Code ----- [0, 0] 0x008156c000 - 0x0081cdafff r-- Code ----- [0, 0] 0x0081cdb000 - 0x0081ff1fff rw- CodeData ----- [0, 0] 0x0081ff2000 - 0x0082365fff r-x Code ----- [0, 0] 0x0082366000 - 0x00825c0fff r-- Code ----- [0, 0] 0x00825c1000 - 0x008270efff rw- CodeData ----- [0, 0] 0x008270f000 - 0x0082c3cfff r-x Code ----- [0, 0] 0x0082c3d000 - 0x00832bffff r-- Code ----- [0, 0] 0x00832c0000 - 0x00833e2fff rw- CodeData ----- [0, 0] 0x00833e3000 - 0x0083403fff Free ----- [0, 0] 0x0083404000 - 0x0083404fff rw- ThreadLocal ----- [0, 0] 0x0083405000 - 0x1083403fff Free ----- [0, 0] 0x1083404000 - 0x1083503fff rw- Stack ----- [0, 0] 0x1083504000 - 0x7fffffffff Free ----- [0, 0] (gdb) set sysroot (gdb) set solib-search-path /Users/duncan/Downloads/smo-program Reading symbols from /Users/duncan/Downloads/smo-program/rtld.elf... (No debugging symbols found in /Users/duncan/Downloads/smo-program/rtld.elf) Reading symbols from /Users/duncan/Downloads/smo-program/main.elf... (No debugging symbols found in /Users/duncan/Downloads/smo-program/main.elf) Reading symbols from /Users/duncan/Downloads/smo-program/subsdk0.elf... (No debugging symbols found in /Users/duncan/Downloads/smo-program/subsdk0.elf) Reading symbols from /Users/duncan/Downloads/smo-program/sdk.elf... (No debugging symbols found in /Users/duncan/Downloads/smo-program/sdk.elf) (gdb) info shared From To Syms Read Shared Object Library 0x0000000080b3d000 0x0000000080b41000 Yes (*) /Users/duncan/Downloads/smo-program/rtld.elf 0x0000000080b41000 0x0000000081ff2000 Yes (*) /Users/duncan/Downloads/smo-program/main.elf 0x0000000081ff2000 0x000000008270f000 Yes (*) /Users/duncan/Downloads/smo-program/subsdk0.elf 0x000000008270f000 0x00000000833e3000 Yes (*) /Users/duncan/Downloads/smo-program/sdk.elf (*): Shared library is missing debugging information. (gdb) info functions nnMain All functions matching regular expression "nnMain": Non-debugging symbols: 0x0000000081024250 nnMain 0x0000000082c2de40 nnMain@plt (gdb) b *nnMain Breakpoint 1 at 0x81024250 (gdb) c Continuing. Breakpoint 1, 0x0000000081024250 in nnMain () from /Users/duncan/Downloads/smo-program/main.elf (gdb) x/10i $pc => 0x81024250 <nnMain>: stp x22, x21, [sp, #-48]! 0x81024254 <nnMain+4>: stp x20, x19, [sp, #16] 0x81024258 <nnMain+8>: stp x29, x30, [sp, #32] 0x8102425c <nnMain+12>: add x29, sp, #0x20 0x81024260 <nnMain+16>: bl 0x81569aa0 0x81024264 <nnMain+20>: mov w19, w0 0x81024268 <nnMain+24>: bl 0x81569ab0 0x8102426c <nnMain+28>: mov x20, x0 0x81024270 <nnMain+32>: mov w0, w19 0x81024274 <nnMain+36>: mov x1, x20 ``` Symlinked like this: ``` ls -l /Users/duncan/Downloads/smo-program total 687472 -rw-r--r--@ 1 duncan staff 20385356 Apr 9 18:12 main.elf lrwxr-xr-x@ 1 duncan staff 11 Apr 9 15:26 multimedia -> subsdk0.elf lrwxr-xr-x@ 1 duncan staff 8 Apr 9 15:28 nnrtld -> rtld.elf lrwxr-xr-x@ 1 duncan staff 7 Apr 9 15:26 nnSdk -> sdk.elf lrwxr-xr-x@ 1 duncan staff 8 Apr 9 15:26 RedStar.nss -> main.elf -rw-r--r--@ 1 duncan staff 12440 Apr 9 18:12 rtld.elf -rw-r--r--@ 1 duncan staff 12662960 Apr 9 18:12 sdk.elf -rw-r--r--@ 1 duncan staff 6294336 Apr 9 18:12 subsdk0.elf ``` Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3848 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev>
* [arm] remove vtable bounce hack (#3776)lizzie2026-04-061-16/+2
| | | | | | | | | | | horrible hack anyways, and PKZA shouldn't need it anymore Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3776 Reviewed-by: Maufeat <sahyno1996@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [core/arm] introduce vtable bouncing (#2943)lizzie2025-11-031-1/+15
| | | | | | | | | | | | | | Basically this just makes functions that go into zero-page or invalid addresses "bounce" back (with a return err of 0) such that it emulates a subroutine returning appropriatedly... this is mainly inspired by [this particular commit](https://git.citron-emu.org/Citron/Emulator/commit/fbb4f5c015d778ed0c8e2d91b01dcdffd7da9681); with the key difference of accounting for the scheduler fucking up some random bs. I don't like this hack but anyways maybe it fixes something? Signed-off-by: lizzie lizzie@eden-emu.dev Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2943 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [meta] remove MicroProfile (#185)crueter2025-08-061-8/+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>
* kernel: fix single coreLiam2023-12-081-1/+1
|
* core: refactor emulated cpu core activationLiam2023-12-041-46/+205
|
* core: Define HAS_NCE macroGPUCode2023-11-251-2/+2
|
* arm: Implement native code execution backendLiam2023-11-251-1/+13
|
* core: remove remaining uses of dynamic_castLiam2023-07-211-2/+6
|
* kernel: convert miscellaneousLiam2023-03-121-21/+20
|
* Initial ARM64 supportLiam2022-11-091-2/+2
|
* kernel: unlayer CPU interrupt handlingLiam2022-07-251-15/+14
|
* kernel: fix issues with single core modeLiam2022-07-141-0/+1
|
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
* hle: kernel: Use std::mutex instead of spin locks for most kernel locking.bunnei2022-04-111-2/+1
|
* dynarmic: Better interruptsmerry2022-04-031-0/+1
|
* hle: kernel: k_page_table: Update SetProcessMemoryPermission.bunnei2022-01-111-5/+13
|
* core: Make variable shadowing a compile-time errorLioncash2021-05-161-4/+4
| | | | | | Now that we have most of core free of shadowing, we can enable the warning as an error to catch anything that may be remaining and also eliminate this class of logic bug entirely.
* hle: kernel: Rewrite scheduler implementation based on Mesopshere.bunnei2020-12-061-7/+2
|
* hle: kernel: physical_core: Clear exclusive state after each run.bunnei2020-12-061-0/+1
| | | | - This is closer to pre-multicore behavior, and works a bit better.
* hle: kernel: multicore: Replace n-JITs impl. with 4 JITs.bunnei2020-11-291-8/+30
|
* core: Remove usage of unicornLioncash2020-11-031-14/+2
| | | | | | | | Unicorn long-since lost most of its use, due to dynarmic gaining support for handling most instructions. At this point any further issues encountered should be used to make dynarmic better. This also allows us to remove our dependency on Python.
* Core/Common: Address Feedback.Fernando Sahmkow2020-06-271-0/+4
|
* General: Move ARM_Interface into Threads.Fernando Sahmkow2020-06-271-33/+4
|
* Core: Refactor ARM Interface.Fernando Sahmkow2020-06-271-17/+8
|
* CPU_Manager: Reconfigre guest threads for dynamrmic downsidesFernando Sahmkow2020-06-271-0/+3
|
* General: Recover Prometheus project from harddrive failure Fernando Sahmkow2020-06-271-8/+29
| | | | | | | This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host Timing, Reworks the Kernel's Scheduler, Introduce Idle State and Suspended State, Recreates the bootmanager, Initializes Multicore system.
* physical_core: Make use of std::make_unique instead of std::make_shared in ctorLioncash2020-04-241-1/+3
| | | | | | | We can also allow unicorn to be constructed in 32-bit mode or 64-bit mode to satisfy the need for both interpreter instances. Allows this code to compile successfully of non x86-64 architectures.
* core: Implement separate A32/A64 ARM interfaces.bunnei2020-03-021-3/+16
|
* kernel/physical_core: Make use of std::unique_ptrLioncash2020-01-301-2/+2
| | | | | | | | | | | | | | | | | | shared_ptr was used in 8eb175481c7434c31e92b7cbc38ad3e881c33f3b due to a misunderstanding of how the language generates move constructors and move assignment operators. If a destructor is user-provided, then the compiler won't generate the move constructor and move assignment operators by default--they must be explicitly opted into. The reason for the compilation errors is due to the fact that the language will fall back to attempting to use the copy constructor/copy assignment operators if the respective move constructor or move assignment operator is unavailable. Given that we explicitly opt into them now, the the move constructor and move assignment operators will be generated as expected.
* kernel/physical_core: Remove unused kernel reference member variableLioncash2020-01-301-3/+2
| | | | | | | This isn't used within the class, so it can be removed to simplify the overall interface. While we're in the same area, we can simplify a unique_ptr reset() call.
* System: Address FeedbackFernando Sahmkow2020-01-271-4/+7
|
* Core: Refactor CPU Management.Fernando Sahmkow2020-01-251-3/+33
| | | | This commit moves ARM Interface and Scheduler handling into the kernel.
* Kernel: Implement Physical Core.Fernando Sahmkow2020-01-241-0/+19