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

Kernel:Add missing permissions in shared memory & svc

This commit is contained in:
purpasmart96 2014-11-07 18:53:18 -08:00 committed by purpasmart96
parent 1aa29b2b6c
commit 66431bceda
2 changed files with 13 additions and 5 deletions

View File

@ -12,11 +12,15 @@ namespace Kernel {
/// Permissions for mapped shared memory blocks
enum class MemoryPermission : u32 {
None = 0,
Read = (1u << 0),
Write = (1u << 1),
ReadWrite = (Read | Write),
DontCare = (1u << 28)
None = 0,
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

@ -62,6 +62,10 @@ Result MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other_permis
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));