yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

Merge pull request #185 from purpasmart96/mem_perm

Kernel: Add missing permissions
This commit is contained in:
bunnei 2014-12-17 20:56:04 -05:00
commit 7bae450379
2 changed files with 13 additions and 5 deletions

View File

@ -16,6 +16,10 @@ enum class MemoryPermission : u32 {
Read = (1u << 0),
Write = (1u << 1),
ReadWrite = (Read | Write),
Execute = (1u << 2),
ReadExecute = (Read | Execute),
WriteExecute = (Write | Execute),
ReadWriteExecute = (Read | Write | Execute),
DontCare = (1u << 28)
};

View File

@ -64,6 +64,10 @@ static Result MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other
case Kernel::MemoryPermission::Read:
case Kernel::MemoryPermission::Write:
case Kernel::MemoryPermission::ReadWrite:
case Kernel::MemoryPermission::Execute:
case Kernel::MemoryPermission::ReadExecute:
case Kernel::MemoryPermission::WriteExecute:
case Kernel::MemoryPermission::ReadWriteExecute:
case Kernel::MemoryPermission::DontCare:
Kernel::MapSharedMemory(handle, addr, permissions_type,
static_cast<Kernel::MemoryPermission>(other_permissions));