aboutsummaryrefslogtreecommitdiff
path: root/src/core/memory.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Initial MMO implementationMrPurple6662025-04-281-4/+128
| | | | MMO (Multithreaded Memory Operations)
* Better FastMemcpy and FastMemsetMrPurple6662025-04-281-10/+163
| | | | Use 16-byte copy paths
* Replace std::memcpy/memset with intrinsics on known sizesMrPurple6662025-04-281-9/+49
|
* "Merge Tagged PR 13018"yuzubot2024-03-031-2/+1
|
* scope_exit: Make constexprFearlessTobi2024-02-191-4/+4
| | | | | Allows the use of the macro in constexpr-contexts. Also avoids some potential problems when nesting braces inside it.
* atomic_ops: Remove volatile qualifierMerry2024-01-271-4/+2
|
* SMMU: Add Android compatibilityFernando Sahmkow2024-01-181-36/+26
|
* SMMU: Implement physical memory mirroringFernando Sahmkow2024-01-181-21/+32
|
* SMMU: Initial adaptation to video_core.Fernando Sahmkow2024-01-181-7/+18
|
* core: track separate heap allocation for linuxLiam2023-12-251-23/+63
|
* general: properly support multiple memory instancesLiam2023-12-221-14/+14
|
* core: refactor emulated cpu core activationLiam2023-12-041-7/+3
|
* Address more review commentsGPUCode2023-11-251-0/+50
|
* arm: Implement native code execution backendLiam2023-11-251-0/+13
|
* core: Respect memory permissions in MapGPUCode2023-11-251-4/+4
|
* Merge pull request #11995 from FernandoS27/you-dont-need-the-new-iphoneliamwhite2023-11-161-5/+20
|\ | | | | Revert PR #11806 and do a proper fix to the memory handling.
| * Memory: Fix invalidation handling from the CPU/ServicesFernando Sahmkow2023-11-121-5/+20
| |
* | kernel: add KPageTableBaseLiam2023-11-101-3/+3
|/ | | | Co-authored-by: Kelebek1 <eeeedddccc@hotmail.co.uk>
* Merge pull request #11155 from liamwhite/memory3liamwhite2023-07-281-3/+18
|\ | | | | memory: check page against address space size
| * memory: check page against address space sizeLiam2023-07-251-3/+18
| |
* | Merge pull request #10990 from comex/ubsanliamwhite2023-07-261-13/+17
|\ \ | |/ |/| Fixes and workarounds to make UBSan happier on macOS
| * Fixes and workarounds to make UBSan happier on macOScomex2023-07-151-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | memory: minimize dependency on processLiam2023-07-221-58/+57
| |
* | k_process: PageTable -> GetPageTableLiam2023-07-141-4/+4
|/
* Use spans over guest memory where possible instead of copying data.Kelebek12023-07-021-5/+49
|
* Memory Tracking: Optimize tracking to only use atomic writes when contested ↵Fernando Sahmkow2023-06-281-6/+33
| | | | with the host GPU
* MemoryTracking: Initial setup of atomic writes.Fernando Sahmkow2023-06-281-3/+4
|
* Address feedback, add CR notice, etcFernando Sahmkow2023-05-071-6/+5
|
* Settings: add option to enable / disable reactive flushingFernando Sahmkow2023-05-071-1/+2
|
* GPU: Add Reactive flushingFernando Sahmkow2023-05-071-6/+21
|
* Accuracy Normal: reduce accuracy further for perf improvements in Project LimeFernando Sahmkow2023-04-231-1/+1
|
* memory: rename global memory references to application memoryLiam2023-03-231-25/+11
|
* kernel: use KTypedAddress for addressesLiam2023-03-221-143/+176
|
* general: rename CurrentProcess to ApplicationProcessLiam2023-02-131-5/+5
|
* Revert "MemoryManager: use fastmem directly."Merry2023-01-251-1/+1
| | | | This reverts commit 7f18e3bb898911343e3909f676dc96f3a34b1e95.
* memory: fix watchpoint use when fastmem is enabledLiam2023-01-151-0/+4
|
* MemoryManager: use fastmem directly.Fernando Sahmkow2023-01-051-1/+1
|
* Merge pull request #9415 from liamwhite/dcMai2022-12-111-14/+15
|\ | | | | memory: correct semantics of data cache management operations
| * memory: correct semantics of data cache management operationsLiam2022-12-111-14/+15
| |
* | memory: remove DEBUG_ASSERT pointer testLiam2022-12-101-2/+0
|/
* kernel: implement FlushProcessDataCacheLiam2022-11-121-0/+65
|
* general: Resolve -Wunused-lambda-capture and C5233Morph2022-10-221-21/+16
|
* core: device_memory: Templatize GetPointer(..).bunnei2022-10-181-3/+3
|
* MemoryManager: Fix errors popping out.Fernando Sahmkow2022-10-061-0/+9
|
* code: dodge PAGE_SIZE #defineKyle Kienapfel2022-08-191-39/+42
| | | | | | | | | | | | | | | | | | | | | Some header files, specifically for OSX and Musl libc define PAGE_SIZE to be a number This is great except in yuzu we're using PAGE_SIZE as a variable Specific example `static constexpr u64 PAGE_SIZE = u64(1) << PAGE_BITS;` PAGE_SIZE PAGE_BITS PAGE_MASK are all similar variables. Simply deleted the underscores, and then added YUZU_ prefix Might be worth noting that there are multiple uses in different classes/namespaces This list may not be exhaustive Core::Memory 12 bits (4096) QueryCacheBase 12 bits ShaderCache 14 bits (16384) TextureCache 20 bits (1048576, or 1MB) Fixes #8779
* 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 b2eb10382941bef0914f4a0a4685b9033440aa9f
* Project AndioKelebek12022-07-221-1/+5
|
* core/debugger: memory breakpoint supportLiam2022-06-161-1/+78
|
* core/debugger: Implement new GDB stub debuggerLiam2022-06-011-0/+13
|
* Revert "Memory GPU <-> CPU: reduce infighting in the texture cache by adding ↵bunnei2022-03-261-1/+1
| | | | CPU Cached memory."