diff options
| -rw-r--r-- | src/core/hle/kernel/shared_memory.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp index 835fc710b..d4505061e 100644 --- a/src/core/hle/kernel/shared_memory.cpp +++ b/src/core/hle/kernel/shared_memory.cpp | |||
| @@ -111,13 +111,6 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi | |||
| 111 | return ERR_INVALID_COMBINATION; | 111 | return ERR_INVALID_COMBINATION; |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | // Heap-backed memory blocks can not be mapped with other_permissions = DontCare | ||
| 115 | if (base_address != 0 && other_permissions == MemoryPermission::DontCare) { | ||
| 116 | LOG_ERROR(Kernel, "cannot map id=%u, address=0x%llx name=%s, permissions don't match", | ||
| 117 | GetObjectId(), address, name.c_str()); | ||
| 118 | return ERR_INVALID_COMBINATION; | ||
| 119 | } | ||
| 120 | |||
| 121 | // Error out if the provided permissions are not compatible with what the creator process needs. | 114 | // Error out if the provided permissions are not compatible with what the creator process needs. |
| 122 | if (other_permissions != MemoryPermission::DontCare && | 115 | if (other_permissions != MemoryPermission::DontCare && |
| 123 | static_cast<u32>(this->permissions) & ~static_cast<u32>(other_permissions)) { | 116 | static_cast<u32>(this->permissions) & ~static_cast<u32>(other_permissions)) { |
| @@ -126,12 +119,6 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi | |||
| 126 | return ERR_WRONG_PERMISSION; | 119 | return ERR_WRONG_PERMISSION; |
| 127 | } | 120 | } |
| 128 | 121 | ||
| 129 | // TODO(Subv): Check for the Shared Device Mem flag in the creator process. | ||
| 130 | /*if (was_created_with_shared_device_mem && address != 0) { | ||
| 131 | return ResultCode(ErrorDescription::InvalidCombination, ErrorModule::OS, | ||
| 132 | ErrorSummary::InvalidArgument, ErrorLevel::Usage); | ||
| 133 | }*/ | ||
| 134 | |||
| 135 | // TODO(Subv): The same process that created a SharedMemory object | 122 | // TODO(Subv): The same process that created a SharedMemory object |
| 136 | // can not map it in its own address space unless it was created with addr=0, result 0xD900182C. | 123 | // can not map it in its own address space unless it was created with addr=0, result 0xD900182C. |
| 137 | 124 | ||