diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-11-11 15:45:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-11 15:45:29 +0100 |
commit | 40d4e9543b5792dfa761b44d4c6017d5692f77a3 (patch) | |
tree | 019cb6ca42ee3b89b400bb624e933abf695e150c /src/core/hle/kernel/svc/svc_memory.cpp | |
parent | Merge pull request #11981 from lucasreis1/patch (diff) | |
parent | k_page_table: fix shutdown (diff) | |
download | yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar.gz yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar.bz2 yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar.lz yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar.xz yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar.zst yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.zip |
Diffstat (limited to 'src/core/hle/kernel/svc/svc_memory.cpp')
-rw-r--r-- | src/core/hle/kernel/svc/svc_memory.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/kernel/svc/svc_memory.cpp b/src/core/hle/kernel/svc/svc_memory.cpp index 97f1210de..4ca62860d 100644 --- a/src/core/hle/kernel/svc/svc_memory.cpp +++ b/src/core/hle/kernel/svc/svc_memory.cpp @@ -29,7 +29,8 @@ constexpr bool IsValidAddressRange(u64 address, u64 size) { // Helper function that performs the common sanity checks for svcMapMemory // and svcUnmapMemory. This is doable, as both functions perform their sanitizing // in the same order. -Result MapUnmapMemorySanityChecks(const KPageTable& manager, u64 dst_addr, u64 src_addr, u64 size) { +Result MapUnmapMemorySanityChecks(const KProcessPageTable& manager, u64 dst_addr, u64 src_addr, + u64 size) { if (!Common::Is4KBAligned(dst_addr)) { LOG_ERROR(Kernel_SVC, "Destination address is not aligned to 4KB, 0x{:016X}", dst_addr); R_THROW(ResultInvalidAddress); @@ -123,7 +124,8 @@ Result SetMemoryAttribute(Core::System& system, u64 address, u64 size, u32 mask, R_UNLESS(page_table.Contains(address, size), ResultInvalidCurrentMemory); // Set the memory attribute. - R_RETURN(page_table.SetMemoryAttribute(address, size, mask, attr)); + R_RETURN(page_table.SetMemoryAttribute(address, size, static_cast<KMemoryAttribute>(mask), + static_cast<KMemoryAttribute>(attr))); } /// Maps a memory range into a different range. |