diff options
author | bunnei <bunneidev@gmail.com> | 2014-07-05 16:22:03 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2014-07-05 16:24:54 +0200 |
commit | 7ff92c36ed70e75a54d8a15a7806ab9be34b3168 (patch) | |
tree | fe2d322dc00edc55786956e5c94588205ae332b6 /src/core/hle/svc.cpp | |
parent | Memory: Removed deprecated MapBlock_Shared function. (diff) | |
download | yuzu-7ff92c36ed70e75a54d8a15a7806ab9be34b3168.tar yuzu-7ff92c36ed70e75a54d8a15a7806ab9be34b3168.tar.gz yuzu-7ff92c36ed70e75a54d8a15a7806ab9be34b3168.tar.bz2 yuzu-7ff92c36ed70e75a54d8a15a7806ab9be34b3168.tar.lz yuzu-7ff92c36ed70e75a54d8a15a7806ab9be34b3168.tar.xz yuzu-7ff92c36ed70e75a54d8a15a7806ab9be34b3168.tar.zst yuzu-7ff92c36ed70e75a54d8a15a7806ab9be34b3168.zip |
Diffstat (limited to 'src/core/hle/svc.cpp')
-rw-r--r-- | src/core/hle/svc.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 746d24a70..9130d77ec 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp @@ -29,11 +29,6 @@ enum ControlMemoryOperation { MEMORY_OPERATION_GSP_HEAP = 0x00010003, }; -enum MapMemoryPermission { - MEMORY_PERMISSION_UNMAP = 0x00000000, - MEMORY_PERMISSION_NORMAL = 0x00000001, -}; - /// Map application or GSP heap memory Result ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 addr1, u32 size, u32 permissions) { DEBUG_LOG(SVC,"called operation=0x%08X, addr0=0x%08X, addr1=0x%08X, size=%08X, permissions=0x%08X", @@ -62,11 +57,15 @@ Result ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 addr1, u32 siz Result MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other_permissions) { DEBUG_LOG(SVC, "called memblock=0x08X, addr=0x%08X, mypermissions=0x%08X, otherpermission=%d", handle, addr, permissions, other_permissions); - switch (permissions) { - case MEMORY_PERMISSION_NORMAL: - case MEMORY_PERMISSION_NORMAL + 1: - case MEMORY_PERMISSION_NORMAL + 2: - Kernel::MapSharedMemory(handle, addr, permissions, other_permissions); + + Kernel::MemoryPermission permissions_type = static_cast<Kernel::MemoryPermission>(permissions); + switch (permissions_type) { + case Kernel::MemoryPermission::Read: + case Kernel::MemoryPermission::Write: + case Kernel::MemoryPermission::ReadWrite: + case Kernel::MemoryPermission::DontCare: + Kernel::MapSharedMemory(handle, addr, permissions_type, + static_cast<Kernel::MemoryPermission>(other_permissions)); break; default: ERROR_LOG(OSHLE, "unknown permissions=0x%08X", permissions); |