yuzu/src/core/file_sys
Michael Scire 13a8fde3ad Implement MapPhysicalMemory/UnmapPhysicalMemory
This implements svcMapPhysicalMemory/svcUnmapPhysicalMemory for Yuzu,
which can be used to map memory at a desired address by games since
3.0.0.

It also properly parses SystemResourceSize from NPDM, and makes
information available via svcGetInfo.

This is needed for games like Super Smash Bros. and Diablo 3 -- this
PR's implementation does not run into the "ASCII reads" issue mentioned
in the comments of #2626, which was caused by the following bugs in
Yuzu's memory management that this PR also addresses:
* Yuzu's memory coalescing does not properly merge blocks. This results
  in a polluted address space/svcQueryMemory results that would be
  impossible to replicate on hardware, which can lead to game code making
  the wrong assumptions about memory layout.
  * This implements better merging for AllocatedMemoryBlocks.
* Yuzu's implementation of svcMirrorMemory unprotected the entire
  virtual memory range containing the range being mirrored. This could
  lead to games attempting to map data at that unprotected
  range/attempting to access that range after yuzu improperly unmapped
  it.
  * This PR fixes it by simply calling ReprotectRange instead of
    Reprotect.
2019-07-07 11:45:53 -07:00
..
system_archive set_sys: Use official nintendo version string 2019-03-10 19:54:13 -04:00
bis_factory.cpp bis_factory: Add getter for mod dump root for a title ID 2018-10-29 16:08:03 -04:00
bis_factory.h bis_factory: Add getter for mod dump root for a title ID 2018-10-29 16:08:03 -04:00
card_image.cpp file_sys/card_image: Remove obsolete TODO 2019-06-12 16:52:19 -04:00
card_image.h file_sys/card_image: Provide named members for the GamecardInfo struct 2018-11-20 18:40:53 -05:00
cheat_engine.cpp core/cheat_engine: Make MemoryReadImpl and MemoryWriteImpl internally linked 2019-03-24 18:34:42 -04:00
cheat_engine.h file_sys/cheat_engine: Silence truncation and sign-conversion warnings 2019-03-22 14:43:41 -04:00
content_archive.cpp Update content_archive.cpp 2019-06-19 22:01:41 -04:00
content_archive.h file_sys/content_archive: Amend name of Data_Unknown5 enum entry 2019-03-19 15:58:38 -04:00
control_metadata.cpp Addressed issues 2019-06-17 08:17:26 +10:00
control_metadata.h Impl'd IsUserAccountSwitchLocked, SetAudioOutVolume, GetAudioOutVolume & Partial impl of GetAccumulatedSuspendedTickChangedEvent 2019-06-16 19:06:33 +10:00
directory.h file_sys/directory: Remove unused DirectoryBackend class 2019-01-18 14:33:50 -05:00
errors.h set_sys: Use official nintendo version string 2019-03-10 19:54:13 -04:00
fsmitm_romfsbuild.cpp file_sys/fsmitm_romfsbuild: Utilize a string_view in romfs_calc_path_hash() 2019-04-05 15:12:20 -04:00
fsmitm_romfsbuild.h general: Remove unused boost inclusions where applicable 2018-10-30 00:09:46 -04:00
ips_layer.cpp Merge pull request #2581 from lioncash/hex 2019-06-15 16:47:13 -04:00
ips_layer.h ips_layer: Add missing includes 2018-10-09 14:10:13 -04:00
kernel_executable.cpp kernel_executable: Optimize BLZ decompression 2019-06-06 19:20:15 -04:00
kernel_executable.h file_sys: Add classes to parse KIP1 and INI1 files 2019-06-05 00:18:25 -04:00
mode.h
nca_metadata.cpp file_sys/nca_metadata: Remove unnecessary comparison operators for TitleType 2019-04-05 15:20:07 -04:00
nca_metadata.h file_sys: Rename other ContentRecordType members 2019-07-02 00:57:23 +01:00
nca_patch.cpp Port #4182 from Citra: "Prefix all size_t with std::" 2018-09-15 15:21:06 +02:00
nca_patch.h Port #4182 from Citra: "Prefix all size_t with std::" 2018-09-15 15:21:06 +02:00
partition_filesystem.cpp vfs: Remove InterpretAsDirectory and related functions 2018-10-19 14:02:07 -04:00
partition_filesystem.h vfs: Remove InterpretAsDirectory and related functions 2018-10-19 14:02:07 -04:00
patch_manager.cpp patch_manager: Add getter for title version 2019-06-24 19:05:50 -04:00
patch_manager.h glue: Correct missing bytes in ApplicationLaunchParameter 2019-06-25 22:25:10 -04:00
program_metadata.cpp Implement MapPhysicalMemory/UnmapPhysicalMemory 2019-07-07 11:45:53 -07:00
program_metadata.h Implement MapPhysicalMemory/UnmapPhysicalMemory 2019-07-07 11:45:53 -07:00
registered_cache.cpp file_sys: Rename other ContentRecordType members 2019-07-02 00:57:23 +01:00
registered_cache.h registered_cache: Add getter to determine source slot in content provider union 2019-06-24 19:10:17 -04:00
romfs_factory.cpp core: Port current uses of RegisteredCache to ContentProvider 2019-03-26 22:05:37 -04:00
romfs_factory.h romfs_factory: Extract packed update setter to new function 2018-10-05 08:53:51 -04:00
romfs.cpp romfs: Add SingleDiscard extraction type 2018-12-28 15:30:36 -05:00
romfs.h romfs: Add SingleDiscard extraction type 2018-12-28 15:30:36 -05:00
savedata_factory.cpp service/fsp_srv: Don't pass SaveDataDescriptor instances by value. 2019-04-05 11:04:01 -04:00
savedata_factory.h service/fsp_srv: Don't pass SaveDataDescriptor instances by value. 2019-04-05 11:04:01 -04:00
sdmc_factory.cpp file_sys/registered_cache: Use unique_ptr and regular pointers instead of shared_ptrs where applicable 2018-10-16 09:38:52 -04:00
sdmc_factory.h file_sys/registered_cache: Use unique_ptr and regular pointers instead of shared_ptrs where applicable 2018-10-16 09:38:52 -04:00
submission_package.cpp file_sys/submission_package: Don't warn about missing DeltaFragment NCAs 2019-07-01 06:46:05 +01:00
submission_package.h core: Port current uses of RegisteredCache to ContentProvider 2019-03-26 22:05:37 -04:00
vfs_concat.cpp vfs_concat/vfs_layered: Remove friend declarations from ConcatenatedVfsFile 2018-09-25 20:06:01 -04:00
vfs_concat.h vfs_concat/vfs_layered: Remove friend declarations from ConcatenatedVfsFile 2018-09-25 20:06:01 -04:00
vfs_layered.cpp vfs: Remove InterpretAsDirectory and related functions 2018-10-19 14:02:07 -04:00
vfs_layered.h vfs: Remove InterpretAsDirectory and related functions 2018-10-19 14:02:07 -04:00
vfs_offset.cpp global: Use std::optional instead of boost::optional (#1578) 2018-10-30 00:03:25 -04:00
vfs_offset.h global: Use std::optional instead of boost::optional (#1578) 2018-10-30 00:03:25 -04:00
vfs_real.cpp vfs: Remove InterpretAsDirectory and related functions 2018-10-19 14:02:07 -04:00
vfs_real.h vfs: Remove InterpretAsDirectory and related functions 2018-10-19 14:02:07 -04:00
vfs_static.h global: Use std::optional instead of boost::optional (#1578) 2018-10-30 00:03:25 -04:00
vfs_types.h vfs: Move forward declarations to separate file 2018-10-07 13:15:11 -04:00
vfs_vector.cpp file_sys/vfs_vector: Fix ignored offset on Write 2019-02-25 00:27:49 +01:00
vfs_vector.h file_sys: Implement system archive synthesizer for NgWord (806) 2018-11-22 21:39:10 -05:00
vfs.cpp file_sys: Override missing mutating functions to be stubbed out for ReadOnlyVfsDirectory by default 2018-11-30 23:52:56 -05:00
vfs.h vfs: Add reinterpret_casts to WriteArray and Object 2018-12-27 00:16:55 -05:00
xts_archive.cpp common/hex_util: Combine HexVectorToString() and HexArrayToString() 2019-06-12 17:54:05 -04:00
xts_archive.h vfs: Remove InterpretAsDirectory and related functions 2018-10-19 14:02:07 -04:00