summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2019-11-26 13:46:41 -0500
committerGravatar Lioncash2019-11-26 21:53:34 -0500
commite58748fd802dc069e90928d12d4db9ff994a869d (patch)
tree152c306a9a51f0ba49e2a34d1dc0db9eb2923013 /src/core/hle/kernel/svc.cpp
parentcore/memory: Migrate over memory mapping functions to the new Memory class (diff)
downloadyuzu-e58748fd802dc069e90928d12d4db9ff994a869d.tar.gz
yuzu-e58748fd802dc069e90928d12d4db9ff994a869d.tar.xz
yuzu-e58748fd802dc069e90928d12d4db9ff994a869d.zip
core/memory: Migrate over address checking functions to the new Memory class
A fairly straightforward migration. These member functions can just be mostly moved verbatim with minor changes. We already have the necessary plumbing in places that they're used. IsKernelVirtualAddress() can remain a non-member function, since it doesn't rely on class state in any form.
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r--src/core/hle/kernel/svc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 9928b3a26..eddafaf60 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -332,7 +332,7 @@ static ResultCode UnmapMemory(Core::System& system, VAddr dst_addr, VAddr src_ad
332/// Connect to an OS service given the port name, returns the handle to the port to out 332/// Connect to an OS service given the port name, returns the handle to the port to out
333static ResultCode ConnectToNamedPort(Core::System& system, Handle* out_handle, 333static ResultCode ConnectToNamedPort(Core::System& system, Handle* out_handle,
334 VAddr port_name_address) { 334 VAddr port_name_address) {
335 if (!Memory::IsValidVirtualAddress(port_name_address)) { 335 if (!system.Memory().IsValidVirtualAddress(port_name_address)) {
336 LOG_ERROR(Kernel_SVC, 336 LOG_ERROR(Kernel_SVC,
337 "Port Name Address is not a valid virtual address, port_name_address=0x{:016X}", 337 "Port Name Address is not a valid virtual address, port_name_address=0x{:016X}",
338 port_name_address); 338 port_name_address);
@@ -452,7 +452,7 @@ static ResultCode WaitSynchronization(Core::System& system, Handle* index, VAddr
452 LOG_TRACE(Kernel_SVC, "called handles_address=0x{:X}, handle_count={}, nano_seconds={}", 452 LOG_TRACE(Kernel_SVC, "called handles_address=0x{:X}, handle_count={}, nano_seconds={}",
453 handles_address, handle_count, nano_seconds); 453 handles_address, handle_count, nano_seconds);
454 454
455 if (!Memory::IsValidVirtualAddress(handles_address)) { 455 if (!system.Memory().IsValidVirtualAddress(handles_address)) {
456 LOG_ERROR(Kernel_SVC, 456 LOG_ERROR(Kernel_SVC,
457 "Handle address is not a valid virtual address, handle_address=0x{:016X}", 457 "Handle address is not a valid virtual address, handle_address=0x{:016X}",
458 handles_address); 458 handles_address);