aboutsummaryrefslogtreecommitdiff
path: root/src/core/memory.cpp
AgeCommit message (Collapse)Author
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.
2019-11-26core/memory: Migrate over Write{8, 16, 32, 64, Block} to the Memory classLioncash
The Write functions are used slightly less than the Read functions, which make these a bit nicer to move over. The only adjustments we really need to make here are to Dynarmic's exclusive monitor instance. We need to keep a reference to the currently active memory instance to perform exclusive read/write operations.
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/memory: Migrate over ZeroBlock() and CopyBlock() to the Memory classLioncash
These currently aren't used anywhere in the codebase, so these are very trivial to move over to the Memory class.
2019-11-26core/memory: Migrate over RasterizerMarkRegionCached() to the Memory classLioncash
This is only used within the accelerated rasterizer in two places, so this is also a very trivial migration.
2019-11-26core/memory: Migrate over ReadCString() to the Memory classLioncash
This only had one usage spot, so this is fairly straightforward to convert over.
2019-11-26core/memory: Migrate over GetPointer()Lioncash
With all of the interfaces ready for migration, it's trivial to migrate over GetPointer().
2019-11-26core/memory: Move memory read/write implementation functions into an ↵Lioncash
anonymous namespace These will eventually be migrated into the main Memory class, but for now, we put them in an anonymous namespace, so that the other functions that use them, can be migrated over separately.
2019-11-26core/memory: Migrate over address checking functions to the new Memory classLioncash
A fairly straightforward migration. These member functions can just be mostly moved verbatim with minor changes. We already have the necessary plumbing in places that they're used. IsKernelVirtualAddress() can remain a non-member function, since it doesn't rely on class state in any form.
2019-11-26core/memory: Migrate over memory mapping functions to the new Memory classLioncash
Migrates all of the direct mapping facilities over to the new memory class. In the process, this also obsoletes the need for memory_setup.h, so we can remove it entirely from the project.
2019-11-26core/memory: Introduce skeleton of Memory classLioncash
Currently, the main memory management code is one of the remaining places where we have global state. The next series of changes will aim to rectify this. This change simply introduces the main skeleton of the class that will contain all the necessary state.
2019-10-06core: Remove Core::CurrentProcess()Lioncash
This only encourages the use of the global system instance (which will be phased out long-term). Instead, we use the direct system function call directly to remove the appealing but discouraged short-hand.