mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-23 07:20:10 +00:00
Merge pull request #185 from purpasmart96/mem_perm
Kernel: Add missing permissions
This commit is contained in:
commit
7bae450379
@ -12,11 +12,15 @@ namespace Kernel {
|
|||||||
|
|
||||||
/// Permissions for mapped shared memory blocks
|
/// Permissions for mapped shared memory blocks
|
||||||
enum class MemoryPermission : u32 {
|
enum class MemoryPermission : u32 {
|
||||||
None = 0,
|
None = 0,
|
||||||
Read = (1u << 0),
|
Read = (1u << 0),
|
||||||
Write = (1u << 1),
|
Write = (1u << 1),
|
||||||
ReadWrite = (Read | Write),
|
ReadWrite = (Read | Write),
|
||||||
DontCare = (1u << 28)
|
Execute = (1u << 2),
|
||||||
|
ReadExecute = (Read | Execute),
|
||||||
|
WriteExecute = (Write | Execute),
|
||||||
|
ReadWriteExecute = (Read | Write | Execute),
|
||||||
|
DontCare = (1u << 28)
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -64,6 +64,10 @@ static Result MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other
|
|||||||
case Kernel::MemoryPermission::Read:
|
case Kernel::MemoryPermission::Read:
|
||||||
case Kernel::MemoryPermission::Write:
|
case Kernel::MemoryPermission::Write:
|
||||||
case Kernel::MemoryPermission::ReadWrite:
|
case Kernel::MemoryPermission::ReadWrite:
|
||||||
|
case Kernel::MemoryPermission::Execute:
|
||||||
|
case Kernel::MemoryPermission::ReadExecute:
|
||||||
|
case Kernel::MemoryPermission::WriteExecute:
|
||||||
|
case Kernel::MemoryPermission::ReadWriteExecute:
|
||||||
case Kernel::MemoryPermission::DontCare:
|
case Kernel::MemoryPermission::DontCare:
|
||||||
Kernel::MapSharedMemory(handle, addr, permissions_type,
|
Kernel::MapSharedMemory(handle, addr, permissions_type,
|
||||||
static_cast<Kernel::MemoryPermission>(other_permissions));
|
static_cast<Kernel::MemoryPermission>(other_permissions));
|
||||||
|
Loading…
Reference in New Issue
Block a user