aboutsummaryrefslogtreecommitdiff
path: root/src/core/memory.h
AgeCommit message (Collapse)Author
2019-05-07core/memory: Remove unused FlushMode enumLioncash
Recent changes to memory-related code resulted in this being unused, so we can remove it.
2019-04-11core/cpu_core_manager: Create threads separately from initialization.Lioncash
Our initialization process is a little wonky than one would expect when it comes to code flow. We initialize the CPU last, as opposed to hardware, where the CPU obviously needs to be first, otherwise nothing else would work, and we have code that adds checks to get around this. For example, in the page table setting code, we check to see if the system is turned on before we even notify the CPU instances of a page table switch. This results in dead code (at the moment), because the only time a page table switch will occur is when the system is *not* running, preventing the emulated CPU instances from being notified of a page table switch in a convenient manner (technically the code path could be taken, but we don't emulate the process creation svc handlers yet). This moves the threads creation into its own member function of the core manager and restores a little order (and predictability) to our initialization process. Previously, in the multi-threaded cases, we'd kick off several threads before even the main kernel process was created and ready to execute (gross!). Now the initialization process is like so: Initialization: 1. Timers 2. CPU 3. Kernel 4. Filesystem stuff (kind of gross, but can be amended trivially) 5. Applet stuff (ditto in terms of being kind of gross) 6. Main process (will be moved into the loading step in a following change) 7. Telemetry (this should be initialized last in the future). 8. Services (4 and 5 should ideally be alongside this). 9. GDB (gross. Uses namespace scope state. Needs to be refactored into a class or booted altogether). 10. Renderer 11. GPU (will also have its threads created in a separate step in a following change). Which... isn't *ideal* per-se, however getting rid of the wonky intertwining of CPU state initialization out of this mix gets rid of most of the footguns when it comes to our initialization process.
2019-04-07Merge pull request #2361 from lioncash/pagetablebunnei
core/memory: Minor simplifications to page table management
2019-04-07core/memory: Remove unused enum constantsLioncash
These are holdovers from Citra and can be removed.
2019-04-07core/memory: Remove GetCurrentPageTable()Lioncash
Now that nothing actually touches the internal page table aside from the memory subsystem itself, we can remove the accessor to it.
2019-03-21core/memory: Remove unnecessary includesLioncash
In 93da8e0abfcdcc6e3cb5488a0db12373429f1377, the page table construct was moved to the common library (which utilized these inclusions). Since the move, nothing requires these headers to be included within the memory header.
2019-03-16core: Move PageTable struct into Common.bunnei
2019-03-16memory: Simplify rasterizer cache operations.bunnei
2018-09-24memory: Dehardcode the use of fixed memory range constantsLioncash
The locations of these can actually vary depending on the address space layout, so we shouldn't be using these when determining where to map memory or be using them as offsets for calculations. This keeps all the memory ranges flexible and malleable based off of the virtual memory manager instance state.
2018-09-24memory: Dehardcode the use of a 36-bit address spaceLioncash
Given games can also request a 32-bit or 39-bit address space, we shouldn't be hardcoding the address space range as 36-bit.
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi
2018-08-31gl_renderer: Cache textures, framebuffers, and shaders based on CPU address.bunnei
2018-08-05memory: Make prototype parameter names match their definitionsLioncash
Keeps the code consistent.
2018-08-05memory: Correct prototype of ZeroBlockLioncash
Previously, the prototype wasn't matching the definition, which has a Processor parameter before the destination address.
2018-08-05memory: Remove unnecessary const qualifiers in prototypesLioncash
These aren't necessary, as value-wise const only matters in the definition.
2018-08-03core/memory: Get rid of 3DS leftoversLioncash
Removes leftover code from citra that isn't needed.
2018-06-22Kernel/Arbiters: Fix casts, cleanup comments/magic numbersMichael Scire
2018-04-24gl_rasterizer_cache: Update to be based on GPU addresses, not CPU addresses.bunnei
2018-03-31memory: Fix stack region.bunnei
2018-03-26memory: Add RasterizerMarkRegionCached code and cleanup.bunnei
2018-03-23Merge pull request #265 from bunnei/tegra-progress-2bunnei
Tegra progress 2
2018-03-23rasterizer: Flush and invalidate regions should be 64-bit.bunnei
2018-03-22memory: Port RasterizerFlushVirtualRegion from Citra.bunnei
2018-03-22Remove more N3DS ReferencesN00byKing
2018-03-16memory: Add regions for map region, "new" map region, etc.bunnei
2018-02-12arm_dynarmic: Support direct page table accessMerryMage
2018-01-27memory: Replace all memory hooking with Special regionsMerryMage
2018-01-16Update memory.hDavid
2018-01-16Increased heap size and changed tls area vaddrDavid Marcec
2018-01-01core/video_core: Fix a bunch of u64 -> u32 warnings.bunnei
2017-12-28svc: Implement MapMemory.bunnei
2017-10-22memory: Support 32-bit paging, move heap address space up.bunnei
2017-10-09Merge remote-tracking branch 'upstream/master' into nxbunnei
# Conflicts: # src/core/CMakeLists.txt # src/core/arm/dynarmic/arm_dynarmic.cpp # src/core/arm/dyncom/arm_dyncom.cpp # src/core/hle/kernel/process.cpp # src/core/hle/kernel/thread.cpp # src/core/hle/kernel/thread.h # src/core/hle/kernel/vm_manager.cpp # src/core/loader/3dsx.cpp # src/core/loader/elf.cpp # src/core/loader/ncch.cpp # src/core/memory.cpp # src/core/memory.h # src/core/memory_setup.h
2017-10-09loader: Various improvements for NSO/NRO loaders.bunnei
2017-10-01Memory: Make WriteBlock take a Process parameter on which to operateSubv
2017-10-01Memory: Make ReadBlock take a Process parameter on which to operateSubv
2017-09-30core: Various changes to support 64-bit addressing.bunnei
2017-09-26Memory: Allow IsValidVirtualAddress to be called with a specific process ↵Subv
parameter. There is still an overload of IsValidVirtualAddress that only takes the VAddr and will default to the current process.
2017-09-24memory: Remove GetCurrentPageTablePointersMerryMage
2017-09-24memory: Add GetCurrentPageTable/SetCurrentPageTableMerryMage
Don't expose Memory::current_page_table as a global.
2017-09-15Kernel/Memory: Changed GetPhysicalPointer so that it doesn't go through the ↵Subv
current process' page table to obtain a pointer.
2017-09-10Kernel/Memory: Give each Process its own page table.Subv
The loader is in charge of setting the newly created process's page table as the main one during the loading process.
2017-06-21Memory: Add function to flush a virtual range from the rasterizer cacheYuri Kunde Schlesner
This is slightly more ergonomic to use, correctly handles virtual regions which are disjoint in physical addressing space, and checks only regions which can be cached by the rasterizer.
2017-06-21Memory: Add TryVirtualToPhysicalAddress, returning a boost::optionalYuri Kunde Schlesner
2017-06-21Memory: Make PhysicalToVirtualAddress return a boost::optionalYuri Kunde Schlesner
And fix a few places in the code to take advantage of that.
2017-06-20Memory: Add enum definitions for the n3DS FCRAM sizeYuri Kunde Schlesner
2017-05-09Memory: Add constants for the n3DS additional RAMYuri Kunde Schlesner
This is 4MB of extra, separate memory that was added on the New 3DS.
2016-11-24Expose page table to dynarmic for optimized reads and writes to the JITJames Rowe
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot