aboutsummaryrefslogtreecommitdiff
path: root/src/core/memory.cpp
AgeCommit message (Collapse)Author
2022-12-11Merge pull request #9415 from liamwhite/dcMai
memory: correct semantics of data cache management operations
2022-12-11memory: correct semantics of data cache management operationsLiam
2022-12-10memory: remove DEBUG_ASSERT pointer testLiam
2022-11-12kernel: implement FlushProcessDataCacheLiam
2022-10-22general: Resolve -Wunused-lambda-capture and C5233Morph
2022-10-18core: device_memory: Templatize GetPointer(..).bunnei
2022-10-06MemoryManager: Fix errors popping out.Fernando Sahmkow
2022-08-19code: dodge PAGE_SIZE #defineKyle Kienapfel
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
2022-07-27chore: make yuzu REUSE compliantAndrea Pappacoda
[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
2022-07-22Project AndioKelebek1
2022-06-16core/debugger: memory breakpoint supportLiam
2022-06-01core/debugger: Implement new GDB stub debuggerLiam
2022-03-26Revert "Memory GPU <-> CPU: reduce infighting in the texture cache by adding ↵bunnei
CPU Cached memory."
2022-03-25Memory: Don't protect reads on Normal accuracy.Fernando Sahmkow
2022-02-21core: device_memory: Use memory size reported by KSystemControl.bunnei
- That way, we can consolidate the memory layout to one place.
2021-09-29prevent access violation from iob in Memory::IsValidVirtualAddressAndrew Strelsky
2021-08-07memory: Address lioncash's reviewyzct12345
2021-08-07memory: Dedup Read and Write and fix logging bugsyzct12345
2021-08-05memory: Clean up CopyBlock tooyzct12345
2021-08-05memory: Address lioncash's reviewyzct12345
2021-08-05memory: Clean up codeyzct12345
2021-06-11General: Add settings for fastmem and disabling adress space check.FernandoS27
2021-06-11core: Make use of fastmemMarkus Wick
2021-05-29core/memory: Check our memory fallbacks for out-of-bound behavior.Markus Wick
This makes it by far harder to crash yuzu. Also implement the 48bit masking of AARCH64 while touching this code.
2021-05-20hle: kernel: Use host memory allocations for KSlabMemory.bunnei
- There are some issues with the current workaround, we will just use host memory until we have a complete kernel memory implementation.
2021-05-05hle: kernel: Rename Process to KProcess.bunnei
2021-05-05core: memory: Add a work-around to allocate and access kernel memory regions ↵bunnei
by vaddr.
2021-02-18hle: kernel: Migrate PageHeap/PageTable to KPageHeap/KPageTable.bunnei
2021-01-01memory: Remove MemoryHookMerryMage
2020-12-29core/memory: Read and write page table atomicallyReinUsesLisp
Squash attributes into the pointer's integer, making them an uintptr_t pair containing 2 bits at the bottom and then the pointer. These bits are currently unused thanks to alignment requirements. Configure Dynarmic to mask out these bits on pointer reads. While we are at it, remove some unused attributes carried over from Citra. Read/Write and other hot functions use a two step unpacking process that is less readable to stop MSVC from emitting an extra AND instruction in the hot path: mov rdi,rcx shr rdx,0Ch mov r8,qword ptr [rax+8] mov rax,qword ptr [r8+rdx*8] mov rdx,rax -and al,3 and rdx,0FFFFFFFFFFFFFFFCh je Core::Memory::Memory::Impl::Read<unsigned char> mov rax,qword ptr [vaddr] movzx eax,byte ptr [rdx+rax]
2020-12-24core: memory: Ensure thread safe access when pages are rasterizer cached (#5206)bunnei
* core: memory: Ensure thread safe access when pages are rasterizer cached.
2020-12-08memory: Resolve -Wdocumentation warning for Write()Lioncash
Write() doesn't return anything, so the @returns tag shouldn't be present.
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-10-13core/CMakeLists: Make some warnings errorsLioncash
Makes our error coverage a little more consistent across the board by applying it to Linux side of things as well. This also makes it more consistent with the warning settings in other libraries in the project. This also updates httplib to 0.7.9, as there are several warning cleanups made that allow us to enable several warnings as errors.
2020-09-23memory: Resolve a -Wdocumentation warningLioncash
memory doesn't exist as a parameter any more.
2020-07-28common/atomic_ops: Don't cast away volatile from pointersLioncash
Preserves the volatility of the pointers being casted.
2020-07-05memory: Set page-table pointers before setting attribute = MemoryMerryMage
2020-06-27General: Initial Setup for Single Core.Fernando Sahmkow
2020-06-27ARM/Memory: Correct Exclusive Monitor and Implement Exclusive Memory Writes.Fernando Sahmkow
2020-06-27General: Recover Prometheus project from harddrive failure Fernando Sahmkow
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.
2020-04-17core: memory: Fix memory access on page boundaries.bunnei
- Fixes Super Smash Bros. Ultimate.
2020-04-17core: memory: Updates for new VMM.bunnei
2020-04-17core: memory: Move to Core::Memory namespace.bunnei
- helpful to disambiguate Kernel::Memory namespace.
2020-04-06Buffer Cache: Use vAddr instead of physical memory.Fernando Sahmkow
2020-04-06GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddrFernando Sahmkow
2020-01-18core/memory: Create a special MapMemoryRegion for physical memory.Markus Wick
This allows us to create a fastmem arena within the memory.cpp helpers.
2020-01-01core/memory + arm/dynarmic: Use a global offset within our arm page table.Markus Wick
This saves us two x64 instructions per load/store instruction. TODO: Clean up our memory code. We can use this optimization here as well.
2019-11-26core/memory; Migrate over SetCurrentPageTable() to the Memory classLioncash
Now that literally every other API function is converted over to the Memory class, we can just move the file-local page table into the Memory implementation class, finally getting rid of global state within the memory code.
2019-11-26core/memory: Migrate over GetPointerFromVMA() to the Memory classLioncash
Now that everything else is migrated over, this is essentially just code relocation and conversion of a global accessor to the class member variable. All that remains is to migrate over the page table.