summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Hyper2017-01-07 02:21:22 +1300
committerGravatar Sebastian Valle2017-01-06 08:21:22 -0500
commitf0199a17f6cee85bd9e88501c0961f001c396687 (patch)
tree6e5d57f4e8de2b76289d4ed7b16685a001a16982 /src/core
parentMerge pull request #2408 from Subv/priority_boosting (diff)
downloadyuzu-f0199a17f6cee85bd9e88501c0961f001c396687.tar.gz
yuzu-f0199a17f6cee85bd9e88501c0961f001c396687.tar.xz
yuzu-f0199a17f6cee85bd9e88501c0961f001c396687.zip
Kernel: Fix SharedMemory objects always returning error when addr = 0 (#2404)
Closes #2400
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/svc.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index 855f3af82..843d697ec 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -897,7 +897,11 @@ static ResultCode CreateMemoryBlock(Kernel::Handle* out_handle, u32 addr, u32 si
897 return ResultCode(ErrorDescription::InvalidCombination, ErrorModule::OS, 897 return ResultCode(ErrorDescription::InvalidCombination, ErrorModule::OS,
898 ErrorSummary::InvalidArgument, ErrorLevel::Usage); 898 ErrorSummary::InvalidArgument, ErrorLevel::Usage);
899 899
900 if (addr < Memory::PROCESS_IMAGE_VADDR || addr + size > Memory::SHARED_MEMORY_VADDR_END) { 900 // TODO(Subv): Processes with memory type APPLICATION are not allowed
901 // to create memory blocks with addr = 0, any attempts to do so
902 // should return error 0xD92007EA.
903 if ((addr < Memory::PROCESS_IMAGE_VADDR || addr + size > Memory::SHARED_MEMORY_VADDR_END) &&
904 addr != 0) {
901 return ResultCode(ErrorDescription::InvalidAddress, ErrorModule::OS, 905 return ResultCode(ErrorDescription::InvalidAddress, ErrorModule::OS,
902 ErrorSummary::InvalidArgument, ErrorLevel::Usage); 906 ErrorSummary::InvalidArgument, ErrorLevel::Usage);
903 } 907 }