diff options
22 files changed, 65 insertions, 57 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8896fe0be..10a3de9e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -241,7 +241,7 @@ endif() | |||
| 241 | 241 | ||
| 242 | if (ENABLE_WEB_SERVICE) | 242 | if (ENABLE_WEB_SERVICE) |
| 243 | find_package(cpp-jwt 1.4 CONFIG) | 243 | find_package(cpp-jwt 1.4 CONFIG) |
| 244 | find_package(httplib 0.11 MODULE) | 244 | find_package(httplib 0.12 MODULE) |
| 245 | endif() | 245 | endif() |
| 246 | 246 | ||
| 247 | if (YUZU_TESTS) | 247 | if (YUZU_TESTS) |
diff --git a/externals/cpp-httplib b/externals/cpp-httplib | |||
| Subproject 305a7abcb9b4e9e349843c6d563212e6c1bbbf2 | Subproject 6d963fbe8d415399d65e94db7910bbd22fe3741 | ||
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 1072da8cc..a0bfd6bbc 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -82,7 +82,7 @@ static_assert(sizeof(uint64_t) == 8); | |||
| 82 | static void SvcWrap_SetHeapSize64From32(Core::System& system) { | 82 | static void SvcWrap_SetHeapSize64From32(Core::System& system) { |
| 83 | Result ret{}; | 83 | Result ret{}; |
| 84 | 84 | ||
| 85 | uintptr_t out_address{}; | 85 | uint64_t out_address{}; |
| 86 | uint32_t size{}; | 86 | uint32_t size{}; |
| 87 | 87 | ||
| 88 | size = Convert<uint32_t>(GetReg32(system, 1)); | 88 | size = Convert<uint32_t>(GetReg32(system, 1)); |
| @@ -729,7 +729,7 @@ static void SvcWrap_GetLastThreadInfo64From32(Core::System& system) { | |||
| 729 | Result ret{}; | 729 | Result ret{}; |
| 730 | 730 | ||
| 731 | ilp32::LastThreadContext out_context{}; | 731 | ilp32::LastThreadContext out_context{}; |
| 732 | uintptr_t out_tls_address{}; | 732 | uint64_t out_tls_address{}; |
| 733 | uint32_t out_flags{}; | 733 | uint32_t out_flags{}; |
| 734 | 734 | ||
| 735 | ret = GetLastThreadInfo64From32(system, &out_context, &out_tls_address, &out_flags); | 735 | ret = GetLastThreadInfo64From32(system, &out_context, &out_tls_address, &out_flags); |
| @@ -1278,8 +1278,8 @@ static void SvcWrap_QueryPhysicalAddress64From32(Core::System& system) { | |||
| 1278 | static void SvcWrap_QueryIoMapping64From32(Core::System& system) { | 1278 | static void SvcWrap_QueryIoMapping64From32(Core::System& system) { |
| 1279 | Result ret{}; | 1279 | Result ret{}; |
| 1280 | 1280 | ||
| 1281 | uintptr_t out_address{}; | 1281 | uint64_t out_address{}; |
| 1282 | uintptr_t out_size{}; | 1282 | uint64_t out_size{}; |
| 1283 | uint64_t physical_address{}; | 1283 | uint64_t physical_address{}; |
| 1284 | uint32_t size{}; | 1284 | uint32_t size{}; |
| 1285 | 1285 | ||
| @@ -2088,7 +2088,7 @@ static void SvcWrap_UnmapInsecureMemory64From32(Core::System& system) { | |||
| 2088 | static void SvcWrap_SetHeapSize64(Core::System& system) { | 2088 | static void SvcWrap_SetHeapSize64(Core::System& system) { |
| 2089 | Result ret{}; | 2089 | Result ret{}; |
| 2090 | 2090 | ||
| 2091 | uintptr_t out_address{}; | 2091 | uint64_t out_address{}; |
| 2092 | uint64_t size{}; | 2092 | uint64_t size{}; |
| 2093 | 2093 | ||
| 2094 | size = Convert<uint64_t>(GetReg64(system, 1)); | 2094 | size = Convert<uint64_t>(GetReg64(system, 1)); |
| @@ -2705,7 +2705,7 @@ static void SvcWrap_GetLastThreadInfo64(Core::System& system) { | |||
| 2705 | Result ret{}; | 2705 | Result ret{}; |
| 2706 | 2706 | ||
| 2707 | lp64::LastThreadContext out_context{}; | 2707 | lp64::LastThreadContext out_context{}; |
| 2708 | uintptr_t out_tls_address{}; | 2708 | uint64_t out_tls_address{}; |
| 2709 | uint32_t out_flags{}; | 2709 | uint32_t out_flags{}; |
| 2710 | 2710 | ||
| 2711 | ret = GetLastThreadInfo64(system, &out_context, &out_tls_address, &out_flags); | 2711 | ret = GetLastThreadInfo64(system, &out_context, &out_tls_address, &out_flags); |
| @@ -3217,8 +3217,8 @@ static void SvcWrap_QueryPhysicalAddress64(Core::System& system) { | |||
| 3217 | static void SvcWrap_QueryIoMapping64(Core::System& system) { | 3217 | static void SvcWrap_QueryIoMapping64(Core::System& system) { |
| 3218 | Result ret{}; | 3218 | Result ret{}; |
| 3219 | 3219 | ||
| 3220 | uintptr_t out_address{}; | 3220 | uint64_t out_address{}; |
| 3221 | uintptr_t out_size{}; | 3221 | uint64_t out_size{}; |
| 3222 | uint64_t physical_address{}; | 3222 | uint64_t physical_address{}; |
| 3223 | uint64_t size{}; | 3223 | uint64_t size{}; |
| 3224 | 3224 | ||
diff --git a/src/core/hle/kernel/svc.h b/src/core/hle/kernel/svc.h index 36e619959..ac4696008 100644 --- a/src/core/hle/kernel/svc.h +++ b/src/core/hle/kernel/svc.h | |||
| @@ -16,7 +16,7 @@ class System; | |||
| 16 | namespace Kernel::Svc { | 16 | namespace Kernel::Svc { |
| 17 | 17 | ||
| 18 | // clang-format off | 18 | // clang-format off |
| 19 | Result SetHeapSize(Core::System& system, uintptr_t* out_address, uint64_t size); | 19 | Result SetHeapSize(Core::System& system, uint64_t* out_address, uint64_t size); |
| 20 | Result SetMemoryPermission(Core::System& system, uint64_t address, uint64_t size, MemoryPermission perm); | 20 | Result SetMemoryPermission(Core::System& system, uint64_t address, uint64_t size, MemoryPermission perm); |
| 21 | Result SetMemoryAttribute(Core::System& system, uint64_t address, uint64_t size, uint32_t mask, uint32_t attr); | 21 | Result SetMemoryAttribute(Core::System& system, uint64_t address, uint64_t size, uint32_t mask, uint32_t attr); |
| 22 | Result MapMemory(Core::System& system, uint64_t dst_address, uint64_t src_address, uint64_t size); | 22 | Result MapMemory(Core::System& system, uint64_t dst_address, uint64_t src_address, uint64_t size); |
| @@ -61,7 +61,7 @@ Result FlushDataCache(Core::System& system, uint64_t address, uint64_t size); | |||
| 61 | Result MapPhysicalMemory(Core::System& system, uint64_t address, uint64_t size); | 61 | Result MapPhysicalMemory(Core::System& system, uint64_t address, uint64_t size); |
| 62 | Result UnmapPhysicalMemory(Core::System& system, uint64_t address, uint64_t size); | 62 | Result UnmapPhysicalMemory(Core::System& system, uint64_t address, uint64_t size); |
| 63 | Result GetDebugFutureThreadInfo(Core::System& system, lp64::LastThreadContext* out_context, uint64_t* out_thread_id, Handle debug_handle, int64_t ns); | 63 | Result GetDebugFutureThreadInfo(Core::System& system, lp64::LastThreadContext* out_context, uint64_t* out_thread_id, Handle debug_handle, int64_t ns); |
| 64 | Result GetLastThreadInfo(Core::System& system, lp64::LastThreadContext* out_context, uintptr_t* out_tls_address, uint32_t* out_flags); | 64 | Result GetLastThreadInfo(Core::System& system, lp64::LastThreadContext* out_context, uint64_t* out_tls_address, uint32_t* out_flags); |
| 65 | Result GetResourceLimitLimitValue(Core::System& system, int64_t* out_limit_value, Handle resource_limit_handle, LimitableResource which); | 65 | Result GetResourceLimitLimitValue(Core::System& system, int64_t* out_limit_value, Handle resource_limit_handle, LimitableResource which); |
| 66 | Result GetResourceLimitCurrentValue(Core::System& system, int64_t* out_current_value, Handle resource_limit_handle, LimitableResource which); | 66 | Result GetResourceLimitCurrentValue(Core::System& system, int64_t* out_current_value, Handle resource_limit_handle, LimitableResource which); |
| 67 | Result SetThreadActivity(Core::System& system, Handle thread_handle, ThreadActivity thread_activity); | 67 | Result SetThreadActivity(Core::System& system, Handle thread_handle, ThreadActivity thread_activity); |
| @@ -94,7 +94,7 @@ Result MapTransferMemory(Core::System& system, Handle trmem_handle, uint64_t add | |||
| 94 | Result UnmapTransferMemory(Core::System& system, Handle trmem_handle, uint64_t address, uint64_t size); | 94 | Result UnmapTransferMemory(Core::System& system, Handle trmem_handle, uint64_t address, uint64_t size); |
| 95 | Result CreateInterruptEvent(Core::System& system, Handle* out_read_handle, int32_t interrupt_id, InterruptType interrupt_type); | 95 | Result CreateInterruptEvent(Core::System& system, Handle* out_read_handle, int32_t interrupt_id, InterruptType interrupt_type); |
| 96 | Result QueryPhysicalAddress(Core::System& system, lp64::PhysicalMemoryInfo* out_info, uint64_t address); | 96 | Result QueryPhysicalAddress(Core::System& system, lp64::PhysicalMemoryInfo* out_info, uint64_t address); |
| 97 | Result QueryIoMapping(Core::System& system, uintptr_t* out_address, uintptr_t* out_size, uint64_t physical_address, uint64_t size); | 97 | Result QueryIoMapping(Core::System& system, uint64_t* out_address, uint64_t* out_size, uint64_t physical_address, uint64_t size); |
| 98 | Result CreateDeviceAddressSpace(Core::System& system, Handle* out_handle, uint64_t das_address, uint64_t das_size); | 98 | Result CreateDeviceAddressSpace(Core::System& system, Handle* out_handle, uint64_t das_address, uint64_t das_size); |
| 99 | Result AttachDeviceAddressSpace(Core::System& system, DeviceName device_name, Handle das_handle); | 99 | Result AttachDeviceAddressSpace(Core::System& system, DeviceName device_name, Handle das_handle); |
| 100 | Result DetachDeviceAddressSpace(Core::System& system, DeviceName device_name, Handle das_handle); | 100 | Result DetachDeviceAddressSpace(Core::System& system, DeviceName device_name, Handle das_handle); |
| @@ -137,7 +137,7 @@ Result SetResourceLimitLimitValue(Core::System& system, Handle resource_limit_ha | |||
| 137 | Result MapInsecureMemory(Core::System& system, uint64_t address, uint64_t size); | 137 | Result MapInsecureMemory(Core::System& system, uint64_t address, uint64_t size); |
| 138 | Result UnmapInsecureMemory(Core::System& system, uint64_t address, uint64_t size); | 138 | Result UnmapInsecureMemory(Core::System& system, uint64_t address, uint64_t size); |
| 139 | 139 | ||
| 140 | Result SetHeapSize64From32(Core::System& system, uintptr_t* out_address, uint32_t size); | 140 | Result SetHeapSize64From32(Core::System& system, uint64_t* out_address, uint32_t size); |
| 141 | Result SetMemoryPermission64From32(Core::System& system, uint32_t address, uint32_t size, MemoryPermission perm); | 141 | Result SetMemoryPermission64From32(Core::System& system, uint32_t address, uint32_t size, MemoryPermission perm); |
| 142 | Result SetMemoryAttribute64From32(Core::System& system, uint32_t address, uint32_t size, uint32_t mask, uint32_t attr); | 142 | Result SetMemoryAttribute64From32(Core::System& system, uint32_t address, uint32_t size, uint32_t mask, uint32_t attr); |
| 143 | Result MapMemory64From32(Core::System& system, uint32_t dst_address, uint32_t src_address, uint32_t size); | 143 | Result MapMemory64From32(Core::System& system, uint32_t dst_address, uint32_t src_address, uint32_t size); |
| @@ -182,7 +182,7 @@ Result FlushDataCache64From32(Core::System& system, uint32_t address, uint32_t s | |||
| 182 | Result MapPhysicalMemory64From32(Core::System& system, uint32_t address, uint32_t size); | 182 | Result MapPhysicalMemory64From32(Core::System& system, uint32_t address, uint32_t size); |
| 183 | Result UnmapPhysicalMemory64From32(Core::System& system, uint32_t address, uint32_t size); | 183 | Result UnmapPhysicalMemory64From32(Core::System& system, uint32_t address, uint32_t size); |
| 184 | Result GetDebugFutureThreadInfo64From32(Core::System& system, ilp32::LastThreadContext* out_context, uint64_t* out_thread_id, Handle debug_handle, int64_t ns); | 184 | Result GetDebugFutureThreadInfo64From32(Core::System& system, ilp32::LastThreadContext* out_context, uint64_t* out_thread_id, Handle debug_handle, int64_t ns); |
| 185 | Result GetLastThreadInfo64From32(Core::System& system, ilp32::LastThreadContext* out_context, uintptr_t* out_tls_address, uint32_t* out_flags); | 185 | Result GetLastThreadInfo64From32(Core::System& system, ilp32::LastThreadContext* out_context, uint64_t* out_tls_address, uint32_t* out_flags); |
| 186 | Result GetResourceLimitLimitValue64From32(Core::System& system, int64_t* out_limit_value, Handle resource_limit_handle, LimitableResource which); | 186 | Result GetResourceLimitLimitValue64From32(Core::System& system, int64_t* out_limit_value, Handle resource_limit_handle, LimitableResource which); |
| 187 | Result GetResourceLimitCurrentValue64From32(Core::System& system, int64_t* out_current_value, Handle resource_limit_handle, LimitableResource which); | 187 | Result GetResourceLimitCurrentValue64From32(Core::System& system, int64_t* out_current_value, Handle resource_limit_handle, LimitableResource which); |
| 188 | Result SetThreadActivity64From32(Core::System& system, Handle thread_handle, ThreadActivity thread_activity); | 188 | Result SetThreadActivity64From32(Core::System& system, Handle thread_handle, ThreadActivity thread_activity); |
| @@ -215,7 +215,7 @@ Result MapTransferMemory64From32(Core::System& system, Handle trmem_handle, uint | |||
| 215 | Result UnmapTransferMemory64From32(Core::System& system, Handle trmem_handle, uint32_t address, uint32_t size); | 215 | Result UnmapTransferMemory64From32(Core::System& system, Handle trmem_handle, uint32_t address, uint32_t size); |
| 216 | Result CreateInterruptEvent64From32(Core::System& system, Handle* out_read_handle, int32_t interrupt_id, InterruptType interrupt_type); | 216 | Result CreateInterruptEvent64From32(Core::System& system, Handle* out_read_handle, int32_t interrupt_id, InterruptType interrupt_type); |
| 217 | Result QueryPhysicalAddress64From32(Core::System& system, ilp32::PhysicalMemoryInfo* out_info, uint32_t address); | 217 | Result QueryPhysicalAddress64From32(Core::System& system, ilp32::PhysicalMemoryInfo* out_info, uint32_t address); |
| 218 | Result QueryIoMapping64From32(Core::System& system, uintptr_t* out_address, uintptr_t* out_size, uint64_t physical_address, uint32_t size); | 218 | Result QueryIoMapping64From32(Core::System& system, uint64_t* out_address, uint64_t* out_size, uint64_t physical_address, uint32_t size); |
| 219 | Result CreateDeviceAddressSpace64From32(Core::System& system, Handle* out_handle, uint64_t das_address, uint64_t das_size); | 219 | Result CreateDeviceAddressSpace64From32(Core::System& system, Handle* out_handle, uint64_t das_address, uint64_t das_size); |
| 220 | Result AttachDeviceAddressSpace64From32(Core::System& system, DeviceName device_name, Handle das_handle); | 220 | Result AttachDeviceAddressSpace64From32(Core::System& system, DeviceName device_name, Handle das_handle); |
| 221 | Result DetachDeviceAddressSpace64From32(Core::System& system, DeviceName device_name, Handle das_handle); | 221 | Result DetachDeviceAddressSpace64From32(Core::System& system, DeviceName device_name, Handle das_handle); |
| @@ -258,7 +258,7 @@ Result SetResourceLimitLimitValue64From32(Core::System& system, Handle resource_ | |||
| 258 | Result MapInsecureMemory64From32(Core::System& system, uint32_t address, uint32_t size); | 258 | Result MapInsecureMemory64From32(Core::System& system, uint32_t address, uint32_t size); |
| 259 | Result UnmapInsecureMemory64From32(Core::System& system, uint32_t address, uint32_t size); | 259 | Result UnmapInsecureMemory64From32(Core::System& system, uint32_t address, uint32_t size); |
| 260 | 260 | ||
| 261 | Result SetHeapSize64(Core::System& system, uintptr_t* out_address, uint64_t size); | 261 | Result SetHeapSize64(Core::System& system, uint64_t* out_address, uint64_t size); |
| 262 | Result SetMemoryPermission64(Core::System& system, uint64_t address, uint64_t size, MemoryPermission perm); | 262 | Result SetMemoryPermission64(Core::System& system, uint64_t address, uint64_t size, MemoryPermission perm); |
| 263 | Result SetMemoryAttribute64(Core::System& system, uint64_t address, uint64_t size, uint32_t mask, uint32_t attr); | 263 | Result SetMemoryAttribute64(Core::System& system, uint64_t address, uint64_t size, uint32_t mask, uint32_t attr); |
| 264 | Result MapMemory64(Core::System& system, uint64_t dst_address, uint64_t src_address, uint64_t size); | 264 | Result MapMemory64(Core::System& system, uint64_t dst_address, uint64_t src_address, uint64_t size); |
| @@ -303,7 +303,7 @@ Result FlushDataCache64(Core::System& system, uint64_t address, uint64_t size); | |||
| 303 | Result MapPhysicalMemory64(Core::System& system, uint64_t address, uint64_t size); | 303 | Result MapPhysicalMemory64(Core::System& system, uint64_t address, uint64_t size); |
| 304 | Result UnmapPhysicalMemory64(Core::System& system, uint64_t address, uint64_t size); | 304 | Result UnmapPhysicalMemory64(Core::System& system, uint64_t address, uint64_t size); |
| 305 | Result GetDebugFutureThreadInfo64(Core::System& system, lp64::LastThreadContext* out_context, uint64_t* out_thread_id, Handle debug_handle, int64_t ns); | 305 | Result GetDebugFutureThreadInfo64(Core::System& system, lp64::LastThreadContext* out_context, uint64_t* out_thread_id, Handle debug_handle, int64_t ns); |
| 306 | Result GetLastThreadInfo64(Core::System& system, lp64::LastThreadContext* out_context, uintptr_t* out_tls_address, uint32_t* out_flags); | 306 | Result GetLastThreadInfo64(Core::System& system, lp64::LastThreadContext* out_context, uint64_t* out_tls_address, uint32_t* out_flags); |
| 307 | Result GetResourceLimitLimitValue64(Core::System& system, int64_t* out_limit_value, Handle resource_limit_handle, LimitableResource which); | 307 | Result GetResourceLimitLimitValue64(Core::System& system, int64_t* out_limit_value, Handle resource_limit_handle, LimitableResource which); |
| 308 | Result GetResourceLimitCurrentValue64(Core::System& system, int64_t* out_current_value, Handle resource_limit_handle, LimitableResource which); | 308 | Result GetResourceLimitCurrentValue64(Core::System& system, int64_t* out_current_value, Handle resource_limit_handle, LimitableResource which); |
| 309 | Result SetThreadActivity64(Core::System& system, Handle thread_handle, ThreadActivity thread_activity); | 309 | Result SetThreadActivity64(Core::System& system, Handle thread_handle, ThreadActivity thread_activity); |
| @@ -336,7 +336,7 @@ Result MapTransferMemory64(Core::System& system, Handle trmem_handle, uint64_t a | |||
| 336 | Result UnmapTransferMemory64(Core::System& system, Handle trmem_handle, uint64_t address, uint64_t size); | 336 | Result UnmapTransferMemory64(Core::System& system, Handle trmem_handle, uint64_t address, uint64_t size); |
| 337 | Result CreateInterruptEvent64(Core::System& system, Handle* out_read_handle, int32_t interrupt_id, InterruptType interrupt_type); | 337 | Result CreateInterruptEvent64(Core::System& system, Handle* out_read_handle, int32_t interrupt_id, InterruptType interrupt_type); |
| 338 | Result QueryPhysicalAddress64(Core::System& system, lp64::PhysicalMemoryInfo* out_info, uint64_t address); | 338 | Result QueryPhysicalAddress64(Core::System& system, lp64::PhysicalMemoryInfo* out_info, uint64_t address); |
| 339 | Result QueryIoMapping64(Core::System& system, uintptr_t* out_address, uintptr_t* out_size, uint64_t physical_address, uint64_t size); | 339 | Result QueryIoMapping64(Core::System& system, uint64_t* out_address, uint64_t* out_size, uint64_t physical_address, uint64_t size); |
| 340 | Result CreateDeviceAddressSpace64(Core::System& system, Handle* out_handle, uint64_t das_address, uint64_t das_size); | 340 | Result CreateDeviceAddressSpace64(Core::System& system, Handle* out_handle, uint64_t das_address, uint64_t das_size); |
| 341 | Result AttachDeviceAddressSpace64(Core::System& system, DeviceName device_name, Handle das_handle); | 341 | Result AttachDeviceAddressSpace64(Core::System& system, DeviceName device_name, Handle das_handle); |
| 342 | Result DetachDeviceAddressSpace64(Core::System& system, DeviceName device_name, Handle das_handle); | 342 | Result DetachDeviceAddressSpace64(Core::System& system, DeviceName device_name, Handle das_handle); |
diff --git a/src/core/hle/kernel/svc/svc_address_translation.cpp b/src/core/hle/kernel/svc/svc_address_translation.cpp index c25e144cd..e65a11cda 100644 --- a/src/core/hle/kernel/svc/svc_address_translation.cpp +++ b/src/core/hle/kernel/svc/svc_address_translation.cpp | |||
| @@ -12,7 +12,7 @@ Result QueryPhysicalAddress(Core::System& system, lp64::PhysicalMemoryInfo* out_ | |||
| 12 | R_THROW(ResultNotImplemented); | 12 | R_THROW(ResultNotImplemented); |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | Result QueryIoMapping(Core::System& system, uintptr_t* out_address, uintptr_t* out_size, | 15 | Result QueryIoMapping(Core::System& system, uint64_t* out_address, uint64_t* out_size, |
| 16 | uint64_t physical_address, uint64_t size) { | 16 | uint64_t physical_address, uint64_t size) { |
| 17 | UNIMPLEMENTED(); | 17 | UNIMPLEMENTED(); |
| 18 | R_THROW(ResultNotImplemented); | 18 | R_THROW(ResultNotImplemented); |
| @@ -23,7 +23,7 @@ Result QueryPhysicalAddress64(Core::System& system, lp64::PhysicalMemoryInfo* ou | |||
| 23 | R_RETURN(QueryPhysicalAddress(system, out_info, address)); | 23 | R_RETURN(QueryPhysicalAddress(system, out_info, address)); |
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | Result QueryIoMapping64(Core::System& system, uintptr_t* out_address, uintptr_t* out_size, | 26 | Result QueryIoMapping64(Core::System& system, uint64_t* out_address, uint64_t* out_size, |
| 27 | uint64_t physical_address, uint64_t size) { | 27 | uint64_t physical_address, uint64_t size) { |
| 28 | R_RETURN(QueryIoMapping(system, out_address, out_size, physical_address, size)); | 28 | R_RETURN(QueryIoMapping(system, out_address, out_size, physical_address, size)); |
| 29 | } | 29 | } |
| @@ -41,10 +41,10 @@ Result QueryPhysicalAddress64From32(Core::System& system, ilp32::PhysicalMemoryI | |||
| 41 | R_SUCCEED(); | 41 | R_SUCCEED(); |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | Result QueryIoMapping64From32(Core::System& system, uintptr_t* out_address, uintptr_t* out_size, | 44 | Result QueryIoMapping64From32(Core::System& system, uint64_t* out_address, uint64_t* out_size, |
| 45 | uint64_t physical_address, uint32_t size) { | 45 | uint64_t physical_address, uint32_t size) { |
| 46 | R_RETURN(QueryIoMapping(system, reinterpret_cast<uintptr_t*>(out_address), | 46 | R_RETURN(QueryIoMapping(system, reinterpret_cast<uint64_t*>(out_address), |
| 47 | reinterpret_cast<uintptr_t*>(out_size), physical_address, size)); | 47 | reinterpret_cast<uint64_t*>(out_size), physical_address, size)); |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | } // namespace Kernel::Svc | 50 | } // namespace Kernel::Svc |
diff --git a/src/core/hle/kernel/svc/svc_cache.cpp b/src/core/hle/kernel/svc/svc_cache.cpp index 598b71da5..1779832d3 100644 --- a/src/core/hle/kernel/svc/svc_cache.cpp +++ b/src/core/hle/kernel/svc/svc_cache.cpp | |||
| @@ -13,7 +13,7 @@ void FlushEntireDataCache(Core::System& system) { | |||
| 13 | UNIMPLEMENTED(); | 13 | UNIMPLEMENTED(); |
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | Result FlushDataCache(Core::System& system, VAddr address, size_t size) { | 16 | Result FlushDataCache(Core::System& system, uint64_t address, uint64_t size) { |
| 17 | UNIMPLEMENTED(); | 17 | UNIMPLEMENTED(); |
| 18 | R_THROW(ResultNotImplemented); | 18 | R_THROW(ResultNotImplemented); |
| 19 | } | 19 | } |
| @@ -33,8 +33,8 @@ Result StoreProcessDataCache(Core::System& system, Handle process_handle, uint64 | |||
| 33 | Result FlushProcessDataCache(Core::System& system, Handle process_handle, u64 address, u64 size) { | 33 | Result FlushProcessDataCache(Core::System& system, Handle process_handle, u64 address, u64 size) { |
| 34 | // Validate address/size. | 34 | // Validate address/size. |
| 35 | R_UNLESS(size > 0, ResultInvalidSize); | 35 | R_UNLESS(size > 0, ResultInvalidSize); |
| 36 | R_UNLESS(address == static_cast<uintptr_t>(address), ResultInvalidCurrentMemory); | 36 | R_UNLESS(address == static_cast<uint64_t>(address), ResultInvalidCurrentMemory); |
| 37 | R_UNLESS(size == static_cast<size_t>(size), ResultInvalidCurrentMemory); | 37 | R_UNLESS(size == static_cast<uint64_t>(size), ResultInvalidCurrentMemory); |
| 38 | 38 | ||
| 39 | // Get the process from its handle. | 39 | // Get the process from its handle. |
| 40 | KScopedAutoObject process = | 40 | KScopedAutoObject process = |
| @@ -53,7 +53,7 @@ void FlushEntireDataCache64(Core::System& system) { | |||
| 53 | FlushEntireDataCache(system); | 53 | FlushEntireDataCache(system); |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | Result FlushDataCache64(Core::System& system, VAddr address, size_t size) { | 56 | Result FlushDataCache64(Core::System& system, uint64_t address, uint64_t size) { |
| 57 | R_RETURN(FlushDataCache(system, address, size)); | 57 | R_RETURN(FlushDataCache(system, address, size)); |
| 58 | } | 58 | } |
| 59 | 59 | ||
diff --git a/src/core/hle/kernel/svc/svc_code_memory.cpp b/src/core/hle/kernel/svc/svc_code_memory.cpp index 538ff1c71..8bed747af 100644 --- a/src/core/hle/kernel/svc/svc_code_memory.cpp +++ b/src/core/hle/kernel/svc/svc_code_memory.cpp | |||
| @@ -28,7 +28,7 @@ constexpr bool IsValidUnmapFromOwnerCodeMemoryPermission(MemoryPermission perm) | |||
| 28 | 28 | ||
| 29 | } // namespace | 29 | } // namespace |
| 30 | 30 | ||
| 31 | Result CreateCodeMemory(Core::System& system, Handle* out, VAddr address, size_t size) { | 31 | Result CreateCodeMemory(Core::System& system, Handle* out, VAddr address, uint64_t size) { |
| 32 | LOG_TRACE(Kernel_SVC, "called, address=0x{:X}, size=0x{:X}", address, size); | 32 | LOG_TRACE(Kernel_SVC, "called, address=0x{:X}, size=0x{:X}", address, size); |
| 33 | 33 | ||
| 34 | // Get kernel instance. | 34 | // Get kernel instance. |
| @@ -64,7 +64,7 @@ Result CreateCodeMemory(Core::System& system, Handle* out, VAddr address, size_t | |||
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | Result ControlCodeMemory(Core::System& system, Handle code_memory_handle, | 66 | Result ControlCodeMemory(Core::System& system, Handle code_memory_handle, |
| 67 | CodeMemoryOperation operation, VAddr address, size_t size, | 67 | CodeMemoryOperation operation, VAddr 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_debug.cpp b/src/core/hle/kernel/svc/svc_debug.cpp index a14050fa7..a4d1f700e 100644 --- a/src/core/hle/kernel/svc/svc_debug.cpp +++ b/src/core/hle/kernel/svc/svc_debug.cpp | |||
| @@ -45,19 +45,19 @@ Result SetDebugThreadContext(Core::System& system, Handle debug_handle, uint64_t | |||
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | Result QueryDebugProcessMemory(Core::System& system, uint64_t out_memory_info, | 47 | Result QueryDebugProcessMemory(Core::System& system, uint64_t out_memory_info, |
| 48 | PageInfo* out_page_info, Handle debug_handle, uintptr_t address) { | 48 | PageInfo* out_page_info, Handle process_handle, uint64_t address) { |
| 49 | UNIMPLEMENTED(); | 49 | UNIMPLEMENTED(); |
| 50 | R_THROW(ResultNotImplemented); | 50 | R_THROW(ResultNotImplemented); |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | Result ReadDebugProcessMemory(Core::System& system, uintptr_t buffer, Handle debug_handle, | 53 | Result ReadDebugProcessMemory(Core::System& system, uint64_t buffer, Handle debug_handle, |
| 54 | uintptr_t address, size_t size) { | 54 | uint64_t address, uint64_t size) { |
| 55 | UNIMPLEMENTED(); | 55 | UNIMPLEMENTED(); |
| 56 | R_THROW(ResultNotImplemented); | 56 | R_THROW(ResultNotImplemented); |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | Result WriteDebugProcessMemory(Core::System& system, Handle debug_handle, uintptr_t buffer, | 59 | Result WriteDebugProcessMemory(Core::System& system, Handle debug_handle, uint64_t buffer, |
| 60 | uintptr_t address, size_t size) { | 60 | uint64_t address, uint64_t size) { |
| 61 | UNIMPLEMENTED(); | 61 | UNIMPLEMENTED(); |
| 62 | R_THROW(ResultNotImplemented); | 62 | R_THROW(ResultNotImplemented); |
| 63 | } | 63 | } |
diff --git a/src/core/hle/kernel/svc/svc_device_address_space.cpp b/src/core/hle/kernel/svc/svc_device_address_space.cpp index f68c0e6a9..ec3143e67 100644 --- a/src/core/hle/kernel/svc/svc_device_address_space.cpp +++ b/src/core/hle/kernel/svc/svc_device_address_space.cpp | |||
| @@ -76,8 +76,8 @@ constexpr bool IsValidDeviceMemoryPermission(MemoryPermission device_perm) { | |||
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | Result MapDeviceAddressSpaceByForce(Core::System& system, Handle das_handle, Handle process_handle, | 78 | Result MapDeviceAddressSpaceByForce(Core::System& system, Handle das_handle, Handle process_handle, |
| 79 | uint64_t process_address, size_t size, uint64_t device_address, | 79 | uint64_t process_address, uint64_t size, |
| 80 | u32 option) { | 80 | uint64_t device_address, u32 option) { |
| 81 | // Decode the option. | 81 | // Decode the option. |
| 82 | const MapDeviceAddressSpaceOption option_pack{option}; | 82 | const MapDeviceAddressSpaceOption option_pack{option}; |
| 83 | const auto device_perm = option_pack.permission; | 83 | const auto device_perm = option_pack.permission; |
| @@ -90,7 +90,7 @@ Result MapDeviceAddressSpaceByForce(Core::System& system, Handle das_handle, Han | |||
| 90 | R_UNLESS(size > 0, ResultInvalidSize); | 90 | R_UNLESS(size > 0, ResultInvalidSize); |
| 91 | R_UNLESS((process_address < process_address + size), ResultInvalidCurrentMemory); | 91 | R_UNLESS((process_address < process_address + size), ResultInvalidCurrentMemory); |
| 92 | R_UNLESS((device_address < device_address + size), ResultInvalidMemoryRegion); | 92 | R_UNLESS((device_address < device_address + size), ResultInvalidMemoryRegion); |
| 93 | R_UNLESS((process_address == static_cast<uintptr_t>(process_address)), | 93 | R_UNLESS((process_address == static_cast<uint64_t>(process_address)), |
| 94 | ResultInvalidCurrentMemory); | 94 | ResultInvalidCurrentMemory); |
| 95 | R_UNLESS(IsValidDeviceMemoryPermission(device_perm), ResultInvalidNewMemoryPermission); | 95 | R_UNLESS(IsValidDeviceMemoryPermission(device_perm), ResultInvalidNewMemoryPermission); |
| 96 | R_UNLESS(reserved == 0, ResultInvalidEnumValue); | 96 | R_UNLESS(reserved == 0, ResultInvalidEnumValue); |
| @@ -116,8 +116,8 @@ Result MapDeviceAddressSpaceByForce(Core::System& system, Handle das_handle, Han | |||
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | Result MapDeviceAddressSpaceAligned(Core::System& system, Handle das_handle, Handle process_handle, | 118 | Result MapDeviceAddressSpaceAligned(Core::System& system, Handle das_handle, Handle process_handle, |
| 119 | uint64_t process_address, size_t size, uint64_t device_address, | 119 | uint64_t process_address, uint64_t size, |
| 120 | u32 option) { | 120 | uint64_t device_address, u32 option) { |
| 121 | // Decode the option. | 121 | // Decode the option. |
| 122 | const MapDeviceAddressSpaceOption option_pack{option}; | 122 | const MapDeviceAddressSpaceOption option_pack{option}; |
| 123 | const auto device_perm = option_pack.permission; | 123 | const auto device_perm = option_pack.permission; |
| @@ -131,7 +131,7 @@ Result MapDeviceAddressSpaceAligned(Core::System& system, Handle das_handle, Han | |||
| 131 | R_UNLESS(size > 0, ResultInvalidSize); | 131 | R_UNLESS(size > 0, ResultInvalidSize); |
| 132 | R_UNLESS((process_address < process_address + size), ResultInvalidCurrentMemory); | 132 | R_UNLESS((process_address < process_address + size), ResultInvalidCurrentMemory); |
| 133 | R_UNLESS((device_address < device_address + size), ResultInvalidMemoryRegion); | 133 | R_UNLESS((device_address < device_address + size), ResultInvalidMemoryRegion); |
| 134 | R_UNLESS((process_address == static_cast<uintptr_t>(process_address)), | 134 | R_UNLESS((process_address == static_cast<uint64_t>(process_address)), |
| 135 | ResultInvalidCurrentMemory); | 135 | ResultInvalidCurrentMemory); |
| 136 | R_UNLESS(IsValidDeviceMemoryPermission(device_perm), ResultInvalidNewMemoryPermission); | 136 | R_UNLESS(IsValidDeviceMemoryPermission(device_perm), ResultInvalidNewMemoryPermission); |
| 137 | R_UNLESS(reserved == 0, ResultInvalidEnumValue); | 137 | R_UNLESS(reserved == 0, ResultInvalidEnumValue); |
| @@ -157,7 +157,7 @@ Result MapDeviceAddressSpaceAligned(Core::System& system, Handle das_handle, Han | |||
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | Result UnmapDeviceAddressSpace(Core::System& system, Handle das_handle, Handle process_handle, | 159 | Result UnmapDeviceAddressSpace(Core::System& system, Handle das_handle, Handle process_handle, |
| 160 | uint64_t process_address, size_t size, uint64_t device_address) { | 160 | uint64_t process_address, uint64_t size, uint64_t device_address) { |
| 161 | // Validate input. | 161 | // Validate input. |
| 162 | R_UNLESS(Common::IsAligned(process_address, PageSize), ResultInvalidAddress); | 162 | R_UNLESS(Common::IsAligned(process_address, PageSize), ResultInvalidAddress); |
| 163 | R_UNLESS(Common::IsAligned(device_address, PageSize), ResultInvalidAddress); | 163 | R_UNLESS(Common::IsAligned(device_address, PageSize), ResultInvalidAddress); |
| @@ -165,7 +165,7 @@ Result UnmapDeviceAddressSpace(Core::System& system, Handle das_handle, Handle p | |||
| 165 | R_UNLESS(size > 0, ResultInvalidSize); | 165 | R_UNLESS(size > 0, ResultInvalidSize); |
| 166 | R_UNLESS((process_address < process_address + size), ResultInvalidCurrentMemory); | 166 | R_UNLESS((process_address < process_address + size), ResultInvalidCurrentMemory); |
| 167 | R_UNLESS((device_address < device_address + size), ResultInvalidMemoryRegion); | 167 | R_UNLESS((device_address < device_address + size), ResultInvalidMemoryRegion); |
| 168 | R_UNLESS((process_address == static_cast<uintptr_t>(process_address)), | 168 | R_UNLESS((process_address == static_cast<uint64_t>(process_address)), |
| 169 | ResultInvalidCurrentMemory); | 169 | ResultInvalidCurrentMemory); |
| 170 | 170 | ||
| 171 | // Get the device address space. | 171 | // Get the device address space. |
diff --git a/src/core/hle/kernel/svc/svc_insecure_memory.cpp b/src/core/hle/kernel/svc/svc_insecure_memory.cpp index 79882685d..00457c6bf 100644 --- a/src/core/hle/kernel/svc/svc_insecure_memory.cpp +++ b/src/core/hle/kernel/svc/svc_insecure_memory.cpp | |||
| @@ -6,12 +6,12 @@ | |||
| 6 | 6 | ||
| 7 | namespace Kernel::Svc { | 7 | namespace Kernel::Svc { |
| 8 | 8 | ||
| 9 | Result MapInsecureMemory(Core::System& system, uintptr_t address, size_t size) { | 9 | Result MapInsecureMemory(Core::System& system, uint64_t address, uint64_t size) { |
| 10 | UNIMPLEMENTED(); | 10 | UNIMPLEMENTED(); |
| 11 | R_THROW(ResultNotImplemented); | 11 | R_THROW(ResultNotImplemented); |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | Result UnmapInsecureMemory(Core::System& system, uintptr_t address, size_t size) { | 14 | Result UnmapInsecureMemory(Core::System& system, uint64_t address, uint64_t size) { |
| 15 | UNIMPLEMENTED(); | 15 | UNIMPLEMENTED(); |
| 16 | R_THROW(ResultNotImplemented); | 16 | R_THROW(ResultNotImplemented); |
| 17 | } | 17 | } |
diff --git a/src/core/hle/kernel/svc/svc_io_pool.cpp b/src/core/hle/kernel/svc/svc_io_pool.cpp index 33f3d69bf..f01817e24 100644 --- a/src/core/hle/kernel/svc/svc_io_pool.cpp +++ b/src/core/hle/kernel/svc/svc_io_pool.cpp | |||
| @@ -12,19 +12,19 @@ Result CreateIoPool(Core::System& system, Handle* out, IoPoolType pool_type) { | |||
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | Result CreateIoRegion(Core::System& system, Handle* out, Handle io_pool_handle, uint64_t phys_addr, | 14 | Result CreateIoRegion(Core::System& system, Handle* out, Handle io_pool_handle, uint64_t phys_addr, |
| 15 | size_t size, MemoryMapping mapping, MemoryPermission perm) { | 15 | uint64_t size, MemoryMapping mapping, MemoryPermission perm) { |
| 16 | UNIMPLEMENTED(); | 16 | UNIMPLEMENTED(); |
| 17 | R_THROW(ResultNotImplemented); | 17 | R_THROW(ResultNotImplemented); |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | Result MapIoRegion(Core::System& system, Handle io_region_handle, uintptr_t address, size_t size, | 20 | Result MapIoRegion(Core::System& system, Handle io_region_handle, uint64_t address, uint64_t size, |
| 21 | MemoryPermission map_perm) { | 21 | MemoryPermission map_perm) { |
| 22 | UNIMPLEMENTED(); | 22 | UNIMPLEMENTED(); |
| 23 | R_THROW(ResultNotImplemented); | 23 | R_THROW(ResultNotImplemented); |
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | Result UnmapIoRegion(Core::System& system, Handle io_region_handle, uintptr_t address, | 26 | Result UnmapIoRegion(Core::System& system, Handle io_region_handle, uint64_t address, |
| 27 | size_t size) { | 27 | uint64_t size) { |
| 28 | UNIMPLEMENTED(); | 28 | UNIMPLEMENTED(); |
| 29 | R_THROW(ResultNotImplemented); | 29 | R_THROW(ResultNotImplemented); |
| 30 | } | 30 | } |
diff --git a/src/core/hle/kernel/svc/svc_physical_memory.cpp b/src/core/hle/kernel/svc/svc_physical_memory.cpp index a1f534454..ed6a624ac 100644 --- a/src/core/hle/kernel/svc/svc_physical_memory.cpp +++ b/src/core/hle/kernel/svc/svc_physical_memory.cpp | |||
| @@ -158,7 +158,7 @@ Result SetUnsafeLimit64(Core::System& system, uint64_t limit) { | |||
| 158 | R_RETURN(SetUnsafeLimit(system, limit)); | 158 | R_RETURN(SetUnsafeLimit(system, limit)); |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | Result SetHeapSize64From32(Core::System& system, uintptr_t* out_address, uint32_t size) { | 161 | Result SetHeapSize64From32(Core::System& system, uint64_t* out_address, uint32_t size) { |
| 162 | R_RETURN(SetHeapSize(system, out_address, size)); | 162 | R_RETURN(SetHeapSize(system, out_address, size)); |
| 163 | } | 163 | } |
| 164 | 164 | ||
diff --git a/src/core/hle/kernel/svc/svc_port.cpp b/src/core/hle/kernel/svc/svc_port.cpp index 2f9bfcb52..0b5b4ba2b 100644 --- a/src/core/hle/kernel/svc/svc_port.cpp +++ b/src/core/hle/kernel/svc/svc_port.cpp | |||
| @@ -65,7 +65,7 @@ Result ConnectToNamedPort(Core::System& system, Handle* out, VAddr port_name_add | |||
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | Result CreatePort(Core::System& system, Handle* out_server, Handle* out_client, | 67 | Result CreatePort(Core::System& system, Handle* out_server, Handle* out_client, |
| 68 | int32_t max_sessions, bool is_light, uintptr_t name) { | 68 | int32_t max_sessions, bool is_light, uint64_t name) { |
| 69 | UNIMPLEMENTED(); | 69 | UNIMPLEMENTED(); |
| 70 | R_THROW(ResultNotImplemented); | 70 | R_THROW(ResultNotImplemented); |
| 71 | } | 71 | } |
diff --git a/src/core/hle/kernel/svc/svc_process_memory.cpp b/src/core/hle/kernel/svc/svc_process_memory.cpp index 4dfd9e5bb..8e2fb4092 100644 --- a/src/core/hle/kernel/svc/svc_process_memory.cpp +++ b/src/core/hle/kernel/svc/svc_process_memory.cpp | |||
| @@ -37,8 +37,8 @@ Result SetProcessMemoryPermission(Core::System& system, Handle process_handle, V | |||
| 37 | R_UNLESS(Common::IsAligned(size, PageSize), ResultInvalidSize); | 37 | R_UNLESS(Common::IsAligned(size, PageSize), ResultInvalidSize); |
| 38 | R_UNLESS(size > 0, ResultInvalidSize); | 38 | R_UNLESS(size > 0, ResultInvalidSize); |
| 39 | R_UNLESS((address < address + size), ResultInvalidCurrentMemory); | 39 | R_UNLESS((address < address + size), ResultInvalidCurrentMemory); |
| 40 | R_UNLESS(address == static_cast<uintptr_t>(address), ResultInvalidCurrentMemory); | 40 | R_UNLESS(address == static_cast<uint64_t>(address), ResultInvalidCurrentMemory); |
| 41 | R_UNLESS(size == static_cast<size_t>(size), ResultInvalidCurrentMemory); | 41 | R_UNLESS(size == static_cast<uint64_t>(size), ResultInvalidCurrentMemory); |
| 42 | 42 | ||
| 43 | // Validate the memory permission. | 43 | // Validate the memory permission. |
| 44 | R_UNLESS(IsValidProcessMemoryPermission(perm), ResultInvalidNewMemoryPermission); | 44 | R_UNLESS(IsValidProcessMemoryPermission(perm), ResultInvalidNewMemoryPermission); |
diff --git a/src/core/hle/kernel/svc_generator.py b/src/core/hle/kernel/svc_generator.py index 34d2ac659..0cce69e85 100644 --- a/src/core/hle/kernel/svc_generator.py +++ b/src/core/hle/kernel/svc_generator.py | |||
| @@ -443,7 +443,7 @@ def emit_wrapper(wrapped_fn, suffix, register_info, arguments, byte_size): | |||
| 443 | lines.append("") | 443 | lines.append("") |
| 444 | 444 | ||
| 445 | for output_type, var_name, _, is_address in output_writes: | 445 | for output_type, var_name, _, is_address in output_writes: |
| 446 | output_type = "uintptr_t" if is_address else output_type | 446 | output_type = "uint64_t" if is_address else output_type |
| 447 | lines.append(f"{output_type} {var_name}{{}};") | 447 | lines.append(f"{output_type} {var_name}{{}};") |
| 448 | for input_type, var_name, _ in input_reads: | 448 | for input_type, var_name, _ in input_reads: |
| 449 | lines.append(f"{input_type} {var_name}{{}};") | 449 | lines.append(f"{input_type} {var_name}{{}};") |
| @@ -630,7 +630,7 @@ def emit_call(bitness, names, suffix): | |||
| 630 | def build_fn_declaration(return_type, name, arguments): | 630 | def build_fn_declaration(return_type, name, arguments): |
| 631 | arg_list = ["Core::System& system"] | 631 | arg_list = ["Core::System& system"] |
| 632 | for arg in arguments: | 632 | for arg in arguments: |
| 633 | type_name = "uintptr_t" if arg.is_address else arg.type_name | 633 | type_name = "uint64_t" if arg.is_address else arg.type_name |
| 634 | pointer = "*" if arg.is_output and not arg.is_outptr else "" | 634 | pointer = "*" if arg.is_output and not arg.is_outptr else "" |
| 635 | arg_list.append(f"{type_name}{pointer} {arg.var_name}") | 635 | arg_list.append(f"{type_name}{pointer} {arg.var_name}") |
| 636 | 636 | ||
diff --git a/src/core/hle/service/sockets/sockets.h b/src/core/hle/service/sockets/sockets.h index 31b7dad33..9840c11f9 100644 --- a/src/core/hle/service/sockets/sockets.h +++ b/src/core/hle/service/sockets/sockets.h | |||
| @@ -23,6 +23,7 @@ enum class Errno : u32 { | |||
| 23 | INVAL = 22, | 23 | INVAL = 22, |
| 24 | MFILE = 24, | 24 | MFILE = 24, |
| 25 | MSGSIZE = 90, | 25 | MSGSIZE = 90, |
| 26 | CONNRESET = 104, | ||
| 26 | NOTCONN = 107, | 27 | NOTCONN = 107, |
| 27 | TIMEDOUT = 110, | 28 | TIMEDOUT = 110, |
| 28 | }; | 29 | }; |
diff --git a/src/core/hle/service/sockets/sockets_translate.cpp b/src/core/hle/service/sockets/sockets_translate.cpp index 023aa0486..594e58f90 100644 --- a/src/core/hle/service/sockets/sockets_translate.cpp +++ b/src/core/hle/service/sockets/sockets_translate.cpp | |||
| @@ -27,6 +27,8 @@ Errno Translate(Network::Errno value) { | |||
| 27 | return Errno::NOTCONN; | 27 | return Errno::NOTCONN; |
| 28 | case Network::Errno::TIMEDOUT: | 28 | case Network::Errno::TIMEDOUT: |
| 29 | return Errno::TIMEDOUT; | 29 | return Errno::TIMEDOUT; |
| 30 | case Network::Errno::CONNRESET: | ||
| 31 | return Errno::CONNRESET; | ||
| 30 | default: | 32 | default: |
| 31 | UNIMPLEMENTED_MSG("Unimplemented errno={}", value); | 33 | UNIMPLEMENTED_MSG("Unimplemented errno={}", value); |
| 32 | return Errno::SUCCESS; | 34 | return Errno::SUCCESS; |
diff --git a/src/core/internal_network/network.cpp b/src/core/internal_network/network.cpp index 7494fb62d..f85c73ca6 100644 --- a/src/core/internal_network/network.cpp +++ b/src/core/internal_network/network.cpp | |||
| @@ -109,6 +109,8 @@ Errno TranslateNativeError(int e) { | |||
| 109 | return Errno::AGAIN; | 109 | return Errno::AGAIN; |
| 110 | case WSAECONNREFUSED: | 110 | case WSAECONNREFUSED: |
| 111 | return Errno::CONNREFUSED; | 111 | return Errno::CONNREFUSED; |
| 112 | case WSAECONNRESET: | ||
| 113 | return Errno::CONNRESET; | ||
| 112 | case WSAEHOSTUNREACH: | 114 | case WSAEHOSTUNREACH: |
| 113 | return Errno::HOSTUNREACH; | 115 | return Errno::HOSTUNREACH; |
| 114 | case WSAENETDOWN: | 116 | case WSAENETDOWN: |
| @@ -205,6 +207,8 @@ Errno TranslateNativeError(int e) { | |||
| 205 | return Errno::AGAIN; | 207 | return Errno::AGAIN; |
| 206 | case ECONNREFUSED: | 208 | case ECONNREFUSED: |
| 207 | return Errno::CONNREFUSED; | 209 | return Errno::CONNREFUSED; |
| 210 | case ECONNRESET: | ||
| 211 | return Errno::CONNRESET; | ||
| 208 | case EHOSTUNREACH: | 212 | case EHOSTUNREACH: |
| 209 | return Errno::HOSTUNREACH; | 213 | return Errno::HOSTUNREACH; |
| 210 | case ENETDOWN: | 214 | case ENETDOWN: |
diff --git a/src/core/internal_network/network.h b/src/core/internal_network/network.h index 36994c22e..1e09a007a 100644 --- a/src/core/internal_network/network.h +++ b/src/core/internal_network/network.h | |||
| @@ -30,6 +30,7 @@ enum class Errno { | |||
| 30 | NOTCONN, | 30 | NOTCONN, |
| 31 | AGAIN, | 31 | AGAIN, |
| 32 | CONNREFUSED, | 32 | CONNREFUSED, |
| 33 | CONNRESET, | ||
| 33 | HOSTUNREACH, | 34 | HOSTUNREACH, |
| 34 | NETDOWN, | 35 | NETDOWN, |
| 35 | NETUNREACH, | 36 | NETUNREACH, |
diff --git a/src/video_core/buffer_cache/buffer_base.h b/src/video_core/buffer_cache/buffer_base.h index 92d77eef2..1b4d63616 100644 --- a/src/video_core/buffer_cache/buffer_base.h +++ b/src/video_core/buffer_cache/buffer_base.h | |||
| @@ -568,7 +568,7 @@ private: | |||
| 568 | const u64* const state_words = Array<type>(); | 568 | const u64* const state_words = Array<type>(); |
| 569 | const u64 num_query_words = size / BYTES_PER_WORD + 1; | 569 | const u64 num_query_words = size / BYTES_PER_WORD + 1; |
| 570 | const u64 word_begin = offset / BYTES_PER_WORD; | 570 | const u64 word_begin = offset / BYTES_PER_WORD; |
| 571 | const u64 word_end = std::min(word_begin + num_query_words, NumWords()); | 571 | const u64 word_end = std::min<u64>(word_begin + num_query_words, NumWords()); |
| 572 | const u64 page_base = offset / BYTES_PER_PAGE; | 572 | const u64 page_base = offset / BYTES_PER_PAGE; |
| 573 | const u64 page_limit = Common::DivCeil(offset + size, BYTES_PER_PAGE); | 573 | const u64 page_limit = Common::DivCeil(offset + size, BYTES_PER_PAGE); |
| 574 | u64 begin = std::numeric_limits<u64>::max(); | 574 | u64 begin = std::numeric_limits<u64>::max(); |
diff --git a/src/web_service/web_backend.cpp b/src/web_service/web_backend.cpp index 12a7e4922..dff380cca 100644 --- a/src/web_service/web_backend.cpp +++ b/src/web_service/web_backend.cpp | |||
| @@ -71,7 +71,7 @@ struct Client::Impl { | |||
| 71 | const std::string& jwt_ = "", const std::string& username_ = "", | 71 | const std::string& jwt_ = "", const std::string& username_ = "", |
| 72 | const std::string& token_ = "") { | 72 | const std::string& token_ = "") { |
| 73 | if (cli == nullptr) { | 73 | if (cli == nullptr) { |
| 74 | cli = std::make_unique<httplib::Client>(host.c_str()); | 74 | cli = std::make_unique<httplib::Client>(host); |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | if (!cli->is_valid()) { | 77 | if (!cli->is_valid()) { |
diff --git a/src/yuzu/discord_impl.cpp b/src/yuzu/discord_impl.cpp index 29cec7acd..ac2fc1bcb 100644 --- a/src/yuzu/discord_impl.cpp +++ b/src/yuzu/discord_impl.cpp | |||
| @@ -78,7 +78,7 @@ void DiscordImpl::Update() { | |||
| 78 | cli.set_connection_timeout(std::chrono::seconds(3)); | 78 | cli.set_connection_timeout(std::chrono::seconds(3)); |
| 79 | cli.set_read_timeout(std::chrono::seconds(3)); | 79 | cli.set_read_timeout(std::chrono::seconds(3)); |
| 80 | 80 | ||
| 81 | if (auto res = cli.Head(fmt::format("/images/game/boxart/{}.png", icon_name).c_str())) { | 81 | if (auto res = cli.Head(fmt::format("/images/game/boxart/{}.png", icon_name))) { |
| 82 | if (res->status == 200) { | 82 | if (res->status == 200) { |
| 83 | game_cover_url += fmt::format("/images/game/boxart/{}.png", icon_name); | 83 | game_cover_url += fmt::format("/images/game/boxart/{}.png", icon_name); |
| 84 | } else { | 84 | } else { |