summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-12-18 02:56:04 +0100
committerbunnei <bunneidev@gmail.com>2014-12-18 02:56:04 +0100
commit7bae450379b2a41eb5d264c9e1638073586fb0fb (patch)
tree9a27a87f20c65839690424d903e5c665e8e6b034 /src/core/hle
parentMerge pull request #288 from Subv/savedata_stuff (diff)
parentKernel:Add missing permissions in shared memory & svc (diff)
downloadyuzu-7bae450379b2a41eb5d264c9e1638073586fb0fb.tar
yuzu-7bae450379b2a41eb5d264c9e1638073586fb0fb.tar.gz
yuzu-7bae450379b2a41eb5d264c9e1638073586fb0fb.tar.bz2
yuzu-7bae450379b2a41eb5d264c9e1638073586fb0fb.tar.lz
yuzu-7bae450379b2a41eb5d264c9e1638073586fb0fb.tar.xz
yuzu-7bae450379b2a41eb5d264c9e1638073586fb0fb.tar.zst
yuzu-7bae450379b2a41eb5d264c9e1638073586fb0fb.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/shared_memory.h14
-rw-r--r--src/core/hle/svc.cpp4
2 files changed, 13 insertions, 5 deletions
diff --git a/src/core/hle/kernel/shared_memory.h b/src/core/hle/kernel/shared_memory.h
index 304cf5b67..bb778ec26 100644
--- a/src/core/hle/kernel/shared_memory.h
+++ b/src/core/hle/kernel/shared_memory.h
@@ -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)
};
/**
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index 15cc240f4..47e9bf77e 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -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));