summaryrefslogtreecommitdiff
path: root/src/core/arm
AgeCommit message (Collapse)Author
2025-03-06revert 31694994f2c338486486efb7d8bc5e954b8a9e07Zephyron
revert arm_nce: Hash TLB to MLP L2 Update
2025-03-06revert ee3d858935600e23a7914620b21f45082cccf8bdZephyron
revert Follow Up Of the previous commit with the update of TLB update
2025-03-06revert 6565055865688ba316801d99a3c3a5a0300cad5dZephyron
revert Fix: Core_Memory logging and ARM_NCE Mutex logging
2025-03-05Fix: Core_Memory logging and ARM_NCE Mutex loggingCamilleLaVey
2025-03-04Follow Up Of the previous commit with the update of TLB updateCamilleLaVey
2025-03-04arm_nce: Hash TLB to MLP L2 UpdateCamilleLaVey
2025-03-04revert e4342324fe4ef63ef48a15ac379063ab8c7fa7aeCamilleLaVey
revert Changes of the previous commits
2025-03-03Changes of the previous commitsCamilleLaVey
2025-02-28arm: Improve TLB implementation and fault handling in NCEZephyron
This commit enhances the Translation Lookaside Buffer (TLB) implementation in the ARM Native Code Execution (NCE) component to increase stability, particularly on Android devices. The changes prioritize robustness and error recovery over performance optimizations. Key improvements: - Replace set-associative TLB with a simpler linear search implementation - Implement a basic LRU replacement policy for TLB entries - Add validation checks for memory addresses before TLB insertion - Ensure proper page alignment for guest and host addresses - Enhance alignment fault handling with instruction skipping as fallback - Add comprehensive debug logging for memory access errors - Improve error recovery in guest memory access scenarios These changes should significantly reduce crashes during emulation on Android devices by gracefully handling memory access edge cases that previously resulted in hard crashes. Co-Authored-By: Camille LaVey <camillelavey@citron-emu.org> Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-02-25core/arm/nce: Implement TLB caching systemZephyron
Adds a software TLB cache to improve memory access performance in the NCE (Native Code Execution) system. Key changes include: - Implement set-associative TLB with 64 sets and 8 ways - Add TLB lookup before memory access in HandleGuestAccessFault - Implement LRU replacement policy with access frequency consideration - Add thread context caching to reduce overhead - Add proper synchronization with mutex locks - Add helper functions for TLB management (lookup, insert, invalidate) This change should improve performance by reducing redundant memory translations and providing faster access to frequently used pages.
2025-02-16build: upgrade fmt and SDL2Zephyron
Update fmt library to version 11.0.2 and make necessary adjustments: - Replace fmt/format.h includes with fmt/ranges.h - Add const qualifiers to formatter::format functions - Update CMake to require fmt version 11 Additional dependency updates: - Update SDL2 bundled version from 2.28.2 to 2.32.0 - Update catch2 to version 3.8.0 - Update vcpkg baseline to c82f74667287d3dc386bce81e44964370c91a289
2025-01-18arm/video: Fix shader extension and exception handlingZephyron
Two main changes in this commit: 1. Replace NVIDIA-specific GL_NV_gpu_shader5 extension with the more widely supported GL_EXT_shader_explicit_arithmetic_types_float16 in the scaleforce shader. This improves compatibility across different GPU vendors. 2. Refactor ARM32 exception handling: - Restructure exception cases for better readability - Update exception handling to match current Dynarmic API - Fix indentation in switch statement - Remove AccessViolation case as it's no longer supported in current API These changes improve shader compatibility and align the exception handling with the current Dynarmic implementation.
2025-01-18memory: Improve null pointer and unmapped memory handlingZephyron
- Update vcpkg baseline to a42af01b72c28a8e1d7b48107b33e4f286a55ef6 - Add SPIRV-Tools and SPIRV-Headers as submodules - Update Vulkan-related submodules to latest stable versions - Improve memory access error handling: - Add specific handling for null pointer accesses in ARM32 emulation - Return 0 for null pointer reads instead of undefined behavior - Silently ignore writes to null pointers - Add more detailed error messages distinguishing between null pointer access and other unmapped memory errors - Treat addresses below 0x1000 as potential null pointer accesses These changes should provide more graceful handling of null pointer accesses and improve stability when running games that attempt invalid memory operations.
2025-01-14Revert incorrect copyright attribution for non-contributed filesZephyron
- In commit b3facaa6bb30cdc39f2b7d632fef1e3bfeee7785, the copyright header was updated to include "Citron Homebrew Project" across multiple files, regardless of whether any contributions were made. - This commit removes the incorrect attribution and reverts the copyright header to its previous state. - Copyright attribution should only be added when meaningful contributions have been made to the file. - This commit ensures proper compliance with copyright standards and maintains correct attribution to the respective contributors. - Special thanks to Tachi for pointing out the need for these corrections and ensuring that proper attribution practices are followed.
2025-01-02arm: Skip duplicate consecutive addresses in backtrace outputZephyron
Adds logic to track and skip duplicate consecutive addresses when logging backtraces. This improves log readability by removing redundant entries that point to the same address in sequence.
2024-12-31core: Update copyright headersZephyron
- Update copyright headers to include Citron Homebrew Project - Add 2025 to copyright years
2024-12-31chore: update project references and add Citron copyrightZephyron
- Replaced all references to the old project name with Citron. - Added Citron copyright information alongside existing notices in all files.
2024-01-15core: Support multiple modules per patcherGPUCode
2023-12-25core: track separate heap allocation for linuxLiam
2023-12-22kernel: instantiate memory separately for each guest processLiam
2023-12-20Merge pull request #12417 from liamwhite/arm64-gcc-fixFernando S
nce: hide shadowing warnings from dynarmic headers
2023-12-20nce: hide shadowing warnings from dynarmic headersLiam
2023-12-19nce: increase handler stack sizeLiam
2023-12-19nce: fix read size in simd immediate emulationLiam
2023-12-11nce: adjust initialization for repeated callsLiam
2023-12-10nce: implement instruction emulation for misaligned memory accessesLiam
2023-12-09debug: fix reading of module namesLiam
2023-12-06Merge pull request #12236 from liamwhite/cpu-refactorFernando S
core: refactor emulated cpu core activation
2023-12-04arm: fix context save of vector regsLiam
2023-12-04core: refactor emulated cpu core activationLiam
2023-12-02nce: fix pre-text patch for single modulesLiam
2023-11-29core: Rename patcher fileGPUCode
2023-11-25oaknut: Address warningsGPUCode
2023-11-25Address more review commentsGPUCode
2023-11-25arm_nce: skip data aborts for crash handling parityLiam
2023-11-25arm: Print backtrace on data abortGPUCode
2023-11-25patch: check offsets from first code wordLiam
2023-11-25arm_nce: skip dc cvac on possibly write-protected areasLiam
2023-11-25Address some review commentsGPUCode
2023-11-25arm: Implement native code execution backendLiam
2023-11-13core: check for thread dpc before eretLiam
2023-10-21kernel: update KProcessLiam
2023-08-02Merge pull request #10839 from lat9nq/pgc-plusliamwhite
general: Reimplement per-game configurations
2023-07-26Merge pull request #10990 from comex/ubsanliamwhite
Fixes and workarounds to make UBSan happier on macOS
2023-07-21core: remove remaining uses of dynamic_castLiam
2023-07-21settings,general: Rename non-confirming enumslat9nq
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-27arm_dynarmic_32: Remove disabling of block linking on arm64Merry
2023-06-12core: decouple ARM interface from DynarmicLiam