From c94d47cc408910af8342d47886937dd9feb32f4d Mon Sep 17 00:00:00 2001 From: Mary Date: Sun, 24 Oct 2021 01:24:49 +0200 Subject: kernel: Implement SetMemoryPermission syscall (#2772) * kernel: Implement SetMemoryPermission syscall This commit implement the SetMemoryPermission syscall accurately. This also fix KMemoryPermission not being an unsigned 32 bits type and add the "DontCare" bit (used by shared memory, currently unused in Ryujinx) * Update MemoryPermission mask * Address gdkchan's comments * Fix a nit * Address gdkchan's comment --- Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall64.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall64.cs') diff --git a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall64.cs b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall64.cs index c22397cf..00dbb1e4 100644 --- a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall64.cs +++ b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall64.cs @@ -109,6 +109,14 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall return _syscall.SetHeapSize(size, out position); } + public KernelResult SetMemoryPermission64( + [R(0)] ulong position, + [R(1)] ulong size, + [R(2)] KMemoryPermission permission) + { + return _syscall.SetMemoryPermission(position, size, permission); + } + public KernelResult SetMemoryAttribute64( [R(0)] ulong position, [R(1)] ulong size, -- cgit v1.2.3