mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-22 10:04:39 +00:00
Merge e565f998ba
into 95a386308a
This commit is contained in:
commit
e2791322f7
@ -57,17 +57,17 @@ s32 PS4_SYSV_ABI sceKernelAllocateDirectMemory(s64 searchStart, s64 searchEnd, u
|
|||||||
|
|
||||||
auto* memory = Core::Memory::Instance();
|
auto* memory = Core::Memory::Instance();
|
||||||
PAddr phys_addr = memory->Allocate(searchStart, searchEnd, len, alignment, memoryType);
|
PAddr phys_addr = memory->Allocate(searchStart, searchEnd, len, alignment, memoryType);
|
||||||
if (phys_addr == -1) {
|
|
||||||
return ORBIS_KERNEL_ERROR_EAGAIN;
|
|
||||||
}
|
|
||||||
|
|
||||||
*physAddrOut = static_cast<s64>(phys_addr);
|
|
||||||
|
|
||||||
LOG_INFO(Kernel_Vmm,
|
LOG_INFO(Kernel_Vmm,
|
||||||
"searchStart = {:#x}, searchEnd = {:#x}, len = {:#x}, "
|
"searchStart = {:#x}, searchEnd = {:#x}, len = {:#x}, "
|
||||||
"alignment = {:#x}, memoryType = {:#x}, physAddrOut = {:#x}",
|
"alignment = {:#x}, memoryType = {:#x}, physAddrOut = {:#x}",
|
||||||
searchStart, searchEnd, len, alignment, memoryType, phys_addr);
|
searchStart, searchEnd, len, alignment, memoryType, phys_addr);
|
||||||
|
|
||||||
|
if (phys_addr == -1) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EAGAIN;
|
||||||
|
}
|
||||||
|
|
||||||
|
*physAddrOut = static_cast<s64>(phys_addr);
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,7 +214,10 @@ PAddr MemoryManager::Allocate(PAddr search_start, PAddr search_end, u64 size, u6
|
|||||||
|
|
||||||
if (dmem_area == dmem_map.end()) {
|
if (dmem_area == dmem_map.end()) {
|
||||||
// There are no suitable mappings in this range
|
// There are no suitable mappings in this range
|
||||||
LOG_ERROR(Kernel_Vmm, "Unable to find free direct memory area: size = {:#x}", size);
|
auto exceed = mapping_end - search_end;
|
||||||
|
LOG_ERROR(Kernel_Vmm,
|
||||||
|
"Unable to find free direct memory area: size = {:#x}, exceed = {:#x}", size,
|
||||||
|
exceed);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user