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
This commit is contained in:
parent
f11d663df7
commit
6f50b9bdb0
4 changed files with 172 additions and 35 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue