aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2024-01-03 20:05:14 -0300
committerGitHub <noreply@github.com>2024-01-04 00:05:14 +0100
commit6f50b9bdb0943c350835453e97b02be52ad39bfd (patch)
tree37d4de58dbc86e4eaa5488d53029d908b1b41731 /src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs
parentf11d663df73f68350820dfa65aa51a8a9b9ffd0f (diff)
Add support for PermissionLocked attribute added on firmware 17.0.0 (#6072)
* Update MemoryState enum and add new flags * Add support for new PermissionLocked attribute added on firmware 17.0.0 * Format whitespace
Diffstat (limited to 'src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs')
-rw-r--r--src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs b/src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs
index e4f48da1..b07f5194 100644
--- a/src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs
+++ b/src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs
@@ -949,8 +949,16 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
MemoryAttribute attributes = attributeMask | attributeValue;
+ const MemoryAttribute SupportedAttributes = MemoryAttribute.Uncached | MemoryAttribute.PermissionLocked;
+
if (attributes != attributeMask ||
- (attributes | MemoryAttribute.Uncached) != MemoryAttribute.Uncached)
+ (attributes | SupportedAttributes) != SupportedAttributes)
+ {
+ return KernelResult.InvalidCombination;
+ }
+
+ // The permission locked attribute can't be unset.
+ if ((attributeMask & MemoryAttribute.PermissionLocked) != (attributeValue & MemoryAttribute.PermissionLocked))
{
return KernelResult.InvalidCombination;
}