Commit Graph

59 Commits

Author SHA1 Message Date
de7aa3106a memory: Return false for large VAddr in IsValidVirtualAddress 2018-01-20 14:56:15 -06:00
389979018c Remove gpu debugger and get yuzu qt to compile 2018-01-12 19:11:04 -07:00
f10a304ecd fix macos build 2018-01-08 19:20:10 -05:00
93480b10ef core/video_core: Fix a bunch of u64 -> u32 warnings. 2018-01-01 15:40:35 -05:00
97d52b9f89 memory: Print addresses as 64-bit. 2017-10-18 21:29:23 -04:00
b1d5db1cf6 Merge remote-tracking branch 'upstream/master' into nx
# 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-09 23:56:20 -04:00
1f2de7501b Memory: Make WriteBlock take a Process parameter on which to operate 2017-10-01 14:18:36 -05:00
811c01e5fe Memory: Make ReadBlock take a Process parameter on which to operate 2017-10-01 14:18:36 -05:00
46297c9653 memory: Log with 64-bit values. 2017-09-30 14:28:54 -04:00
f01472a5ff core: Various changes to support 64-bit addressing. 2017-09-30 14:28:54 -04:00
a13ab958cb Fixed type conversion ambiguity 2017-09-30 09:34:35 +01:00
b07af7dda8 Merge pull request #2961 from Subv/load_titles
Loaders: Don't automatically set the current process every time we load an application.
2017-09-29 14:58:42 -04:00
5620327e03 Merge pull request #2954 from Subv/cache_unmapped_mem
Memory/RasterizerCache: Ignore unmapped memory regions when caching physical regions
2017-09-26 16:55:47 -06:00
35da7f57ef Memory: Allow IsValidVirtualAddress to be called with a specific process parameter.
There is still an overload of IsValidVirtualAddress that only takes the VAddr and will default to the current process.
2017-09-26 17:27:44 -05:00
41f6c9f87f Memory/RasterizerCache: Ignore unmapped memory regions when caching physical regions.
Not all physical regions need to be mapped into the address space of every process, for example, system modules do not have a VRAM mapping.

This fixes a crash when loading applets and system modules.
2017-09-25 19:37:45 -05:00
67a70bd9e1 ARM_Interface: Implement PageTableChanged 2017-09-24 23:08:25 +01:00
4e5eb2044a memory: Remove GetCurrentPageTablePointers 2017-09-24 22:43:28 +01:00
c02bbb7030 memory: Add GetCurrentPageTable/SetCurrentPageTable
Don't expose Memory::current_page_table as a global.
2017-09-24 22:42:42 +01:00
813837c5cf Merge pull request #2842 from Subv/switchable_page_table
Kernel/Memory: Give each process its own page table and allow switching the current page table upon reschedule
2017-09-15 22:41:45 +02:00
f18a176b60 Kernel/Memory: Make IsValidPhysicalAddress not go through the current process' virtual memory mapping. 2017-09-15 14:26:18 -05:00
214150f00c Kernel/Memory: Changed GetPhysicalPointer so that it doesn't go through the current process' page table to obtain a pointer. 2017-09-15 14:26:13 -05:00
6d2734a074 Kernel/Memory: Give each Process its own page table.
The loader is in charge of setting the newly created process's page table as the main one during the loading process.
2017-09-10 15:13:41 -05:00
8266064796 Use recursive_mutex instead of mutex to fix #2902 2017-08-29 20:39:55 +12:00
61442d6afb Merge pull request #2839 from Subv/global_kernel_lock
Kernel/HLE: Use a mutex  to synchronize access to the HLE kernel state between the cpu thread and any other possible threads that might touch the kernel (network thread, etc).
2017-08-23 18:17:44 -06:00
f484927ed0 Kernel/Memory: Acquire the global HLE lock when a memory read/write operation falls outside of the fast path, for it might perform an MMIO operation. 2017-08-22 09:30:58 -05:00
045d0b5bbd Merge pull request #2799 from yuriks/virtual-cached-range-flush
Add address conversion functions returning optional, Add function to flush virtual region from rasterizer cache
2017-07-22 10:15:52 +03:00
d553135748 Memory: Add function to flush a virtual range from the rasterizer cache
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-21 22:57:12 -07:00
f2a5a77e27 Memory: Fix crash when unmapping a VMA covering cached surfaces
Unmapping pages tries to flush any cached GPU surfaces touching that
region. When a cached page is invalidated, GetPointerFromVMA() is used
to restore the original pagetable pointer. However, since that VMA has
already been deleted, this hits an UNREACHABLE case in that function.

Now when this happens, just set the page type to Unmapped and continue,
which arrives at the correct end result.
2017-06-21 22:56:31 -07:00
6ae0086b39 Memory: Add TryVirtualToPhysicalAddress, returning a boost::optional 2017-06-21 22:55:18 -07:00
326e7c7020 Memory: Make PhysicalToVirtualAddress return a boost::optional
And fix a few places in the code to take advantage of that.
2017-06-21 22:55:17 -07:00
d3db770cad Memory: Add constants for the n3DS additional RAM
This is 4MB of extra, separate memory that was added on the New 3DS.
2017-05-09 21:43:59 -07:00
4798b1d04d Revert "Memory: Always flush whole pages from surface cache" 2016-12-17 19:13:33 -05:00
f2b9be9bd3 Memory: Always flush whole pages from surface cache
This prevents individual writes touching a cached page, but which don't
overlap the surface, from constantly hitting the surface cache lookup.
2016-12-14 23:46:59 -08:00
bbe57a66ca Expose page table to dynarmic for optimized reads and writes to the JIT 2016-11-24 20:41:18 -07:00
3f87d70f0e memory: fix IsValidVirtualAddress for RasterizerCachedMemory
RasterizerCachedMemory doesn't has pointer but should be considered as valid
2016-09-29 10:01:34 +08:00
84fbbe2629 Use negative priorities to avoid special-casing the self-include 2016-09-21 00:15:56 -07:00
ebdae19fd2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
2016-09-21 11:15:47 +09:00
dc8479928c Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
b2df959733 Memory: add ReadCString function 2016-08-27 21:38:06 +08:00
0aef634a54 Memory: Handle RasterizerCachedMemory and RasterizerCachedSpecial page types in the memory block manipulation functions. 2016-05-28 13:52:50 -05:00
660499ac01 Memory: Make ReadBlock and WriteBlock accept void pointers. 2016-05-28 13:52:49 -05:00
31d49e0109 Memory: CopyBlock 2016-05-28 13:44:49 -05:00
ca17df5757 Memory: ZeroBlock 2016-05-21 11:14:09 -05:00
3873b36db3 Memory: ReadBlock/WriteBlock 2016-05-21 11:12:36 -05:00
c084fc824c Memory: IsValidVirtualAddress/IsValidPhysicalAddress 2016-05-21 11:12:35 -05:00
22f3a7e94c HWRasterizer: Texture forwarding 2016-04-21 17:27:56 -04:00
6aa90e13f9 Memory: Do correct Phys->Virt address translation for non-APP linheap 2016-03-05 22:09:59 -08:00
2b93313348 Memory: Implement MMIO 2016-01-30 18:41:04 +00:00
be217bca70 Fixed spelling errors 2015-10-09 17:09:52 -04:00
9cf1cfe3fd memory: Get rid of pointer casts 2015-09-10 00:09:55 -04:00