summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/vm_manager.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-04-12 06:38:54 +0200
committerLioncash <mathew1800@gmail.com>2019-04-13 03:56:03 +0200
commit4d293bb5cbb65d3551dd0d22e92b7065a7ebba14 (patch)
treed57782959b51296eef132a721a1b6d0600e8e117 /src/core/hle/kernel/vm_manager.h
parentkernel/svc: Implement svcMapProcessCodeMemory (diff)
downloadyuzu-4d293bb5cbb65d3551dd0d22e92b7065a7ebba14.tar
yuzu-4d293bb5cbb65d3551dd0d22e92b7065a7ebba14.tar.gz
yuzu-4d293bb5cbb65d3551dd0d22e92b7065a7ebba14.tar.bz2
yuzu-4d293bb5cbb65d3551dd0d22e92b7065a7ebba14.tar.lz
yuzu-4d293bb5cbb65d3551dd0d22e92b7065a7ebba14.tar.xz
yuzu-4d293bb5cbb65d3551dd0d22e92b7065a7ebba14.tar.zst
yuzu-4d293bb5cbb65d3551dd0d22e92b7065a7ebba14.zip
Diffstat (limited to 'src/core/hle/kernel/vm_manager.h')
-rw-r--r--src/core/hle/kernel/vm_manager.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/core/hle/kernel/vm_manager.h b/src/core/hle/kernel/vm_manager.h
index 27120d3b1..288eb9450 100644
--- a/src/core/hle/kernel/vm_manager.h
+++ b/src/core/hle/kernel/vm_manager.h
@@ -441,6 +441,29 @@ public:
///
ResultCode MapCodeMemory(VAddr dst_address, VAddr src_address, u64 size);
+ /// Unmaps a region of memory designated as code module memory.
+ ///
+ /// @param dst_address The base address of the memory region aliasing the source memory region.
+ /// @param src_address The base address of the memory region being aliased.
+ /// @param size The size of the memory region to unmap in bytes.
+ ///
+ /// @pre Both memory ranges lie within the actual addressable address space.
+ ///
+ /// @pre The memory region being unmapped has been previously been mapped
+ /// by a call to MapCodeMemory.
+ ///
+ /// @post After execution of the function, if successful. the aliasing memory region
+ /// will be unmapped and the aliased region will have various traits about it
+ /// restored to what they were prior to the original mapping call preceding
+ /// this function call.
+ /// <p>
+ /// What this also entails is as follows:
+ /// 1. The state of the memory region will now indicate a general heap region.
+ /// 2. All memory attributes for the memory region are cleared.
+ /// 3. Memory permissions for the region are restored to user read/write.
+ ///
+ ResultCode UnmapCodeMemory(VAddr dst_address, VAddr src_address, u64 size);
+
/// Queries the memory manager for information about the given address.
///
/// @param address The address to query the memory manager about for information.