aboutsummaryrefslogtreecommitdiff
path: root/src/core/arm/arm_interface.cpp
AgeCommit message (Collapse)Author
2023-12-22kernel: instantiate memory separately for each guest processLiam
2023-12-04core: refactor emulated cpu core activationLiam
2023-11-25arm: Print backtrace on data abortGPUCode
2023-11-13core: check for thread dpc before eretLiam
2023-10-21kernel: update KProcessLiam
2023-07-15Fixes and workarounds to make UBSan happier on macOScomex
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.
2023-07-09arm_interface: correct breakpoint rewind conditionLiam
2023-06-12core: decouple ARM interface from DynarmicLiam
2023-03-23memory: rename global memory references to application memoryLiam
2023-03-22kernel: use KTypedAddress for addressesLiam
2023-02-13general: rename CurrentProcess to ApplicationProcessLiam
2023-01-14Be careful of mangled out of bounds readKelebek1
2023-01-14Add stacktrace symbol demanglingKelebek1
2022-12-02core: add option to break on unmapped accessLiam
2022-10-18core: hle: kernel: k_thread: Implement thread termination DPC.bunnei
2022-07-25Merge pull request #8549 from liamwhite/kscheduler-scMorph
kernel: use KScheduler from Mesosphere
2022-07-15dynarmic: Abort watchpoints ASAPMerry
2022-07-14kernel: use KScheduler from mesosphereLiam
2022-07-07Merge pull request #8501 from liamwhite/backtrace-againMai
core/arm: better support for backtrace generation
2022-06-30Merge pull request #8490 from liamwhite/read-code-stopMorph
dynarmic: Stop ReadCode callbacks to unmapped addresses
2022-06-25core/arm: better support for backtrace generationLiam
2022-06-23kernel: make current thread pointer thread localLiam
2022-06-21dynarmic: Stop ReadCode callbacks to unmapped addressesLiam
2022-06-16core/debugger: memory breakpoint supportLiam
2022-06-14core: centralize profile scope for DynarmicLiam
2022-06-01core/debugger: Improved stepping mechanism and misc fixesLiam
2022-06-01core/debugger: Implement new GDB stub debuggerLiam
2022-04-23general: Convert source file copyright comments over to SPDXMorph
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.
2022-04-20core/arm: separate backtrace collectionLiam
2022-04-09core: extract symbol readingLiam
2020-10-29General: Resolve a few missing initializer warningsLioncash
Resolves a few -Wmissing-initializer warnings.
2020-10-20Revert "core: Fix clang build"bunnei
2020-10-17core: Fix clang buildLioncash
Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
2020-06-27ARM/WaitTree: Better track the CallStack for each thread.Fernando Sahmkow
2020-04-17core: memory: Move to Core::Memory namespace.bunnei
- helpful to disambiguate Kernel::Memory namespace.
2020-04-15CMakeLists: Specify -Wextra on linux buildsLioncash
Allows reporting more cases where logic errors may exist, such as implicit fallthrough cases, etc. We currently ignore unused parameters, since we currently have many cases where this is intentional (virtual interfaces). While we're at it, we can also tidy up any existing code that causes warnings. This also uncovered a few bugs as well.
2019-11-26core/memory: Migrate over Read{8, 16, 32, 64, Block} to the Memory classLioncash
With all of the trivial parts of the memory interface moved over, we can get right into moving over the bits that are used. Note that this does require the use of GetInstance from the global system instance to be used within hle_ipc.cpp and the gdbstub. This is fine for the time being, as they both already rely on the global system instance in other functions. These will be removed in a change directed at both of these respectively. For now, it's sufficient, as it still accomplishes the goal of de-globalizing the memory code.
2019-11-26core: Prepare various classes for memory read/write migrationLioncash
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.
2019-05-26loader: Move NSO module tracking to AppLoaderZach Hilman
Also cleanup of general stuff
2019-05-25arm_interface: Expand backtrace generationZach Hilman
Returns results as a vector of entries for further processing. Logs addresses, offsets, and mangled name.
2018-12-30arm_interface: Make include path relative for arm_interface.hLioncash
Makes it consistent with the rest of the includes.
2018-12-30arm_interface: Make LogBacktrace() a const member functionLioncash
This function doesn't modify instance state, so it can be made const.
2018-12-30arm_interface: Mark variables as const where applicable in LogBacktrace()Lioncash
Two of these variables have fixed values, so we can make that immediately obvious from the get-go.
2018-12-30arm_interface: Remove unnecessary semicolonLioncash
Namespaces don't require the use of a semicolon. Silences a -Wextra-semi warning.
2018-12-29Moved log backtrace to arm_interface.cpp. Added printing of error code to fatalDavid Marcec