More information about ReserveVirtualRange results

Should help debug issues like the one in The Order: 1886 (CUSA00076)
This commit is contained in:
Stephen Miller 2025-05-08 11:48:09 -05:00 committed by GitHub
parent 6792380482
commit c0e09c104a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -131,9 +131,6 @@ s32 PS4_SYSV_ABI sceKernelVirtualQuery(const void* addr, int flags, OrbisVirtual
}
s32 PS4_SYSV_ABI sceKernelReserveVirtualRange(void** addr, u64 len, int flags, u64 alignment) {
LOG_INFO(Kernel_Vmm, "addr = {}, len = {:#x}, flags = {:#x}, alignment = {:#x}",
fmt::ptr(*addr), len, flags, alignment);
if (addr == nullptr) {
LOG_ERROR(Kernel_Vmm, "Address is invalid!");
return ORBIS_KERNEL_ERROR_EINVAL;
@ -153,7 +150,13 @@ s32 PS4_SYSV_ABI sceKernelReserveVirtualRange(void** addr, u64 len, int flags, u
const VAddr in_addr = reinterpret_cast<VAddr>(*addr);
const auto map_flags = static_cast<Core::MemoryMapFlags>(flags);
return memory->Reserve(addr, in_addr, len, map_flags, alignment);
s32 result = memory->Reserve(addr, in_addr, len, map_flags, alignment);
if (result == 0) {
LOG_INFO(Kernel_Vmm,
"in_addr = {:#x}, out_addr = {}, len = {:#x}, flags = {:#x}, alignment = {:#x}",
in_addr, fmt::ptr(*addr), len, flags, alignment);
}
return result;
}
int PS4_SYSV_ABI sceKernelMapNamedDirectMemory(void** addr, u64 len, int prot, int flags,