summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/svc
diff options
context:
space:
mode:
authorGravatar liamwhite2023-03-23 10:00:19 -0400
committerGravatar GitHub2023-03-23 10:00:19 -0400
commitc41a4baf06efe935f08331bc6f8ff6d80dc088f5 (patch)
treea6580d41bd440b240b2f60db38fdeec60fca2eff /src/core/hle/kernel/svc
parentMerge pull request #9962 from Kelebek1/disable_srgb (diff)
parentkernel: use KTypedAddress for addresses (diff)
downloadyuzu-c41a4baf06efe935f08331bc6f8ff6d80dc088f5.tar.gz
yuzu-c41a4baf06efe935f08331bc6f8ff6d80dc088f5.tar.xz
yuzu-c41a4baf06efe935f08331bc6f8ff6d80dc088f5.zip
Merge pull request #9964 from liamwhite/typed-address
kernel: use KTypedAddress for addresses
Diffstat (limited to 'src/core/hle/kernel/svc')
-rw-r--r--src/core/hle/kernel/svc/svc_address_arbiter.cpp8
-rw-r--r--src/core/hle/kernel/svc/svc_code_memory.cpp4
-rw-r--r--src/core/hle/kernel/svc/svc_condition_variable.cpp4
-rw-r--r--src/core/hle/kernel/svc/svc_debug_string.cpp2
-rw-r--r--src/core/hle/kernel/svc/svc_exception.cpp2
-rw-r--r--src/core/hle/kernel/svc/svc_info.cpp10
-rw-r--r--src/core/hle/kernel/svc/svc_lock.cpp4
-rw-r--r--src/core/hle/kernel/svc/svc_memory.cpp13
-rw-r--r--src/core/hle/kernel/svc/svc_physical_memory.cpp6
-rw-r--r--src/core/hle/kernel/svc/svc_port.cpp2
-rw-r--r--src/core/hle/kernel/svc/svc_process.cpp2
-rw-r--r--src/core/hle/kernel/svc/svc_process_memory.cpp12
-rw-r--r--src/core/hle/kernel/svc/svc_query_memory.cpp2
-rw-r--r--src/core/hle/kernel/svc/svc_shared_memory.cpp4
-rw-r--r--src/core/hle/kernel/svc/svc_synchronization.cpp2
-rw-r--r--src/core/hle/kernel/svc/svc_thread.cpp8
-rw-r--r--src/core/hle/kernel/svc/svc_transfer_memory.cpp2
17 files changed, 43 insertions, 44 deletions
diff --git a/src/core/hle/kernel/svc/svc_address_arbiter.cpp b/src/core/hle/kernel/svc/svc_address_arbiter.cpp
index 22071731b..04cc5ea64 100644
--- a/src/core/hle/kernel/svc/svc_address_arbiter.cpp
+++ b/src/core/hle/kernel/svc/svc_address_arbiter.cpp
@@ -37,7 +37,7 @@ constexpr bool IsValidArbitrationType(Svc::ArbitrationType type) {
37} // namespace 37} // namespace
38 38
39// Wait for an address (via Address Arbiter) 39// Wait for an address (via Address Arbiter)
40Result WaitForAddress(Core::System& system, VAddr address, ArbitrationType arb_type, s32 value, 40Result WaitForAddress(Core::System& system, u64 address, ArbitrationType arb_type, s32 value,
41 s64 timeout_ns) { 41 s64 timeout_ns) {
42 LOG_TRACE(Kernel_SVC, "called, address=0x{:X}, arb_type=0x{:X}, value=0x{:X}, timeout_ns={}", 42 LOG_TRACE(Kernel_SVC, "called, address=0x{:X}, arb_type=0x{:X}, value=0x{:X}, timeout_ns={}",
43 address, arb_type, value, timeout_ns); 43 address, arb_type, value, timeout_ns);
@@ -68,7 +68,7 @@ Result WaitForAddress(Core::System& system, VAddr address, ArbitrationType arb_t
68} 68}
69 69
70// Signals to an address (via Address Arbiter) 70// Signals to an address (via Address Arbiter)
71Result SignalToAddress(Core::System& system, VAddr address, SignalType signal_type, s32 value, 71Result SignalToAddress(Core::System& system, u64 address, SignalType signal_type, s32 value,
72 s32 count) { 72 s32 count) {
73 LOG_TRACE(Kernel_SVC, "called, address=0x{:X}, signal_type=0x{:X}, value=0x{:X}, count=0x{:X}", 73 LOG_TRACE(Kernel_SVC, "called, address=0x{:X}, signal_type=0x{:X}, value=0x{:X}, count=0x{:X}",
74 address, signal_type, value, count); 74 address, signal_type, value, count);
@@ -82,12 +82,12 @@ Result SignalToAddress(Core::System& system, VAddr address, SignalType signal_ty
82 .SignalAddressArbiter(address, signal_type, value, count)); 82 .SignalAddressArbiter(address, signal_type, value, count));
83} 83}
84 84
85Result WaitForAddress64(Core::System& system, VAddr address, ArbitrationType arb_type, s32 value, 85Result WaitForAddress64(Core::System& system, u64 address, ArbitrationType arb_type, s32 value,
86 s64 timeout_ns) { 86 s64 timeout_ns) {
87 R_RETURN(WaitForAddress(system, address, arb_type, value, timeout_ns)); 87 R_RETURN(WaitForAddress(system, address, arb_type, value, timeout_ns));
88} 88}
89 89
90Result SignalToAddress64(Core::System& system, VAddr address, SignalType signal_type, s32 value, 90Result SignalToAddress64(Core::System& system, u64 address, SignalType signal_type, s32 value,
91 s32 count) { 91 s32 count) {
92 R_RETURN(SignalToAddress(system, address, signal_type, value, count)); 92 R_RETURN(SignalToAddress(system, address, signal_type, value, count));
93} 93}
diff --git a/src/core/hle/kernel/svc/svc_code_memory.cpp b/src/core/hle/kernel/svc/svc_code_memory.cpp
index 43feab986..687baff82 100644
--- a/src/core/hle/kernel/svc/svc_code_memory.cpp
+++ b/src/core/hle/kernel/svc/svc_code_memory.cpp
@@ -29,7 +29,7 @@ constexpr bool IsValidUnmapFromOwnerCodeMemoryPermission(MemoryPermission perm)
29 29
30} // namespace 30} // namespace
31 31
32Result CreateCodeMemory(Core::System& system, Handle* out, VAddr address, uint64_t size) { 32Result CreateCodeMemory(Core::System& system, Handle* out, u64 address, uint64_t size) {
33 LOG_TRACE(Kernel_SVC, "called, address=0x{:X}, size=0x{:X}", address, size); 33 LOG_TRACE(Kernel_SVC, "called, address=0x{:X}, size=0x{:X}", address, size);
34 34
35 // Get kernel instance. 35 // Get kernel instance.
@@ -64,7 +64,7 @@ Result CreateCodeMemory(Core::System& system, Handle* out, VAddr address, uint64
64} 64}
65 65
66Result ControlCodeMemory(Core::System& system, Handle code_memory_handle, 66Result ControlCodeMemory(Core::System& system, Handle code_memory_handle,
67 CodeMemoryOperation operation, VAddr address, uint64_t size, 67 CodeMemoryOperation operation, u64 address, uint64_t size,
68 MemoryPermission perm) { 68 MemoryPermission perm) {
69 69
70 LOG_TRACE(Kernel_SVC, 70 LOG_TRACE(Kernel_SVC,
diff --git a/src/core/hle/kernel/svc/svc_condition_variable.cpp b/src/core/hle/kernel/svc/svc_condition_variable.cpp
index 648ed23d0..ca120d67e 100644
--- a/src/core/hle/kernel/svc/svc_condition_variable.cpp
+++ b/src/core/hle/kernel/svc/svc_condition_variable.cpp
@@ -11,7 +11,7 @@
11namespace Kernel::Svc { 11namespace Kernel::Svc {
12 12
13/// Wait process wide key atomic 13/// Wait process wide key atomic
14Result WaitProcessWideKeyAtomic(Core::System& system, VAddr address, VAddr cv_key, u32 tag, 14Result WaitProcessWideKeyAtomic(Core::System& system, u64 address, u64 cv_key, u32 tag,
15 s64 timeout_ns) { 15 s64 timeout_ns) {
16 LOG_TRACE(Kernel_SVC, "called address={:X}, cv_key={:X}, tag=0x{:08X}, timeout_ns={}", address, 16 LOG_TRACE(Kernel_SVC, "called address={:X}, cv_key={:X}, tag=0x{:08X}, timeout_ns={}", address,
17 cv_key, tag, timeout_ns); 17 cv_key, tag, timeout_ns);
@@ -43,7 +43,7 @@ Result WaitProcessWideKeyAtomic(Core::System& system, VAddr address, VAddr cv_ke
43} 43}
44 44
45/// Signal process wide key 45/// Signal process wide key
46void SignalProcessWideKey(Core::System& system, VAddr cv_key, s32 count) { 46void SignalProcessWideKey(Core::System& system, u64 cv_key, s32 count) {
47 LOG_TRACE(Kernel_SVC, "called, cv_key=0x{:X}, count=0x{:08X}", cv_key, count); 47 LOG_TRACE(Kernel_SVC, "called, cv_key=0x{:X}, count=0x{:08X}", cv_key, count);
48 48
49 // Signal the condition variable. 49 // Signal the condition variable.
diff --git a/src/core/hle/kernel/svc/svc_debug_string.cpp b/src/core/hle/kernel/svc/svc_debug_string.cpp
index d4bf062d1..8771d2b01 100644
--- a/src/core/hle/kernel/svc/svc_debug_string.cpp
+++ b/src/core/hle/kernel/svc/svc_debug_string.cpp
@@ -8,7 +8,7 @@
8namespace Kernel::Svc { 8namespace Kernel::Svc {
9 9
10/// Used to output a message on a debug hardware unit - does nothing on a retail unit 10/// Used to output a message on a debug hardware unit - does nothing on a retail unit
11Result OutputDebugString(Core::System& system, VAddr address, u64 len) { 11Result OutputDebugString(Core::System& system, u64 address, u64 len) {
12 R_SUCCEED_IF(len == 0); 12 R_SUCCEED_IF(len == 0);
13 13
14 std::string str(len, '\0'); 14 std::string str(len, '\0');
diff --git a/src/core/hle/kernel/svc/svc_exception.cpp b/src/core/hle/kernel/svc/svc_exception.cpp
index c2782908d..4ab5f471f 100644
--- a/src/core/hle/kernel/svc/svc_exception.cpp
+++ b/src/core/hle/kernel/svc/svc_exception.cpp
@@ -20,7 +20,7 @@ void Break(Core::System& system, BreakReason reason, u64 info1, u64 info2) {
20 bool has_dumped_buffer{}; 20 bool has_dumped_buffer{};
21 std::vector<u8> debug_buffer; 21 std::vector<u8> debug_buffer;
22 22
23 const auto handle_debug_buffer = [&](VAddr addr, u64 sz) { 23 const auto handle_debug_buffer = [&](u64 addr, u64 sz) {
24 if (sz == 0 || addr == 0 || has_dumped_buffer) { 24 if (sz == 0 || addr == 0 || has_dumped_buffer) {
25 return; 25 return;
26 } 26 }
diff --git a/src/core/hle/kernel/svc/svc_info.cpp b/src/core/hle/kernel/svc/svc_info.cpp
index 04b6d6964..2b2c878b5 100644
--- a/src/core/hle/kernel/svc/svc_info.cpp
+++ b/src/core/hle/kernel/svc/svc_info.cpp
@@ -54,7 +54,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle
54 R_SUCCEED(); 54 R_SUCCEED();
55 55
56 case InfoType::AliasRegionAddress: 56 case InfoType::AliasRegionAddress:
57 *result = process->PageTable().GetAliasRegionStart(); 57 *result = GetInteger(process->PageTable().GetAliasRegionStart());
58 R_SUCCEED(); 58 R_SUCCEED();
59 59
60 case InfoType::AliasRegionSize: 60 case InfoType::AliasRegionSize:
@@ -62,7 +62,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle
62 R_SUCCEED(); 62 R_SUCCEED();
63 63
64 case InfoType::HeapRegionAddress: 64 case InfoType::HeapRegionAddress:
65 *result = process->PageTable().GetHeapRegionStart(); 65 *result = GetInteger(process->PageTable().GetHeapRegionStart());
66 R_SUCCEED(); 66 R_SUCCEED();
67 67
68 case InfoType::HeapRegionSize: 68 case InfoType::HeapRegionSize:
@@ -70,7 +70,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle
70 R_SUCCEED(); 70 R_SUCCEED();
71 71
72 case InfoType::AslrRegionAddress: 72 case InfoType::AslrRegionAddress:
73 *result = process->PageTable().GetAliasCodeRegionStart(); 73 *result = GetInteger(process->PageTable().GetAliasCodeRegionStart());
74 R_SUCCEED(); 74 R_SUCCEED();
75 75
76 case InfoType::AslrRegionSize: 76 case InfoType::AslrRegionSize:
@@ -78,7 +78,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle
78 R_SUCCEED(); 78 R_SUCCEED();
79 79
80 case InfoType::StackRegionAddress: 80 case InfoType::StackRegionAddress:
81 *result = process->PageTable().GetStackRegionStart(); 81 *result = GetInteger(process->PageTable().GetStackRegionStart());
82 R_SUCCEED(); 82 R_SUCCEED();
83 83
84 case InfoType::StackRegionSize: 84 case InfoType::StackRegionSize:
@@ -107,7 +107,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle
107 R_SUCCEED(); 107 R_SUCCEED();
108 108
109 case InfoType::UserExceptionContextAddress: 109 case InfoType::UserExceptionContextAddress:
110 *result = process->GetProcessLocalRegionAddress(); 110 *result = GetInteger(process->GetProcessLocalRegionAddress());
111 R_SUCCEED(); 111 R_SUCCEED();
112 112
113 case InfoType::TotalNonSystemMemorySize: 113 case InfoType::TotalNonSystemMemorySize:
diff --git a/src/core/hle/kernel/svc/svc_lock.cpp b/src/core/hle/kernel/svc/svc_lock.cpp
index 3681279d6..1d7bc4246 100644
--- a/src/core/hle/kernel/svc/svc_lock.cpp
+++ b/src/core/hle/kernel/svc/svc_lock.cpp
@@ -9,7 +9,7 @@
9namespace Kernel::Svc { 9namespace Kernel::Svc {
10 10
11/// Attempts to locks a mutex 11/// Attempts to locks a mutex
12Result ArbitrateLock(Core::System& system, Handle thread_handle, VAddr address, u32 tag) { 12Result ArbitrateLock(Core::System& system, Handle thread_handle, u64 address, u32 tag) {
13 LOG_TRACE(Kernel_SVC, "called thread_handle=0x{:08X}, address=0x{:X}, tag=0x{:08X}", 13 LOG_TRACE(Kernel_SVC, "called thread_handle=0x{:08X}, address=0x{:X}, tag=0x{:08X}",
14 thread_handle, address, tag); 14 thread_handle, address, tag);
15 15
@@ -21,7 +21,7 @@ Result ArbitrateLock(Core::System& system, Handle thread_handle, VAddr address,
21} 21}
22 22
23/// Unlock a mutex 23/// Unlock a mutex
24Result ArbitrateUnlock(Core::System& system, VAddr address) { 24Result ArbitrateUnlock(Core::System& system, u64 address) {
25 LOG_TRACE(Kernel_SVC, "called address=0x{:X}", address); 25 LOG_TRACE(Kernel_SVC, "called address=0x{:X}", address);
26 26
27 // Validate the input address. 27 // Validate the input address.
diff --git a/src/core/hle/kernel/svc/svc_memory.cpp b/src/core/hle/kernel/svc/svc_memory.cpp
index 4db25a3b7..5dcb7f045 100644
--- a/src/core/hle/kernel/svc/svc_memory.cpp
+++ b/src/core/hle/kernel/svc/svc_memory.cpp
@@ -22,15 +22,14 @@ constexpr bool IsValidSetMemoryPermission(MemoryPermission perm) {
22// Checks if address + size is greater than the given address 22// Checks if address + size is greater than the given address
23// This can return false if the size causes an overflow of a 64-bit type 23// This can return false if the size causes an overflow of a 64-bit type
24// or if the given size is zero. 24// or if the given size is zero.
25constexpr bool IsValidAddressRange(VAddr address, u64 size) { 25constexpr bool IsValidAddressRange(u64 address, u64 size) {
26 return address + size > address; 26 return address + size > address;
27} 27}
28 28
29// Helper function that performs the common sanity checks for svcMapMemory 29// Helper function that performs the common sanity checks for svcMapMemory
30// and svcUnmapMemory. This is doable, as both functions perform their sanitizing 30// and svcUnmapMemory. This is doable, as both functions perform their sanitizing
31// in the same order. 31// in the same order.
32Result MapUnmapMemorySanityChecks(const KPageTable& manager, VAddr dst_addr, VAddr src_addr, 32Result MapUnmapMemorySanityChecks(const KPageTable& manager, u64 dst_addr, u64 src_addr, u64 size) {
33 u64 size) {
34 if (!Common::Is4KBAligned(dst_addr)) { 33 if (!Common::Is4KBAligned(dst_addr)) {
35 LOG_ERROR(Kernel_SVC, "Destination address is not aligned to 4KB, 0x{:016X}", dst_addr); 34 LOG_ERROR(Kernel_SVC, "Destination address is not aligned to 4KB, 0x{:016X}", dst_addr);
36 R_THROW(ResultInvalidAddress); 35 R_THROW(ResultInvalidAddress);
@@ -99,7 +98,7 @@ Result MapUnmapMemorySanityChecks(const KPageTable& manager, VAddr dst_addr, VAd
99 98
100} // namespace 99} // namespace
101 100
102Result SetMemoryPermission(Core::System& system, VAddr address, u64 size, MemoryPermission perm) { 101Result SetMemoryPermission(Core::System& system, u64 address, u64 size, MemoryPermission perm) {
103 LOG_DEBUG(Kernel_SVC, "called, address=0x{:016X}, size=0x{:X}, perm=0x{:08X", address, size, 102 LOG_DEBUG(Kernel_SVC, "called, address=0x{:016X}, size=0x{:X}, perm=0x{:08X", address, size,
104 perm); 103 perm);
105 104
@@ -120,7 +119,7 @@ Result SetMemoryPermission(Core::System& system, VAddr address, u64 size, Memory
120 R_RETURN(page_table.SetMemoryPermission(address, size, perm)); 119 R_RETURN(page_table.SetMemoryPermission(address, size, perm));
121} 120}
122 121
123Result SetMemoryAttribute(Core::System& system, VAddr address, u64 size, u32 mask, u32 attr) { 122Result SetMemoryAttribute(Core::System& system, u64 address, u64 size, u32 mask, u32 attr) {
124 LOG_DEBUG(Kernel_SVC, 123 LOG_DEBUG(Kernel_SVC,
125 "called, address=0x{:016X}, size=0x{:X}, mask=0x{:08X}, attribute=0x{:08X}", address, 124 "called, address=0x{:016X}, size=0x{:X}, mask=0x{:08X}, attribute=0x{:08X}", address,
126 size, mask, attr); 125 size, mask, attr);
@@ -145,7 +144,7 @@ Result SetMemoryAttribute(Core::System& system, VAddr address, u64 size, u32 mas
145} 144}
146 145
147/// Maps a memory range into a different range. 146/// Maps a memory range into a different range.
148Result MapMemory(Core::System& system, VAddr dst_addr, VAddr src_addr, u64 size) { 147Result MapMemory(Core::System& system, u64 dst_addr, u64 src_addr, u64 size) {
149 LOG_TRACE(Kernel_SVC, "called, dst_addr=0x{:X}, src_addr=0x{:X}, size=0x{:X}", dst_addr, 148 LOG_TRACE(Kernel_SVC, "called, dst_addr=0x{:X}, src_addr=0x{:X}, size=0x{:X}", dst_addr,
150 src_addr, size); 149 src_addr, size);
151 150
@@ -160,7 +159,7 @@ Result MapMemory(Core::System& system, VAddr dst_addr, VAddr src_addr, u64 size)
160} 159}
161 160
162/// Unmaps a region that was previously mapped with svcMapMemory 161/// Unmaps a region that was previously mapped with svcMapMemory
163Result UnmapMemory(Core::System& system, VAddr dst_addr, VAddr src_addr, u64 size) { 162Result UnmapMemory(Core::System& system, u64 dst_addr, u64 src_addr, u64 size) {
164 LOG_TRACE(Kernel_SVC, "called, dst_addr=0x{:X}, src_addr=0x{:X}, size=0x{:X}", dst_addr, 163 LOG_TRACE(Kernel_SVC, "called, dst_addr=0x{:X}, src_addr=0x{:X}, size=0x{:X}", dst_addr,
165 src_addr, size); 164 src_addr, size);
166 165
diff --git a/src/core/hle/kernel/svc/svc_physical_memory.cpp b/src/core/hle/kernel/svc/svc_physical_memory.cpp
index 63196e1ed..c2fbfb59a 100644
--- a/src/core/hle/kernel/svc/svc_physical_memory.cpp
+++ b/src/core/hle/kernel/svc/svc_physical_memory.cpp
@@ -8,7 +8,7 @@
8namespace Kernel::Svc { 8namespace Kernel::Svc {
9 9
10/// Set the process heap to a given Size. It can both extend and shrink the heap. 10/// Set the process heap to a given Size. It can both extend and shrink the heap.
11Result SetHeapSize(Core::System& system, VAddr* out_address, u64 size) { 11Result SetHeapSize(Core::System& system, u64* out_address, u64 size) {
12 LOG_TRACE(Kernel_SVC, "called, heap_size=0x{:X}", size); 12 LOG_TRACE(Kernel_SVC, "called, heap_size=0x{:X}", size);
13 13
14 // Validate size. 14 // Validate size.
@@ -20,7 +20,7 @@ Result SetHeapSize(Core::System& system, VAddr* out_address, u64 size) {
20} 20}
21 21
22/// Maps memory at a desired address 22/// Maps memory at a desired address
23Result MapPhysicalMemory(Core::System& system, VAddr addr, u64 size) { 23Result MapPhysicalMemory(Core::System& system, u64 addr, u64 size) {
24 LOG_DEBUG(Kernel_SVC, "called, addr=0x{:016X}, size=0x{:X}", addr, size); 24 LOG_DEBUG(Kernel_SVC, "called, addr=0x{:016X}, size=0x{:X}", addr, size);
25 25
26 if (!Common::Is4KBAligned(addr)) { 26 if (!Common::Is4KBAligned(addr)) {
@@ -69,7 +69,7 @@ Result MapPhysicalMemory(Core::System& system, VAddr addr, u64 size) {
69} 69}
70 70
71/// Unmaps memory previously mapped via MapPhysicalMemory 71/// Unmaps memory previously mapped via MapPhysicalMemory
72Result UnmapPhysicalMemory(Core::System& system, VAddr addr, u64 size) { 72Result UnmapPhysicalMemory(Core::System& system, u64 addr, u64 size) {
73 LOG_DEBUG(Kernel_SVC, "called, addr=0x{:016X}, size=0x{:X}", addr, size); 73 LOG_DEBUG(Kernel_SVC, "called, addr=0x{:016X}, size=0x{:X}", addr, size);
74 74
75 if (!Common::Is4KBAligned(addr)) { 75 if (!Common::Is4KBAligned(addr)) {
diff --git a/src/core/hle/kernel/svc/svc_port.cpp b/src/core/hle/kernel/svc/svc_port.cpp
index 0b5556bc4..c6eb70422 100644
--- a/src/core/hle/kernel/svc/svc_port.cpp
+++ b/src/core/hle/kernel/svc/svc_port.cpp
@@ -12,7 +12,7 @@
12 12
13namespace Kernel::Svc { 13namespace Kernel::Svc {
14 14
15Result ConnectToNamedPort(Core::System& system, Handle* out, VAddr user_name) { 15Result ConnectToNamedPort(Core::System& system, Handle* out, u64 user_name) {
16 // Copy the provided name from user memory to kernel memory. 16 // Copy the provided name from user memory to kernel memory.
17 auto string_name = system.Memory().ReadCString(user_name, KObjectName::NameLengthMax); 17 auto string_name = system.Memory().ReadCString(user_name, KObjectName::NameLengthMax);
18 18
diff --git a/src/core/hle/kernel/svc/svc_process.cpp b/src/core/hle/kernel/svc/svc_process.cpp
index b538c37e7..3c3579947 100644
--- a/src/core/hle/kernel/svc/svc_process.cpp
+++ b/src/core/hle/kernel/svc/svc_process.cpp
@@ -50,7 +50,7 @@ Result GetProcessId(Core::System& system, u64* out_process_id, Handle handle) {
50 R_SUCCEED(); 50 R_SUCCEED();
51} 51}
52 52
53Result GetProcessList(Core::System& system, s32* out_num_processes, VAddr out_process_ids, 53Result GetProcessList(Core::System& system, s32* out_num_processes, u64 out_process_ids,
54 int32_t out_process_ids_size) { 54 int32_t out_process_ids_size) {
55 LOG_DEBUG(Kernel_SVC, "called. out_process_ids=0x{:016X}, out_process_ids_size={}", 55 LOG_DEBUG(Kernel_SVC, "called. out_process_ids=0x{:016X}, out_process_ids_size={}",
56 out_process_ids, out_process_ids_size); 56 out_process_ids, out_process_ids_size);
diff --git a/src/core/hle/kernel/svc/svc_process_memory.cpp b/src/core/hle/kernel/svc/svc_process_memory.cpp
index f9210ca1e..aee0f2f36 100644
--- a/src/core/hle/kernel/svc/svc_process_memory.cpp
+++ b/src/core/hle/kernel/svc/svc_process_memory.cpp
@@ -8,7 +8,7 @@
8namespace Kernel::Svc { 8namespace Kernel::Svc {
9namespace { 9namespace {
10 10
11constexpr bool IsValidAddressRange(VAddr address, u64 size) { 11constexpr bool IsValidAddressRange(u64 address, u64 size) {
12 return address + size > address; 12 return address + size > address;
13} 13}
14 14
@@ -26,7 +26,7 @@ constexpr bool IsValidProcessMemoryPermission(Svc::MemoryPermission perm) {
26 26
27} // namespace 27} // namespace
28 28
29Result SetProcessMemoryPermission(Core::System& system, Handle process_handle, VAddr address, 29Result SetProcessMemoryPermission(Core::System& system, Handle process_handle, u64 address,
30 u64 size, Svc::MemoryPermission perm) { 30 u64 size, Svc::MemoryPermission perm) {
31 LOG_TRACE(Kernel_SVC, 31 LOG_TRACE(Kernel_SVC,
32 "called, process_handle=0x{:X}, addr=0x{:X}, size=0x{:X}, permissions=0x{:08X}", 32 "called, process_handle=0x{:X}, addr=0x{:X}, size=0x{:X}, permissions=0x{:08X}",
@@ -56,8 +56,8 @@ Result SetProcessMemoryPermission(Core::System& system, Handle process_handle, V
56 R_RETURN(page_table.SetProcessMemoryPermission(address, size, perm)); 56 R_RETURN(page_table.SetProcessMemoryPermission(address, size, perm));
57} 57}
58 58
59Result MapProcessMemory(Core::System& system, VAddr dst_address, Handle process_handle, 59Result MapProcessMemory(Core::System& system, u64 dst_address, Handle process_handle,
60 VAddr src_address, u64 size) { 60 u64 src_address, u64 size) {
61 LOG_TRACE(Kernel_SVC, 61 LOG_TRACE(Kernel_SVC,
62 "called, dst_address=0x{:X}, process_handle=0x{:X}, src_address=0x{:X}, size=0x{:X}", 62 "called, dst_address=0x{:X}, process_handle=0x{:X}, src_address=0x{:X}, size=0x{:X}",
63 dst_address, process_handle, src_address, size); 63 dst_address, process_handle, src_address, size);
@@ -97,8 +97,8 @@ Result MapProcessMemory(Core::System& system, VAddr dst_address, Handle process_
97 KMemoryPermission::UserReadWrite)); 97 KMemoryPermission::UserReadWrite));
98} 98}
99 99
100Result UnmapProcessMemory(Core::System& system, VAddr dst_address, Handle process_handle, 100Result UnmapProcessMemory(Core::System& system, u64 dst_address, Handle process_handle,
101 VAddr src_address, u64 size) { 101 u64 src_address, u64 size) {
102 LOG_TRACE(Kernel_SVC, 102 LOG_TRACE(Kernel_SVC,
103 "called, dst_address=0x{:X}, process_handle=0x{:X}, src_address=0x{:X}, size=0x{:X}", 103 "called, dst_address=0x{:X}, process_handle=0x{:X}, src_address=0x{:X}, size=0x{:X}",
104 dst_address, process_handle, src_address, size); 104 dst_address, process_handle, src_address, size);
diff --git a/src/core/hle/kernel/svc/svc_query_memory.cpp b/src/core/hle/kernel/svc/svc_query_memory.cpp
index 457ebf950..5db5611f0 100644
--- a/src/core/hle/kernel/svc/svc_query_memory.cpp
+++ b/src/core/hle/kernel/svc/svc_query_memory.cpp
@@ -8,7 +8,7 @@
8namespace Kernel::Svc { 8namespace Kernel::Svc {
9 9
10Result QueryMemory(Core::System& system, uint64_t out_memory_info, PageInfo* out_page_info, 10Result QueryMemory(Core::System& system, uint64_t out_memory_info, PageInfo* out_page_info,
11 VAddr query_address) { 11 u64 query_address) {
12 LOG_TRACE(Kernel_SVC, 12 LOG_TRACE(Kernel_SVC,
13 "called, out_memory_info=0x{:016X}, " 13 "called, out_memory_info=0x{:016X}, "
14 "query_address=0x{:016X}", 14 "query_address=0x{:016X}",
diff --git a/src/core/hle/kernel/svc/svc_shared_memory.cpp b/src/core/hle/kernel/svc/svc_shared_memory.cpp
index 40d878f17..a698596aa 100644
--- a/src/core/hle/kernel/svc/svc_shared_memory.cpp
+++ b/src/core/hle/kernel/svc/svc_shared_memory.cpp
@@ -26,7 +26,7 @@ constexpr bool IsValidSharedMemoryPermission(MemoryPermission perm) {
26 26
27} // namespace 27} // namespace
28 28
29Result MapSharedMemory(Core::System& system, Handle shmem_handle, VAddr address, u64 size, 29Result MapSharedMemory(Core::System& system, Handle shmem_handle, u64 address, u64 size,
30 Svc::MemoryPermission map_perm) { 30 Svc::MemoryPermission map_perm) {
31 LOG_TRACE(Kernel_SVC, 31 LOG_TRACE(Kernel_SVC,
32 "called, shared_memory_handle=0x{:X}, addr=0x{:X}, size=0x{:X}, permissions=0x{:08X}", 32 "called, shared_memory_handle=0x{:X}, addr=0x{:X}, size=0x{:X}, permissions=0x{:08X}",
@@ -64,7 +64,7 @@ Result MapSharedMemory(Core::System& system, Handle shmem_handle, VAddr address,
64 R_RETURN(shmem->Map(process, address, size, map_perm)); 64 R_RETURN(shmem->Map(process, address, size, map_perm));
65} 65}
66 66
67Result UnmapSharedMemory(Core::System& system, Handle shmem_handle, VAddr address, u64 size) { 67Result UnmapSharedMemory(Core::System& system, Handle shmem_handle, u64 address, u64 size) {
68 // Validate the address/size. 68 // Validate the address/size.
69 R_UNLESS(Common::IsAligned(address, PageSize), ResultInvalidAddress); 69 R_UNLESS(Common::IsAligned(address, PageSize), ResultInvalidAddress);
70 R_UNLESS(Common::IsAligned(size, PageSize), ResultInvalidSize); 70 R_UNLESS(Common::IsAligned(size, PageSize), ResultInvalidSize);
diff --git a/src/core/hle/kernel/svc/svc_synchronization.cpp b/src/core/hle/kernel/svc/svc_synchronization.cpp
index 660b45c23..e490a13ae 100644
--- a/src/core/hle/kernel/svc/svc_synchronization.cpp
+++ b/src/core/hle/kernel/svc/svc_synchronization.cpp
@@ -80,7 +80,7 @@ static Result WaitSynchronization(Core::System& system, int32_t* out_index, cons
80} 80}
81 81
82/// Wait for the given handles to synchronize, timeout after the specified nanoseconds 82/// Wait for the given handles to synchronize, timeout after the specified nanoseconds
83Result WaitSynchronization(Core::System& system, int32_t* out_index, VAddr user_handles, 83Result WaitSynchronization(Core::System& system, int32_t* out_index, u64 user_handles,
84 int32_t num_handles, int64_t timeout_ns) { 84 int32_t num_handles, int64_t timeout_ns) {
85 LOG_TRACE(Kernel_SVC, "called user_handles={:#x}, num_handles={}, timeout_ns={}", user_handles, 85 LOG_TRACE(Kernel_SVC, "called user_handles={:#x}, num_handles={}, timeout_ns={}", user_handles,
86 num_handles, timeout_ns); 86 num_handles, timeout_ns);
diff --git a/src/core/hle/kernel/svc/svc_thread.cpp b/src/core/hle/kernel/svc/svc_thread.cpp
index 50991fb62..0be4858a2 100644
--- a/src/core/hle/kernel/svc/svc_thread.cpp
+++ b/src/core/hle/kernel/svc/svc_thread.cpp
@@ -19,8 +19,8 @@ constexpr bool IsValidVirtualCoreId(int32_t core_id) {
19} // Anonymous namespace 19} // Anonymous namespace
20 20
21/// Creates a new thread 21/// Creates a new thread
22Result CreateThread(Core::System& system, Handle* out_handle, VAddr entry_point, u64 arg, 22Result CreateThread(Core::System& system, Handle* out_handle, u64 entry_point, u64 arg,
23 VAddr stack_bottom, s32 priority, s32 core_id) { 23 u64 stack_bottom, s32 priority, s32 core_id) {
24 LOG_DEBUG(Kernel_SVC, 24 LOG_DEBUG(Kernel_SVC,
25 "called entry_point=0x{:08X}, arg=0x{:08X}, stack_bottom=0x{:08X}, " 25 "called entry_point=0x{:08X}, arg=0x{:08X}, stack_bottom=0x{:08X}, "
26 "priority=0x{:08X}, core_id=0x{:08X}", 26 "priority=0x{:08X}, core_id=0x{:08X}",
@@ -129,7 +129,7 @@ void SleepThread(Core::System& system, s64 nanoseconds) {
129} 129}
130 130
131/// Gets the thread context 131/// Gets the thread context
132Result GetThreadContext3(Core::System& system, VAddr out_context, Handle thread_handle) { 132Result GetThreadContext3(Core::System& system, u64 out_context, Handle thread_handle) {
133 LOG_DEBUG(Kernel_SVC, "called, out_context=0x{:08X}, thread_handle=0x{:X}", out_context, 133 LOG_DEBUG(Kernel_SVC, "called, out_context=0x{:08X}, thread_handle=0x{:X}", out_context,
134 thread_handle); 134 thread_handle);
135 135
@@ -217,7 +217,7 @@ Result SetThreadPriority(Core::System& system, Handle thread_handle, s32 priorit
217 R_SUCCEED(); 217 R_SUCCEED();
218} 218}
219 219
220Result GetThreadList(Core::System& system, s32* out_num_threads, VAddr out_thread_ids, 220Result GetThreadList(Core::System& system, s32* out_num_threads, u64 out_thread_ids,
221 s32 out_thread_ids_size, Handle debug_handle) { 221 s32 out_thread_ids_size, Handle debug_handle) {
222 // TODO: Handle this case when debug events are supported. 222 // TODO: Handle this case when debug events are supported.
223 UNIMPLEMENTED_IF(debug_handle != InvalidHandle); 223 UNIMPLEMENTED_IF(debug_handle != InvalidHandle);
diff --git a/src/core/hle/kernel/svc/svc_transfer_memory.cpp b/src/core/hle/kernel/svc/svc_transfer_memory.cpp
index 394f06728..82d469a37 100644
--- a/src/core/hle/kernel/svc/svc_transfer_memory.cpp
+++ b/src/core/hle/kernel/svc/svc_transfer_memory.cpp
@@ -25,7 +25,7 @@ constexpr bool IsValidTransferMemoryPermission(MemoryPermission perm) {
25} // Anonymous namespace 25} // Anonymous namespace
26 26
27/// Creates a TransferMemory object 27/// Creates a TransferMemory object
28Result CreateTransferMemory(Core::System& system, Handle* out, VAddr address, u64 size, 28Result CreateTransferMemory(Core::System& system, Handle* out, u64 address, u64 size,
29 MemoryPermission map_perm) { 29 MemoryPermission map_perm) {
30 auto& kernel = system.Kernel(); 30 auto& kernel = system.Kernel();
31 31