mirror of
https://github.com/pineappleEA/pineapple-src.git
synced 2024-12-01 07:18:25 -05:00
early-access version 3412
This commit is contained in:
parent
2dc56490ff
commit
9a82fd9a3b
@ -241,7 +241,7 @@ endif()
|
|||||||
|
|
||||||
if (ENABLE_WEB_SERVICE)
|
if (ENABLE_WEB_SERVICE)
|
||||||
find_package(cpp-jwt 1.4 CONFIG)
|
find_package(cpp-jwt 1.4 CONFIG)
|
||||||
find_package(httplib 0.11 MODULE)
|
find_package(httplib 0.12 MODULE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (YUZU_TESTS)
|
if (YUZU_TESTS)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 3411.
|
This is the source code for early-access 3412.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
@ -147,9 +147,21 @@ public:
|
|||||||
return server_manager;
|
return server_manager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: remove this when sm: is implemented with the proper IUserInterface
|
||||||
|
// abstraction, creating a new C++ handler object for each session:
|
||||||
|
|
||||||
|
bool GetIsInitializedForSm() const {
|
||||||
|
return is_initialized_for_sm;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetIsInitializedForSm() {
|
||||||
|
is_initialized_for_sm = true;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool convert_to_domain{};
|
bool convert_to_domain{};
|
||||||
bool is_domain{};
|
bool is_domain{};
|
||||||
|
bool is_initialized_for_sm{};
|
||||||
SessionRequestHandlerPtr session_handler;
|
SessionRequestHandlerPtr session_handler;
|
||||||
std::vector<SessionRequestHandlerPtr> domain_handlers;
|
std::vector<SessionRequestHandlerPtr> domain_handlers;
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ static_assert(sizeof(uint64_t) == 8);
|
|||||||
static void SvcWrap_SetHeapSize64From32(Core::System& system) {
|
static void SvcWrap_SetHeapSize64From32(Core::System& system) {
|
||||||
Result ret{};
|
Result ret{};
|
||||||
|
|
||||||
uintptr_t out_address{};
|
uint64_t out_address{};
|
||||||
uint32_t size{};
|
uint32_t size{};
|
||||||
|
|
||||||
size = Convert<uint32_t>(GetReg32(system, 1));
|
size = Convert<uint32_t>(GetReg32(system, 1));
|
||||||
@ -729,7 +729,7 @@ static void SvcWrap_GetLastThreadInfo64From32(Core::System& system) {
|
|||||||
Result ret{};
|
Result ret{};
|
||||||
|
|
||||||
ilp32::LastThreadContext out_context{};
|
ilp32::LastThreadContext out_context{};
|
||||||
uintptr_t out_tls_address{};
|
uint64_t out_tls_address{};
|
||||||
uint32_t out_flags{};
|
uint32_t out_flags{};
|
||||||
|
|
||||||
ret = GetLastThreadInfo64From32(system, &out_context, &out_tls_address, &out_flags);
|
ret = GetLastThreadInfo64From32(system, &out_context, &out_tls_address, &out_flags);
|
||||||
@ -1278,8 +1278,8 @@ static void SvcWrap_QueryPhysicalAddress64From32(Core::System& system) {
|
|||||||
static void SvcWrap_QueryIoMapping64From32(Core::System& system) {
|
static void SvcWrap_QueryIoMapping64From32(Core::System& system) {
|
||||||
Result ret{};
|
Result ret{};
|
||||||
|
|
||||||
uintptr_t out_address{};
|
uint64_t out_address{};
|
||||||
uintptr_t out_size{};
|
uint64_t out_size{};
|
||||||
uint64_t physical_address{};
|
uint64_t physical_address{};
|
||||||
uint32_t size{};
|
uint32_t size{};
|
||||||
|
|
||||||
@ -2088,7 +2088,7 @@ static void SvcWrap_UnmapInsecureMemory64From32(Core::System& system) {
|
|||||||
static void SvcWrap_SetHeapSize64(Core::System& system) {
|
static void SvcWrap_SetHeapSize64(Core::System& system) {
|
||||||
Result ret{};
|
Result ret{};
|
||||||
|
|
||||||
uintptr_t out_address{};
|
uint64_t out_address{};
|
||||||
uint64_t size{};
|
uint64_t size{};
|
||||||
|
|
||||||
size = Convert<uint64_t>(GetReg64(system, 1));
|
size = Convert<uint64_t>(GetReg64(system, 1));
|
||||||
@ -2705,7 +2705,7 @@ static void SvcWrap_GetLastThreadInfo64(Core::System& system) {
|
|||||||
Result ret{};
|
Result ret{};
|
||||||
|
|
||||||
lp64::LastThreadContext out_context{};
|
lp64::LastThreadContext out_context{};
|
||||||
uintptr_t out_tls_address{};
|
uint64_t out_tls_address{};
|
||||||
uint32_t out_flags{};
|
uint32_t out_flags{};
|
||||||
|
|
||||||
ret = GetLastThreadInfo64(system, &out_context, &out_tls_address, &out_flags);
|
ret = GetLastThreadInfo64(system, &out_context, &out_tls_address, &out_flags);
|
||||||
@ -3217,8 +3217,8 @@ static void SvcWrap_QueryPhysicalAddress64(Core::System& system) {
|
|||||||
static void SvcWrap_QueryIoMapping64(Core::System& system) {
|
static void SvcWrap_QueryIoMapping64(Core::System& system) {
|
||||||
Result ret{};
|
Result ret{};
|
||||||
|
|
||||||
uintptr_t out_address{};
|
uint64_t out_address{};
|
||||||
uintptr_t out_size{};
|
uint64_t out_size{};
|
||||||
uint64_t physical_address{};
|
uint64_t physical_address{};
|
||||||
uint64_t size{};
|
uint64_t size{};
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ class System;
|
|||||||
namespace Kernel::Svc {
|
namespace Kernel::Svc {
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
Result SetHeapSize(Core::System& system, uintptr_t* out_address, uint64_t size);
|
Result SetHeapSize(Core::System& system, uint64_t* out_address, uint64_t size);
|
||||||
Result SetMemoryPermission(Core::System& system, uint64_t address, uint64_t size, MemoryPermission perm);
|
Result SetMemoryPermission(Core::System& system, uint64_t address, uint64_t size, MemoryPermission perm);
|
||||||
Result SetMemoryAttribute(Core::System& system, uint64_t address, uint64_t size, uint32_t mask, uint32_t attr);
|
Result SetMemoryAttribute(Core::System& system, uint64_t address, uint64_t size, uint32_t mask, uint32_t attr);
|
||||||
Result MapMemory(Core::System& system, uint64_t dst_address, uint64_t src_address, uint64_t size);
|
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);
|
|||||||
Result MapPhysicalMemory(Core::System& system, uint64_t address, uint64_t size);
|
Result MapPhysicalMemory(Core::System& system, uint64_t address, uint64_t size);
|
||||||
Result UnmapPhysicalMemory(Core::System& system, uint64_t address, uint64_t size);
|
Result UnmapPhysicalMemory(Core::System& system, uint64_t address, uint64_t size);
|
||||||
Result GetDebugFutureThreadInfo(Core::System& system, lp64::LastThreadContext* out_context, uint64_t* out_thread_id, Handle debug_handle, int64_t ns);
|
Result GetDebugFutureThreadInfo(Core::System& system, lp64::LastThreadContext* out_context, uint64_t* out_thread_id, Handle debug_handle, int64_t ns);
|
||||||
Result GetLastThreadInfo(Core::System& system, lp64::LastThreadContext* out_context, uintptr_t* out_tls_address, uint32_t* out_flags);
|
Result GetLastThreadInfo(Core::System& system, lp64::LastThreadContext* out_context, uint64_t* out_tls_address, uint32_t* out_flags);
|
||||||
Result GetResourceLimitLimitValue(Core::System& system, int64_t* out_limit_value, Handle resource_limit_handle, LimitableResource which);
|
Result GetResourceLimitLimitValue(Core::System& system, int64_t* out_limit_value, Handle resource_limit_handle, LimitableResource which);
|
||||||
Result GetResourceLimitCurrentValue(Core::System& system, int64_t* out_current_value, Handle resource_limit_handle, LimitableResource which);
|
Result GetResourceLimitCurrentValue(Core::System& system, int64_t* out_current_value, Handle resource_limit_handle, LimitableResource which);
|
||||||
Result SetThreadActivity(Core::System& system, Handle thread_handle, ThreadActivity thread_activity);
|
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
|
|||||||
Result UnmapTransferMemory(Core::System& system, Handle trmem_handle, uint64_t address, uint64_t size);
|
Result UnmapTransferMemory(Core::System& system, Handle trmem_handle, uint64_t address, uint64_t size);
|
||||||
Result CreateInterruptEvent(Core::System& system, Handle* out_read_handle, int32_t interrupt_id, InterruptType interrupt_type);
|
Result CreateInterruptEvent(Core::System& system, Handle* out_read_handle, int32_t interrupt_id, InterruptType interrupt_type);
|
||||||
Result QueryPhysicalAddress(Core::System& system, lp64::PhysicalMemoryInfo* out_info, uint64_t address);
|
Result QueryPhysicalAddress(Core::System& system, lp64::PhysicalMemoryInfo* out_info, uint64_t address);
|
||||||
Result QueryIoMapping(Core::System& system, uintptr_t* out_address, uintptr_t* out_size, uint64_t physical_address, uint64_t size);
|
Result QueryIoMapping(Core::System& system, uint64_t* out_address, uint64_t* out_size, uint64_t physical_address, uint64_t size);
|
||||||
Result CreateDeviceAddressSpace(Core::System& system, Handle* out_handle, uint64_t das_address, uint64_t das_size);
|
Result CreateDeviceAddressSpace(Core::System& system, Handle* out_handle, uint64_t das_address, uint64_t das_size);
|
||||||
Result AttachDeviceAddressSpace(Core::System& system, DeviceName device_name, Handle das_handle);
|
Result AttachDeviceAddressSpace(Core::System& system, DeviceName device_name, Handle das_handle);
|
||||||
Result DetachDeviceAddressSpace(Core::System& system, DeviceName device_name, Handle das_handle);
|
Result DetachDeviceAddressSpace(Core::System& system, DeviceName device_name, Handle das_handle);
|
||||||
@ -137,7 +137,7 @@ Result SetResourceLimitLimitValue(Core::System& system, Handle resource_limit_ha
|
|||||||
Result MapInsecureMemory(Core::System& system, uint64_t address, uint64_t size);
|
Result MapInsecureMemory(Core::System& system, uint64_t address, uint64_t size);
|
||||||
Result UnmapInsecureMemory(Core::System& system, uint64_t address, uint64_t size);
|
Result UnmapInsecureMemory(Core::System& system, uint64_t address, uint64_t size);
|
||||||
|
|
||||||
Result SetHeapSize64From32(Core::System& system, uintptr_t* out_address, uint32_t size);
|
Result SetHeapSize64From32(Core::System& system, uint64_t* out_address, uint32_t size);
|
||||||
Result SetMemoryPermission64From32(Core::System& system, uint32_t address, uint32_t size, MemoryPermission perm);
|
Result SetMemoryPermission64From32(Core::System& system, uint32_t address, uint32_t size, MemoryPermission perm);
|
||||||
Result SetMemoryAttribute64From32(Core::System& system, uint32_t address, uint32_t size, uint32_t mask, uint32_t attr);
|
Result SetMemoryAttribute64From32(Core::System& system, uint32_t address, uint32_t size, uint32_t mask, uint32_t attr);
|
||||||
Result MapMemory64From32(Core::System& system, uint32_t dst_address, uint32_t src_address, uint32_t size);
|
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
|
|||||||
Result MapPhysicalMemory64From32(Core::System& system, uint32_t address, uint32_t size);
|
Result MapPhysicalMemory64From32(Core::System& system, uint32_t address, uint32_t size);
|
||||||
Result UnmapPhysicalMemory64From32(Core::System& system, uint32_t address, uint32_t size);
|
Result UnmapPhysicalMemory64From32(Core::System& system, uint32_t address, uint32_t size);
|
||||||
Result GetDebugFutureThreadInfo64From32(Core::System& system, ilp32::LastThreadContext* out_context, uint64_t* out_thread_id, Handle debug_handle, int64_t ns);
|
Result GetDebugFutureThreadInfo64From32(Core::System& system, ilp32::LastThreadContext* out_context, uint64_t* out_thread_id, Handle debug_handle, int64_t ns);
|
||||||
Result GetLastThreadInfo64From32(Core::System& system, ilp32::LastThreadContext* out_context, uintptr_t* out_tls_address, uint32_t* out_flags);
|
Result GetLastThreadInfo64From32(Core::System& system, ilp32::LastThreadContext* out_context, uint64_t* out_tls_address, uint32_t* out_flags);
|
||||||
Result GetResourceLimitLimitValue64From32(Core::System& system, int64_t* out_limit_value, Handle resource_limit_handle, LimitableResource which);
|
Result GetResourceLimitLimitValue64From32(Core::System& system, int64_t* out_limit_value, Handle resource_limit_handle, LimitableResource which);
|
||||||
Result GetResourceLimitCurrentValue64From32(Core::System& system, int64_t* out_current_value, Handle resource_limit_handle, LimitableResource which);
|
Result GetResourceLimitCurrentValue64From32(Core::System& system, int64_t* out_current_value, Handle resource_limit_handle, LimitableResource which);
|
||||||
Result SetThreadActivity64From32(Core::System& system, Handle thread_handle, ThreadActivity thread_activity);
|
Result SetThreadActivity64From32(Core::System& system, Handle thread_handle, ThreadActivity thread_activity);
|
||||||
@ -215,7 +215,7 @@ Result MapTransferMemory64From32(Core::System& system, Handle trmem_handle, uint
|
|||||||
Result UnmapTransferMemory64From32(Core::System& system, Handle trmem_handle, uint32_t address, uint32_t size);
|
Result UnmapTransferMemory64From32(Core::System& system, Handle trmem_handle, uint32_t address, uint32_t size);
|
||||||
Result CreateInterruptEvent64From32(Core::System& system, Handle* out_read_handle, int32_t interrupt_id, InterruptType interrupt_type);
|
Result CreateInterruptEvent64From32(Core::System& system, Handle* out_read_handle, int32_t interrupt_id, InterruptType interrupt_type);
|
||||||
Result QueryPhysicalAddress64From32(Core::System& system, ilp32::PhysicalMemoryInfo* out_info, uint32_t address);
|
Result QueryPhysicalAddress64From32(Core::System& system, ilp32::PhysicalMemoryInfo* out_info, uint32_t address);
|
||||||
Result QueryIoMapping64From32(Core::System& system, uintptr_t* out_address, uintptr_t* out_size, uint64_t physical_address, uint32_t size);
|
Result QueryIoMapping64From32(Core::System& system, uint64_t* out_address, uint64_t* out_size, uint64_t physical_address, uint32_t size);
|
||||||
Result CreateDeviceAddressSpace64From32(Core::System& system, Handle* out_handle, uint64_t das_address, uint64_t das_size);
|
Result CreateDeviceAddressSpace64From32(Core::System& system, Handle* out_handle, uint64_t das_address, uint64_t das_size);
|
||||||
Result AttachDeviceAddressSpace64From32(Core::System& system, DeviceName device_name, Handle das_handle);
|
Result AttachDeviceAddressSpace64From32(Core::System& system, DeviceName device_name, Handle das_handle);
|
||||||
Result DetachDeviceAddressSpace64From32(Core::System& system, DeviceName device_name, Handle das_handle);
|
Result DetachDeviceAddressSpace64From32(Core::System& system, DeviceName device_name, Handle das_handle);
|
||||||
@ -258,7 +258,7 @@ Result SetResourceLimitLimitValue64From32(Core::System& system, Handle resource_
|
|||||||
Result MapInsecureMemory64From32(Core::System& system, uint32_t address, uint32_t size);
|
Result MapInsecureMemory64From32(Core::System& system, uint32_t address, uint32_t size);
|
||||||
Result UnmapInsecureMemory64From32(Core::System& system, uint32_t address, uint32_t size);
|
Result UnmapInsecureMemory64From32(Core::System& system, uint32_t address, uint32_t size);
|
||||||
|
|
||||||
Result SetHeapSize64(Core::System& system, uintptr_t* out_address, uint64_t size);
|
Result SetHeapSize64(Core::System& system, uint64_t* out_address, uint64_t size);
|
||||||
Result SetMemoryPermission64(Core::System& system, uint64_t address, uint64_t size, MemoryPermission perm);
|
Result SetMemoryPermission64(Core::System& system, uint64_t address, uint64_t size, MemoryPermission perm);
|
||||||
Result SetMemoryAttribute64(Core::System& system, uint64_t address, uint64_t size, uint32_t mask, uint32_t attr);
|
Result SetMemoryAttribute64(Core::System& system, uint64_t address, uint64_t size, uint32_t mask, uint32_t attr);
|
||||||
Result MapMemory64(Core::System& system, uint64_t dst_address, uint64_t src_address, uint64_t size);
|
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);
|
|||||||
Result MapPhysicalMemory64(Core::System& system, uint64_t address, uint64_t size);
|
Result MapPhysicalMemory64(Core::System& system, uint64_t address, uint64_t size);
|
||||||
Result UnmapPhysicalMemory64(Core::System& system, uint64_t address, uint64_t size);
|
Result UnmapPhysicalMemory64(Core::System& system, uint64_t address, uint64_t size);
|
||||||
Result GetDebugFutureThreadInfo64(Core::System& system, lp64::LastThreadContext* out_context, uint64_t* out_thread_id, Handle debug_handle, int64_t ns);
|
Result GetDebugFutureThreadInfo64(Core::System& system, lp64::LastThreadContext* out_context, uint64_t* out_thread_id, Handle debug_handle, int64_t ns);
|
||||||
Result GetLastThreadInfo64(Core::System& system, lp64::LastThreadContext* out_context, uintptr_t* out_tls_address, uint32_t* out_flags);
|
Result GetLastThreadInfo64(Core::System& system, lp64::LastThreadContext* out_context, uint64_t* out_tls_address, uint32_t* out_flags);
|
||||||
Result GetResourceLimitLimitValue64(Core::System& system, int64_t* out_limit_value, Handle resource_limit_handle, LimitableResource which);
|
Result GetResourceLimitLimitValue64(Core::System& system, int64_t* out_limit_value, Handle resource_limit_handle, LimitableResource which);
|
||||||
Result GetResourceLimitCurrentValue64(Core::System& system, int64_t* out_current_value, Handle resource_limit_handle, LimitableResource which);
|
Result GetResourceLimitCurrentValue64(Core::System& system, int64_t* out_current_value, Handle resource_limit_handle, LimitableResource which);
|
||||||
Result SetThreadActivity64(Core::System& system, Handle thread_handle, ThreadActivity thread_activity);
|
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
|
|||||||
Result UnmapTransferMemory64(Core::System& system, Handle trmem_handle, uint64_t address, uint64_t size);
|
Result UnmapTransferMemory64(Core::System& system, Handle trmem_handle, uint64_t address, uint64_t size);
|
||||||
Result CreateInterruptEvent64(Core::System& system, Handle* out_read_handle, int32_t interrupt_id, InterruptType interrupt_type);
|
Result CreateInterruptEvent64(Core::System& system, Handle* out_read_handle, int32_t interrupt_id, InterruptType interrupt_type);
|
||||||
Result QueryPhysicalAddress64(Core::System& system, lp64::PhysicalMemoryInfo* out_info, uint64_t address);
|
Result QueryPhysicalAddress64(Core::System& system, lp64::PhysicalMemoryInfo* out_info, uint64_t address);
|
||||||
Result QueryIoMapping64(Core::System& system, uintptr_t* out_address, uintptr_t* out_size, uint64_t physical_address, uint64_t size);
|
Result QueryIoMapping64(Core::System& system, uint64_t* out_address, uint64_t* out_size, uint64_t physical_address, uint64_t size);
|
||||||
Result CreateDeviceAddressSpace64(Core::System& system, Handle* out_handle, uint64_t das_address, uint64_t das_size);
|
Result CreateDeviceAddressSpace64(Core::System& system, Handle* out_handle, uint64_t das_address, uint64_t das_size);
|
||||||
Result AttachDeviceAddressSpace64(Core::System& system, DeviceName device_name, Handle das_handle);
|
Result AttachDeviceAddressSpace64(Core::System& system, DeviceName device_name, Handle das_handle);
|
||||||
Result DetachDeviceAddressSpace64(Core::System& system, DeviceName device_name, Handle das_handle);
|
Result DetachDeviceAddressSpace64(Core::System& system, DeviceName device_name, Handle das_handle);
|
||||||
|
@ -12,7 +12,7 @@ Result QueryPhysicalAddress(Core::System& system, lp64::PhysicalMemoryInfo* out_
|
|||||||
R_THROW(ResultNotImplemented);
|
R_THROW(ResultNotImplemented);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result QueryIoMapping(Core::System& system, uintptr_t* out_address, uintptr_t* out_size,
|
Result QueryIoMapping(Core::System& system, uint64_t* out_address, uint64_t* out_size,
|
||||||
uint64_t physical_address, uint64_t size) {
|
uint64_t physical_address, uint64_t size) {
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
R_THROW(ResultNotImplemented);
|
R_THROW(ResultNotImplemented);
|
||||||
@ -23,7 +23,7 @@ Result QueryPhysicalAddress64(Core::System& system, lp64::PhysicalMemoryInfo* ou
|
|||||||
R_RETURN(QueryPhysicalAddress(system, out_info, address));
|
R_RETURN(QueryPhysicalAddress(system, out_info, address));
|
||||||
}
|
}
|
||||||
|
|
||||||
Result QueryIoMapping64(Core::System& system, uintptr_t* out_address, uintptr_t* out_size,
|
Result QueryIoMapping64(Core::System& system, uint64_t* out_address, uint64_t* out_size,
|
||||||
uint64_t physical_address, uint64_t size) {
|
uint64_t physical_address, uint64_t size) {
|
||||||
R_RETURN(QueryIoMapping(system, out_address, out_size, physical_address, size));
|
R_RETURN(QueryIoMapping(system, out_address, out_size, physical_address, size));
|
||||||
}
|
}
|
||||||
@ -41,10 +41,10 @@ Result QueryPhysicalAddress64From32(Core::System& system, ilp32::PhysicalMemoryI
|
|||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
||||||
Result QueryIoMapping64From32(Core::System& system, uintptr_t* out_address, uintptr_t* out_size,
|
Result QueryIoMapping64From32(Core::System& system, uint64_t* out_address, uint64_t* out_size,
|
||||||
uint64_t physical_address, uint32_t size) {
|
uint64_t physical_address, uint32_t size) {
|
||||||
R_RETURN(QueryIoMapping(system, reinterpret_cast<uintptr_t*>(out_address),
|
R_RETURN(QueryIoMapping(system, reinterpret_cast<uint64_t*>(out_address),
|
||||||
reinterpret_cast<uintptr_t*>(out_size), physical_address, size));
|
reinterpret_cast<uint64_t*>(out_size), physical_address, size));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Kernel::Svc
|
} // namespace Kernel::Svc
|
||||||
|
@ -13,7 +13,7 @@ void FlushEntireDataCache(Core::System& system) {
|
|||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
}
|
}
|
||||||
|
|
||||||
Result FlushDataCache(Core::System& system, VAddr address, size_t size) {
|
Result FlushDataCache(Core::System& system, uint64_t address, uint64_t size) {
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
R_THROW(ResultNotImplemented);
|
R_THROW(ResultNotImplemented);
|
||||||
}
|
}
|
||||||
@ -33,8 +33,8 @@ Result StoreProcessDataCache(Core::System& system, Handle process_handle, uint64
|
|||||||
Result FlushProcessDataCache(Core::System& system, Handle process_handle, u64 address, u64 size) {
|
Result FlushProcessDataCache(Core::System& system, Handle process_handle, u64 address, u64 size) {
|
||||||
// Validate address/size.
|
// Validate address/size.
|
||||||
R_UNLESS(size > 0, ResultInvalidSize);
|
R_UNLESS(size > 0, ResultInvalidSize);
|
||||||
R_UNLESS(address == static_cast<uintptr_t>(address), ResultInvalidCurrentMemory);
|
R_UNLESS(address == static_cast<uint64_t>(address), ResultInvalidCurrentMemory);
|
||||||
R_UNLESS(size == static_cast<size_t>(size), ResultInvalidCurrentMemory);
|
R_UNLESS(size == static_cast<uint64_t>(size), ResultInvalidCurrentMemory);
|
||||||
|
|
||||||
// Get the process from its handle.
|
// Get the process from its handle.
|
||||||
KScopedAutoObject process =
|
KScopedAutoObject process =
|
||||||
@ -53,7 +53,7 @@ void FlushEntireDataCache64(Core::System& system) {
|
|||||||
FlushEntireDataCache(system);
|
FlushEntireDataCache(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result FlushDataCache64(Core::System& system, VAddr address, size_t size) {
|
Result FlushDataCache64(Core::System& system, uint64_t address, uint64_t size) {
|
||||||
R_RETURN(FlushDataCache(system, address, size));
|
R_RETURN(FlushDataCache(system, address, size));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ constexpr bool IsValidUnmapFromOwnerCodeMemoryPermission(MemoryPermission perm)
|
|||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
Result CreateCodeMemory(Core::System& system, Handle* out, VAddr address, size_t size) {
|
Result CreateCodeMemory(Core::System& system, Handle* out, VAddr address, uint64_t size) {
|
||||||
LOG_TRACE(Kernel_SVC, "called, address=0x{:X}, size=0x{:X}", address, size);
|
LOG_TRACE(Kernel_SVC, "called, address=0x{:X}, size=0x{:X}", address, size);
|
||||||
|
|
||||||
// Get kernel instance.
|
// Get kernel instance.
|
||||||
@ -64,7 +64,7 @@ Result CreateCodeMemory(Core::System& system, Handle* out, VAddr address, size_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
Result ControlCodeMemory(Core::System& system, Handle code_memory_handle,
|
Result ControlCodeMemory(Core::System& system, Handle code_memory_handle,
|
||||||
CodeMemoryOperation operation, VAddr address, size_t size,
|
CodeMemoryOperation operation, VAddr address, uint64_t size,
|
||||||
MemoryPermission perm) {
|
MemoryPermission perm) {
|
||||||
|
|
||||||
LOG_TRACE(Kernel_SVC,
|
LOG_TRACE(Kernel_SVC,
|
||||||
|
@ -45,19 +45,19 @@ Result SetDebugThreadContext(Core::System& system, Handle debug_handle, uint64_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
Result QueryDebugProcessMemory(Core::System& system, uint64_t out_memory_info,
|
Result QueryDebugProcessMemory(Core::System& system, uint64_t out_memory_info,
|
||||||
PageInfo* out_page_info, Handle debug_handle, uintptr_t address) {
|
PageInfo* out_page_info, Handle process_handle, uint64_t address) {
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
R_THROW(ResultNotImplemented);
|
R_THROW(ResultNotImplemented);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result ReadDebugProcessMemory(Core::System& system, uintptr_t buffer, Handle debug_handle,
|
Result ReadDebugProcessMemory(Core::System& system, uint64_t buffer, Handle debug_handle,
|
||||||
uintptr_t address, size_t size) {
|
uint64_t address, uint64_t size) {
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
R_THROW(ResultNotImplemented);
|
R_THROW(ResultNotImplemented);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result WriteDebugProcessMemory(Core::System& system, Handle debug_handle, uintptr_t buffer,
|
Result WriteDebugProcessMemory(Core::System& system, Handle debug_handle, uint64_t buffer,
|
||||||
uintptr_t address, size_t size) {
|
uint64_t address, uint64_t size) {
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
R_THROW(ResultNotImplemented);
|
R_THROW(ResultNotImplemented);
|
||||||
}
|
}
|
||||||
|
@ -76,8 +76,8 @@ constexpr bool IsValidDeviceMemoryPermission(MemoryPermission device_perm) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Result MapDeviceAddressSpaceByForce(Core::System& system, Handle das_handle, Handle process_handle,
|
Result MapDeviceAddressSpaceByForce(Core::System& system, Handle das_handle, Handle process_handle,
|
||||||
uint64_t process_address, size_t size, uint64_t device_address,
|
uint64_t process_address, uint64_t size,
|
||||||
u32 option) {
|
uint64_t device_address, u32 option) {
|
||||||
// Decode the option.
|
// Decode the option.
|
||||||
const MapDeviceAddressSpaceOption option_pack{option};
|
const MapDeviceAddressSpaceOption option_pack{option};
|
||||||
const auto device_perm = option_pack.permission;
|
const auto device_perm = option_pack.permission;
|
||||||
@ -90,7 +90,7 @@ Result MapDeviceAddressSpaceByForce(Core::System& system, Handle das_handle, Han
|
|||||||
R_UNLESS(size > 0, ResultInvalidSize);
|
R_UNLESS(size > 0, ResultInvalidSize);
|
||||||
R_UNLESS((process_address < process_address + size), ResultInvalidCurrentMemory);
|
R_UNLESS((process_address < process_address + size), ResultInvalidCurrentMemory);
|
||||||
R_UNLESS((device_address < device_address + size), ResultInvalidMemoryRegion);
|
R_UNLESS((device_address < device_address + size), ResultInvalidMemoryRegion);
|
||||||
R_UNLESS((process_address == static_cast<uintptr_t>(process_address)),
|
R_UNLESS((process_address == static_cast<uint64_t>(process_address)),
|
||||||
ResultInvalidCurrentMemory);
|
ResultInvalidCurrentMemory);
|
||||||
R_UNLESS(IsValidDeviceMemoryPermission(device_perm), ResultInvalidNewMemoryPermission);
|
R_UNLESS(IsValidDeviceMemoryPermission(device_perm), ResultInvalidNewMemoryPermission);
|
||||||
R_UNLESS(reserved == 0, ResultInvalidEnumValue);
|
R_UNLESS(reserved == 0, ResultInvalidEnumValue);
|
||||||
@ -116,8 +116,8 @@ Result MapDeviceAddressSpaceByForce(Core::System& system, Handle das_handle, Han
|
|||||||
}
|
}
|
||||||
|
|
||||||
Result MapDeviceAddressSpaceAligned(Core::System& system, Handle das_handle, Handle process_handle,
|
Result MapDeviceAddressSpaceAligned(Core::System& system, Handle das_handle, Handle process_handle,
|
||||||
uint64_t process_address, size_t size, uint64_t device_address,
|
uint64_t process_address, uint64_t size,
|
||||||
u32 option) {
|
uint64_t device_address, u32 option) {
|
||||||
// Decode the option.
|
// Decode the option.
|
||||||
const MapDeviceAddressSpaceOption option_pack{option};
|
const MapDeviceAddressSpaceOption option_pack{option};
|
||||||
const auto device_perm = option_pack.permission;
|
const auto device_perm = option_pack.permission;
|
||||||
@ -131,7 +131,7 @@ Result MapDeviceAddressSpaceAligned(Core::System& system, Handle das_handle, Han
|
|||||||
R_UNLESS(size > 0, ResultInvalidSize);
|
R_UNLESS(size > 0, ResultInvalidSize);
|
||||||
R_UNLESS((process_address < process_address + size), ResultInvalidCurrentMemory);
|
R_UNLESS((process_address < process_address + size), ResultInvalidCurrentMemory);
|
||||||
R_UNLESS((device_address < device_address + size), ResultInvalidMemoryRegion);
|
R_UNLESS((device_address < device_address + size), ResultInvalidMemoryRegion);
|
||||||
R_UNLESS((process_address == static_cast<uintptr_t>(process_address)),
|
R_UNLESS((process_address == static_cast<uint64_t>(process_address)),
|
||||||
ResultInvalidCurrentMemory);
|
ResultInvalidCurrentMemory);
|
||||||
R_UNLESS(IsValidDeviceMemoryPermission(device_perm), ResultInvalidNewMemoryPermission);
|
R_UNLESS(IsValidDeviceMemoryPermission(device_perm), ResultInvalidNewMemoryPermission);
|
||||||
R_UNLESS(reserved == 0, ResultInvalidEnumValue);
|
R_UNLESS(reserved == 0, ResultInvalidEnumValue);
|
||||||
@ -157,7 +157,7 @@ Result MapDeviceAddressSpaceAligned(Core::System& system, Handle das_handle, Han
|
|||||||
}
|
}
|
||||||
|
|
||||||
Result UnmapDeviceAddressSpace(Core::System& system, Handle das_handle, Handle process_handle,
|
Result UnmapDeviceAddressSpace(Core::System& system, Handle das_handle, Handle process_handle,
|
||||||
uint64_t process_address, size_t size, uint64_t device_address) {
|
uint64_t process_address, uint64_t size, uint64_t device_address) {
|
||||||
// Validate input.
|
// Validate input.
|
||||||
R_UNLESS(Common::IsAligned(process_address, PageSize), ResultInvalidAddress);
|
R_UNLESS(Common::IsAligned(process_address, PageSize), ResultInvalidAddress);
|
||||||
R_UNLESS(Common::IsAligned(device_address, PageSize), ResultInvalidAddress);
|
R_UNLESS(Common::IsAligned(device_address, PageSize), ResultInvalidAddress);
|
||||||
@ -165,7 +165,7 @@ Result UnmapDeviceAddressSpace(Core::System& system, Handle das_handle, Handle p
|
|||||||
R_UNLESS(size > 0, ResultInvalidSize);
|
R_UNLESS(size > 0, ResultInvalidSize);
|
||||||
R_UNLESS((process_address < process_address + size), ResultInvalidCurrentMemory);
|
R_UNLESS((process_address < process_address + size), ResultInvalidCurrentMemory);
|
||||||
R_UNLESS((device_address < device_address + size), ResultInvalidMemoryRegion);
|
R_UNLESS((device_address < device_address + size), ResultInvalidMemoryRegion);
|
||||||
R_UNLESS((process_address == static_cast<uintptr_t>(process_address)),
|
R_UNLESS((process_address == static_cast<uint64_t>(process_address)),
|
||||||
ResultInvalidCurrentMemory);
|
ResultInvalidCurrentMemory);
|
||||||
|
|
||||||
// Get the device address space.
|
// Get the device address space.
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
|
|
||||||
namespace Kernel::Svc {
|
namespace Kernel::Svc {
|
||||||
|
|
||||||
Result MapInsecureMemory(Core::System& system, uintptr_t address, size_t size) {
|
Result MapInsecureMemory(Core::System& system, uint64_t address, uint64_t size) {
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
R_THROW(ResultNotImplemented);
|
R_THROW(ResultNotImplemented);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result UnmapInsecureMemory(Core::System& system, uintptr_t address, size_t size) {
|
Result UnmapInsecureMemory(Core::System& system, uint64_t address, uint64_t size) {
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
R_THROW(ResultNotImplemented);
|
R_THROW(ResultNotImplemented);
|
||||||
}
|
}
|
||||||
|
@ -12,19 +12,19 @@ Result CreateIoPool(Core::System& system, Handle* out, IoPoolType pool_type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Result CreateIoRegion(Core::System& system, Handle* out, Handle io_pool_handle, uint64_t phys_addr,
|
Result CreateIoRegion(Core::System& system, Handle* out, Handle io_pool_handle, uint64_t phys_addr,
|
||||||
size_t size, MemoryMapping mapping, MemoryPermission perm) {
|
uint64_t size, MemoryMapping mapping, MemoryPermission perm) {
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
R_THROW(ResultNotImplemented);
|
R_THROW(ResultNotImplemented);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result MapIoRegion(Core::System& system, Handle io_region_handle, uintptr_t address, size_t size,
|
Result MapIoRegion(Core::System& system, Handle io_region_handle, uint64_t address, uint64_t size,
|
||||||
MemoryPermission map_perm) {
|
MemoryPermission map_perm) {
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
R_THROW(ResultNotImplemented);
|
R_THROW(ResultNotImplemented);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result UnmapIoRegion(Core::System& system, Handle io_region_handle, uintptr_t address,
|
Result UnmapIoRegion(Core::System& system, Handle io_region_handle, uint64_t address,
|
||||||
size_t size) {
|
uint64_t size) {
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
R_THROW(ResultNotImplemented);
|
R_THROW(ResultNotImplemented);
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@ Result SetUnsafeLimit64(Core::System& system, uint64_t limit) {
|
|||||||
R_RETURN(SetUnsafeLimit(system, limit));
|
R_RETURN(SetUnsafeLimit(system, limit));
|
||||||
}
|
}
|
||||||
|
|
||||||
Result SetHeapSize64From32(Core::System& system, uintptr_t* out_address, uint32_t size) {
|
Result SetHeapSize64From32(Core::System& system, uint64_t* out_address, uint32_t size) {
|
||||||
R_RETURN(SetHeapSize(system, out_address, size));
|
R_RETURN(SetHeapSize(system, out_address, size));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ Result ConnectToNamedPort(Core::System& system, Handle* out, VAddr user_name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Result CreatePort(Core::System& system, Handle* out_server, Handle* out_client,
|
Result CreatePort(Core::System& system, Handle* out_server, Handle* out_client,
|
||||||
int32_t max_sessions, bool is_light, uintptr_t name) {
|
int32_t max_sessions, bool is_light, uint64_t name) {
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
R_THROW(ResultNotImplemented);
|
R_THROW(ResultNotImplemented);
|
||||||
}
|
}
|
||||||
|
@ -37,8 +37,8 @@ Result SetProcessMemoryPermission(Core::System& system, Handle process_handle, V
|
|||||||
R_UNLESS(Common::IsAligned(size, PageSize), ResultInvalidSize);
|
R_UNLESS(Common::IsAligned(size, PageSize), ResultInvalidSize);
|
||||||
R_UNLESS(size > 0, ResultInvalidSize);
|
R_UNLESS(size > 0, ResultInvalidSize);
|
||||||
R_UNLESS((address < address + size), ResultInvalidCurrentMemory);
|
R_UNLESS((address < address + size), ResultInvalidCurrentMemory);
|
||||||
R_UNLESS(address == static_cast<uintptr_t>(address), ResultInvalidCurrentMemory);
|
R_UNLESS(address == static_cast<uint64_t>(address), ResultInvalidCurrentMemory);
|
||||||
R_UNLESS(size == static_cast<size_t>(size), ResultInvalidCurrentMemory);
|
R_UNLESS(size == static_cast<uint64_t>(size), ResultInvalidCurrentMemory);
|
||||||
|
|
||||||
// Validate the memory permission.
|
// Validate the memory permission.
|
||||||
R_UNLESS(IsValidProcessMemoryPermission(perm), ResultInvalidNewMemoryPermission);
|
R_UNLESS(IsValidProcessMemoryPermission(perm), ResultInvalidNewMemoryPermission);
|
||||||
|
@ -443,7 +443,7 @@ def emit_wrapper(wrapped_fn, suffix, register_info, arguments, byte_size):
|
|||||||
lines.append("")
|
lines.append("")
|
||||||
|
|
||||||
for output_type, var_name, _, is_address in output_writes:
|
for output_type, var_name, _, is_address in output_writes:
|
||||||
output_type = "uintptr_t" if is_address else output_type
|
output_type = "uint64_t" if is_address else output_type
|
||||||
lines.append(f"{output_type} {var_name}{{}};")
|
lines.append(f"{output_type} {var_name}{{}};")
|
||||||
for input_type, var_name, _ in input_reads:
|
for input_type, var_name, _ in input_reads:
|
||||||
lines.append(f"{input_type} {var_name}{{}};")
|
lines.append(f"{input_type} {var_name}{{}};")
|
||||||
@ -630,7 +630,7 @@ def emit_call(bitness, names, suffix):
|
|||||||
def build_fn_declaration(return_type, name, arguments):
|
def build_fn_declaration(return_type, name, arguments):
|
||||||
arg_list = ["Core::System& system"]
|
arg_list = ["Core::System& system"]
|
||||||
for arg in arguments:
|
for arg in arguments:
|
||||||
type_name = "uintptr_t" if arg.is_address else arg.type_name
|
type_name = "uint64_t" if arg.is_address else arg.type_name
|
||||||
pointer = "*" if arg.is_output and not arg.is_outptr else ""
|
pointer = "*" if arg.is_output and not arg.is_outptr else ""
|
||||||
arg_list.append(f"{type_name}{pointer} {arg.var_name}")
|
arg_list.append(f"{type_name}{pointer} {arg.var_name}")
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ ResultVal<Kernel::KPort*> ServiceManager::GetServicePort(const std::string& name
|
|||||||
void SM::Initialize(Kernel::HLERequestContext& ctx) {
|
void SM::Initialize(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_SM, "called");
|
LOG_DEBUG(Service_SM, "called");
|
||||||
|
|
||||||
is_initialized = true;
|
ctx.GetManager()->SetIsInitializedForSm();
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
@ -159,7 +159,7 @@ static std::string PopServiceName(IPC::RequestParser& rp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ResultVal<Kernel::KClientSession*> SM::GetServiceImpl(Kernel::HLERequestContext& ctx) {
|
ResultVal<Kernel::KClientSession*> SM::GetServiceImpl(Kernel::HLERequestContext& ctx) {
|
||||||
if (!is_initialized) {
|
if (!ctx.GetManager()->GetIsInitializedForSm()) {
|
||||||
return ERR_NOT_INITIALIZED;
|
return ERR_NOT_INITIALIZED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,6 +168,11 @@ ResultVal<Kernel::KClientSession*> SM::GetServiceImpl(Kernel::HLERequestContext&
|
|||||||
|
|
||||||
// Find the named port.
|
// Find the named port.
|
||||||
auto port_result = service_manager.GetServicePort(name);
|
auto port_result = service_manager.GetServicePort(name);
|
||||||
|
if (port_result.Code() == ERR_INVALID_NAME) {
|
||||||
|
LOG_ERROR(Service_SM, "Invalid service name '{}'", name);
|
||||||
|
return ERR_INVALID_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
if (port_result.Failed()) {
|
if (port_result.Failed()) {
|
||||||
LOG_INFO(Service_SM, "Waiting for service {} to become available", name);
|
LOG_INFO(Service_SM, "Waiting for service {} to become available", name);
|
||||||
ctx.SetIsDeferred();
|
ctx.SetIsDeferred();
|
||||||
|
@ -19,6 +19,7 @@ enum class Errno : u32 {
|
|||||||
INVAL = 22,
|
INVAL = 22,
|
||||||
MFILE = 24,
|
MFILE = 24,
|
||||||
MSGSIZE = 90,
|
MSGSIZE = 90,
|
||||||
|
CONNRESET = 104,
|
||||||
NOTCONN = 107,
|
NOTCONN = 107,
|
||||||
TIMEDOUT = 110,
|
TIMEDOUT = 110,
|
||||||
};
|
};
|
||||||
|
@ -27,6 +27,8 @@ Errno Translate(Network::Errno value) {
|
|||||||
return Errno::NOTCONN;
|
return Errno::NOTCONN;
|
||||||
case Network::Errno::TIMEDOUT:
|
case Network::Errno::TIMEDOUT:
|
||||||
return Errno::TIMEDOUT;
|
return Errno::TIMEDOUT;
|
||||||
|
case Network::Errno::CONNRESET:
|
||||||
|
return Errno::CONNRESET;
|
||||||
default:
|
default:
|
||||||
UNIMPLEMENTED_MSG("Unimplemented errno={}", value);
|
UNIMPLEMENTED_MSG("Unimplemented errno={}", value);
|
||||||
return Errno::SUCCESS;
|
return Errno::SUCCESS;
|
||||||
|
@ -109,6 +109,8 @@ Errno TranslateNativeError(int e) {
|
|||||||
return Errno::AGAIN;
|
return Errno::AGAIN;
|
||||||
case WSAECONNREFUSED:
|
case WSAECONNREFUSED:
|
||||||
return Errno::CONNREFUSED;
|
return Errno::CONNREFUSED;
|
||||||
|
case WSAECONNRESET:
|
||||||
|
return Errno::CONNRESET;
|
||||||
case WSAEHOSTUNREACH:
|
case WSAEHOSTUNREACH:
|
||||||
return Errno::HOSTUNREACH;
|
return Errno::HOSTUNREACH;
|
||||||
case WSAENETDOWN:
|
case WSAENETDOWN:
|
||||||
@ -205,6 +207,8 @@ Errno TranslateNativeError(int e) {
|
|||||||
return Errno::AGAIN;
|
return Errno::AGAIN;
|
||||||
case ECONNREFUSED:
|
case ECONNREFUSED:
|
||||||
return Errno::CONNREFUSED;
|
return Errno::CONNREFUSED;
|
||||||
|
case ECONNRESET:
|
||||||
|
return Errno::CONNRESET;
|
||||||
case EHOSTUNREACH:
|
case EHOSTUNREACH:
|
||||||
return Errno::HOSTUNREACH;
|
return Errno::HOSTUNREACH;
|
||||||
case ENETDOWN:
|
case ENETDOWN:
|
||||||
|
@ -30,6 +30,7 @@ enum class Errno {
|
|||||||
NOTCONN,
|
NOTCONN,
|
||||||
AGAIN,
|
AGAIN,
|
||||||
CONNREFUSED,
|
CONNREFUSED,
|
||||||
|
CONNRESET,
|
||||||
HOSTUNREACH,
|
HOSTUNREACH,
|
||||||
NETDOWN,
|
NETDOWN,
|
||||||
NETUNREACH,
|
NETUNREACH,
|
||||||
|
@ -568,7 +568,7 @@ private:
|
|||||||
const u64* const state_words = Array<type>();
|
const u64* const state_words = Array<type>();
|
||||||
const u64 num_query_words = size / BYTES_PER_WORD + 1;
|
const u64 num_query_words = size / BYTES_PER_WORD + 1;
|
||||||
const u64 word_begin = offset / BYTES_PER_WORD;
|
const u64 word_begin = offset / BYTES_PER_WORD;
|
||||||
const u64 word_end = std::min(word_begin + num_query_words, NumWords());
|
const u64 word_end = std::min<u64>(word_begin + num_query_words, NumWords());
|
||||||
const u64 page_base = offset / BYTES_PER_PAGE;
|
const u64 page_base = offset / BYTES_PER_PAGE;
|
||||||
const u64 page_limit = Common::DivCeil(offset + size, BYTES_PER_PAGE);
|
const u64 page_limit = Common::DivCeil(offset + size, BYTES_PER_PAGE);
|
||||||
u64 begin = std::numeric_limits<u64>::max();
|
u64 begin = std::numeric_limits<u64>::max();
|
||||||
|
@ -71,7 +71,7 @@ struct Client::Impl {
|
|||||||
const std::string& jwt_ = "", const std::string& username_ = "",
|
const std::string& jwt_ = "", const std::string& username_ = "",
|
||||||
const std::string& token_ = "") {
|
const std::string& token_ = "") {
|
||||||
if (cli == nullptr) {
|
if (cli == nullptr) {
|
||||||
cli = std::make_unique<httplib::Client>(host.c_str());
|
cli = std::make_unique<httplib::Client>(host);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cli->is_valid()) {
|
if (!cli->is_valid()) {
|
||||||
|
@ -76,7 +76,7 @@ void DiscordImpl::Update() {
|
|||||||
// New Check for game cover
|
// New Check for game cover
|
||||||
httplib::Client cli(game_cover_url);
|
httplib::Client cli(game_cover_url);
|
||||||
|
|
||||||
if (auto res = cli.Head(fmt::format("/images/game/boxart/{}.png", icon_name).c_str())) {
|
if (auto res = cli.Head(fmt::format("/images/game/boxart/{}.png", icon_name))) {
|
||||||
if (res->status == 200) {
|
if (res->status == 200) {
|
||||||
game_cover_url += fmt::format("/images/game/boxart/{}.png", icon_name);
|
game_cover_url += fmt::format("/images/game/boxart/{}.png", icon_name);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user