summaryrefslogtreecommitdiffstats
path: root/src/core/arm/arm_interface.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* kernel: instantiate memory separately for each guest processLiam2023-12-231-1/+1
|
* core: refactor emulated cpu core activationLiam2023-12-041-172/+49
|
* arm: Implement native code execution backendLiam2023-11-251-0/+3
|
* Fixes and workarounds to make UBSan happier on macOScomex2023-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are still some other issues not addressed here, but it's a start. Workarounds for false-positive reports: - `RasterizerAccelerated`: Put a gigantic array behind a `unique_ptr`, because UBSan has a [hardcoded limit](https://stackoverflow.com/questions/64531383/c-runtime-error-using-fsanitize-undefined-object-has-a-possibly-invalid-vp) of how big it thinks objects can be, specifically when dealing with offset-to-top values used with multiple inheritance. Hopefully this doesn't have a performance impact. - `QueryCacheBase::QueryCacheBase`: Avoid an operation that UBSan thinks is UB even though it at least arguably isn't. See the link in the comment for more information. Fixes for correct reports: - `PageTable`, `Memory`: Use `uintptr_t` values instead of pointers to avoid UB from pointer overflow (when pointer arithmetic wraps around the address space). - `KScheduler::Reload`: `thread->GetOwnerProcess()` can be `nullptr`; avoid calling methods on it in this case. (The existing code returns a garbage reference to a field, which is then passed into `LoadWatchpointArray`, and apparently it's never used, so it's harmless in practice but still triggers UBSan.) - `KAutoObject::Close`: This function calls `this->Destroy()`, which overwrites the beginning of the object with junk (specifically a free list pointer). Then it calls `this->UnregisterWithKernel()`. UBSan complains about a type mismatch because the vtable has been overwritten, and I believe this is indeed UB. `UnregisterWithKernel` also loads `m_kernel` from the 'freed' object, which seems to be technically safe (the overwriting doesn't extend as far as that field), but seems dubious. Switch to a `static` method and load `m_kernel` in advance.
* core: decouple ARM interface from DynarmicLiam2023-06-131-15/+22
|
* kernel: use KTypedAddress for addressesLiam2023-03-221-4/+4
|
* kernel/svc: switch to generated wrappersLiam2023-02-071-0/+1
|
* Merge pull request #8637 from liamwhite/bad-interruptsbunnei2022-08-081-6/+5
|\ | | | | kernel: unlayer CPU interrupt handling
| * kernel: unlayer CPU interrupt handlingLiam2022-07-251-6/+5
| |
* | chore: make yuzu REUSE compliantAndrea Pappacoda2022-07-271-3/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [REUSE] is a specification that aims at making file copyright information consistent, so that it can be both human and machine readable. It basically requires that all files have a header containing copyright and licensing information. When this isn't possible, like when dealing with binary assets, generated files or embedded third-party dependencies, it is permitted to insert copyright information in the `.reuse/dep5` file. Oh, and it also requires that all the licenses used in the project are present in the `LICENSES` folder, that's why the diff is so huge. This can be done automatically with `reuse download --all`. The `reuse` tool also contains a handy subcommand that analyzes the project and tells whether or not the project is (still) compliant, `reuse lint`. Following REUSE has a few advantages over the current approach: - Copyright information is easy to access for users / downstream - Files like `dist/license.md` do not need to exist anymore, as `.reuse/dep5` is used instead - `reuse lint` makes it easy to ensure that copyright information of files like binary assets / images is always accurate and up to date To add copyright information of files that didn't have it I looked up who committed what and when, for each file. As yuzu contributors do not have to sign a CLA or similar I couldn't assume that copyright ownership was of the "yuzu Emulator Project", so I used the name and/or email of the commit author instead. [REUSE]: https://reuse.software Follow-up to 01cf05bc75b1e47beb08937439f3ed9339e7b254
* dynarmic: Abort watchpoints ASAPMerry2022-07-151-1/+1
|
* dynarmic: Stop ReadCode callbacks to unmapped addressesLiam2022-06-221-0/+1
|
* core/debugger: memory breakpoint supportLiam2022-06-161-1/+12
|
* core/debugger: Improved stepping mechanism and misc fixesLiam2022-06-011-2/+12
|
* core/debugger: Implement new GDB stub debuggerLiam2022-06-011-3/+2
|
* Remove unused PrepareReschedule functionMerry2022-04-241-3/+0
|
* core/arm: separate backtrace collectionLiam2022-04-211-7/+11
|
* dynarmic: Better interruptsmerry2022-04-031-0/+3
|
* general: Replace NonCopyable struct with equivalentsLioncash2022-02-021-1/+5
|
* core/arm_interface: Call SVC after end of dynarmic block.Markus Wick2021-05-271-3/+0
| | | | | | So we can modify all of dynarmic states within SVC without ExceptionalExit. Especially as the ExceptionalExit hack is dropped on upstream dynarmic.
* core/arm: Drop ChangeProcessorID.Markus Wick2021-05-261-2/+0
| | | | | | This code was used to switch the CPU ID on thread switches. However since "hle: kernel: multicore: Replace n-JITs impl. with 4 JITs.", the CPU ID is not a constant. This has been dead code since this rewrite, and dropped in dynarmic as well. So there is no need to keep it.
* core: arm: arm_interface: Fix shadowing errors.bunnei2021-01-111-3/+4
|
* core: arm: Implement InvalidateCacheRange for CPU cache invalidation.bunnei2020-11-291-6/+13
|
* hle: kernel: multicore: Replace n-JITs impl. with 4 JITs.bunnei2020-11-291-0/+3
|
* Revert "core: Fix clang build"bunnei2020-10-211-4/+4
|
* core: Fix clang buildLioncash2020-10-181-4/+4
| | | | | | | Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
* Core/Common: Address Feedback.Fernando Sahmkow2020-06-281-1/+1
|
* SVC: Implement 32-bits wrappers and update Dynarmic.Fernando Sahmkow2020-06-271-3/+2
|
* SingleCore: Use Cycle Timing instead of Host Timing.Fernando Sahmkow2020-06-271-2/+4
|
* General: Move ARM_Interface into Threads.Fernando Sahmkow2020-06-271-0/+2
|
* Core: Refactor ARM Interface.Fernando Sahmkow2020-06-271-3/+6
|
* ARM/WaitTree: Better track the CallStack for each thread.Fernando Sahmkow2020-06-271-0/+3
|
* Scheduler: Remove arm_interface lock and a few corrections.Fernando Sahmkow2020-06-271-10/+0
|
* General: Add better safety for JIT use.Fernando Sahmkow2020-06-271-0/+10
|
* General: Recover Prometheus project from harddrive failure Fernando Sahmkow2020-06-271-1/+4
| | | | | | | 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.
* arm_interface: Ensure ThreadContext is zero'd out.bunnei2020-04-171-16/+16
|
* core: Implement separate A32/A64 ARM interfaces.bunnei2020-03-031-13/+19
|
* core: Prepare various classes for memory read/write migrationLioncash2019-11-271-1/+7
| | | | | | | | | | Amends a few interfaces to be able to handle the migration over to the new Memory class by passing the class by reference as a function parameter where necessary. Notably, within the filesystem services, this eliminates two ReadBlock() calls by using the helper functions of HLERequestContext to do that for us.
* core/arm: Remove obsolete Unicorn memory mappingLioncash2019-07-111-7/+0
| | | | | | | | This was initially necessary when AArch64 JIT emulation was in its infancy and all memory-related instructions weren't implemented. Given the JIT now has all of these facilities implemented, we can remove these functions from the CPU interface.
* arm_interface: Expand backtrace generationZach Hilman2019-05-251-0/+11
| | | | Returns results as a vector of entries for further processing. Logs addresses, offsets, and mangled name.
* core/cpu_core_manager: Create threads separately from initialization.Lioncash2019-04-121-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our initialization process is a little wonky than one would expect when it comes to code flow. We initialize the CPU last, as opposed to hardware, where the CPU obviously needs to be first, otherwise nothing else would work, and we have code that adds checks to get around this. For example, in the page table setting code, we check to see if the system is turned on before we even notify the CPU instances of a page table switch. This results in dead code (at the moment), because the only time a page table switch will occur is when the system is *not* running, preventing the emulated CPU instances from being notified of a page table switch in a convenient manner (technically the code path could be taken, but we don't emulate the process creation svc handlers yet). This moves the threads creation into its own member function of the core manager and restores a little order (and predictability) to our initialization process. Previously, in the multi-threaded cases, we'd kick off several threads before even the main kernel process was created and ready to execute (gross!). Now the initialization process is like so: Initialization: 1. Timers 2. CPU 3. Kernel 4. Filesystem stuff (kind of gross, but can be amended trivially) 5. Applet stuff (ditto in terms of being kind of gross) 6. Main process (will be moved into the loading step in a following change) 7. Telemetry (this should be initialized last in the future). 8. Services (4 and 5 should ideally be alongside this). 9. GDB (gross. Uses namespace scope state. Needs to be refactored into a class or booted altogether). 10. Renderer 11. GPU (will also have its threads created in a separate step in a following change). Which... isn't *ideal* per-se, however getting rid of the wonky intertwining of CPU state initialization out of this mix gets rid of most of the footguns when it comes to our initialization process.
* arm_interface: Make LogBacktrace() a const member functionLioncash2018-12-311-1/+1
| | | | This function doesn't modify instance state, so it can be made const.
* Moved log backtrace to arm_interface.cpp. Added printing of error code to fatalDavid Marcec2018-12-291-17/+7
|
* Moved backtrace to ArmInterfaceDavid Marcec2018-12-191-1/+17
|
* Moved backtrace to ArmInterfaceDavid Marcec2018-12-031-0/+2
| | | | Added to both dynarmic and unicorn
* arm_interface: Add missing fpsr/tpidr members to the ThreadContext structLioncash2018-09-301-2/+8
| | | | | | | | | Internally within the kernel, it also includes a member variable for the floating-point status register, and TPIDR, so we should do the same here to match it. While we're at it, also fix up the size of the struct and add a static assertion to ensure it always stays the correct size.
* arm_interface: Replace kernel vm_manager include with a forward declarationLioncash2018-09-211-1/+4
| | | | | | Avoids an unnecessary inclusion and also uncovers three places where indirect inclusions were relied upon, which allows us to also resolve those.
* arm_interface: Remove ARM11-isms from the CPU interfaceLioncash2018-09-181-22/+31
| | | | | | | | | This modifies the CPU interface to more accurately match an AArch64-supporting CPU as opposed to an ARM11 one. Two of the methods don't even make sense to keep around for this interface, as Adv Simd is used, rather than the VFP in the primary execution state. This is essentially a modernization change that should have occurred from the get-go.
* Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-151-2/+2
|
* core: Namespace all code in the arm subdirectory under the Core namespaceLioncash2018-08-251-0/+4
| | | | Gets all of these types and interfaces out of the global namespace.
* Merge pull request #750 from lioncash/ctxbunnei2018-07-211-3/+0
|\ | | | | arm_interface: Remove unused tls_address member of ThreadContext
| * arm_interface: Remove unused tls_address member of ThreadContextLioncash2018-07-211-3/+0
| | | | | | | | | | Currently, the TLS address is set within the scheduler, making this member unused.
* | CPU: Save and restore the TPIDR_EL0 system register on every context switch.Subv2018-07-211-0/+4
|/ | | | Note that there's currently a dynarmic bug preventing this register from being written.
* scheduler: Clear exclusive state when switching contextsMerryMage2018-07-161-0/+2
|
* Merge pull request #193 from N00byKing/3184_2_robotic_boogaloobunnei2018-03-191-26/+3
|\ | | | | Implement Pull #3184 from citra: core/arm: Improve timing accuracy before service calls in JIT (Rebased)
| * Implements citra-emu/citra#3184N00byKing2018-02-251-26/+3
| |
* | arm_interface: Support unmapping previously mapped memory.bunnei2018-03-161-1/+5
|/
* clang-formatMerryMage2018-01-161-1/+2
|
* arm_dynarmic: Implement coreMerryMage2018-01-121-7/+5
|
* arm: Remove SkyEye/Dyncom code that is ARMv6-only.bunnei2018-01-031-30/+0
|
* Merge remote-tracking branch 'upstream/master' into nxbunnei2017-10-101-10/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # src/core/CMakeLists.txt # src/core/arm/dynarmic/arm_dynarmic.cpp # src/core/arm/dyncom/arm_dyncom.cpp # src/core/hle/kernel/process.cpp # src/core/hle/kernel/thread.cpp # src/core/hle/kernel/thread.h # src/core/hle/kernel/vm_manager.cpp # src/core/loader/3dsx.cpp # src/core/loader/elf.cpp # src/core/loader/ncch.cpp # src/core/memory.cpp # src/core/memory.h # src/core/memory_setup.h
| * Moved down_count to CoreTimingHuw Pascoe2017-09-301-9/+0
| |
| * ARM_Interface: Implement PageTableChangedMerryMage2017-09-251-0/+3
| |
* | arm_interface: Set TLS address for dynarmic core.bunnei2017-09-301-0/+7
| |
* | arm: Use 64-bit addressing in a bunch of places.bunnei2017-09-301-14/+14
|/
* ThreadContext: Move from "core" to "arm_interface".bunnei2016-12-221-6/+13
|
* Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner2016-09-191-2/+1
|
* Sources: Run clang-format on everything.Emmanuel Gil Peyrot2016-09-181-4/+3
|
* arm: ResetContext shouldn't be part of ARM_Interface.bunnei2016-09-151-9/+0
|
* ARM: add ClearInstructionCache functionwwylele2016-08-271-0/+3
|
* Set fpscr for new threadsJannik Vogel2016-05-171-0/+1
|
* arm_interface: Make GetNumInstructions constLioncash2015-12-061-1/+1
|
* arm_interface: directly initialize class membersLioncash2015-12-061-7/+2
|
* arm_interface: Implement interface for retrieving VFP registersLioncash2015-08-071-0/+28
|
* Common: Remove common.hYuri Kunde Schlesner2015-05-071-1/+0
|
* arm_interface: Support retrieval/storage to CP15 registersLioncash2015-04-061-0/+15
|
* arm_interface: Get rid of GetTicks.Lioncash2015-03-161-6/+0
| | | | Removes a TODO.
* Scheduler refactor Pt. 1Kevin Hartman2015-02-101-0/+9
| | | | | | | | | | | | | * Simplifies scheduling logic, specifically regarding thread status. It should be much clearer which statuses are valid for a thread at any given point in the system. * Removes dead code from thread.cpp. * Moves the implementation of resetting a ThreadContext to the corresponding core's implementation. Other changes: * Fixed comments in arm interfaces. * Updated comments in thread.cpp * Removed confusing, useless, functions like MakeReady() and ChangeStatus() from thread.cpp. * Removed stack_size from Thread. In the CTR kernel, the thread's stack would be allocated before thread creation.
* Move ThreadContext to core/core.h and deal with the falloutYuri Kunde Schlesner2015-01-091-3/+5
|
* CoreTiming: Ported the CoreTiming namespace from PPSSPPSubv2015-01-071-0/+2
| | | | | | Implemented the required calls to make it work. CoreTiming: Added a new logging class Core_Timing.
* ARM: Add a mechanism for faking CPU time elapsed during HLE.bunnei2014-12-261-0/+6
| | | | - Also a few cleanups.
* License changepurpasmart962014-12-211-1/+1
|
* Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generatedEmmanuel Gil Peyrot2014-11-191-3/+3
|
* ARM_Interface: Make destructor virtualLioncash2014-11-141-1/+1
| | | | Fixes some warnings on OSX.
* Merge branch 'threading' of https://github.com/bunnei/citrabunnei2014-06-141-0/+3
|\ | | | | | | | | | | Conflicts: src/core/hle/function_wrappers.h src/core/hle/service/gsp.cpp
| * arm: added option to prepare CPU core (while mid-instruction) for thread reschedulebunnei2014-06-021-0/+3
| |
* | Added 'this' reference to num_instructions field so it's properly updated,as before the method was affecting the local method parameter rather than the class fieldDisruption2014-06-011-1/+1
|/
* ARM_Interpreter/ARM_Interface: Fixed member variable naming to be consistent with style guidebunnei2014-05-211-5/+5
|
* ARM_Interface: added SaveContext and LoadContext functions for HLE thread switchingbunnei2014-05-211-1/+15
|
* Merge branch 'master' into threadingbunnei2014-05-171-5/+16
|\
| * updated how we call ARM core to make things much fasterbunnei2014-05-171-5/+16
| |
* | added option to set CPSR register to arm_interfacebunnei2014-05-121-0/+6
|/
* removed DISALLOW_COPY_AND_ASSIGN in favor of NonCopyable classbunnei2014-04-281-2/+1
|
* missed this file with commit 95e5436fbunnei2014-04-111-1/+10
|
* fixed licensing and updated code style naming for arm_interface/arm_interpreter frontend modulebunnei2014-04-091-9/+11
|
* fixed project includes to use new directory structurebunnei2014-04-091-2/+2
|
* got rid of 'src' folders in each sub-projectbunnei2014-04-091-0/+68