mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-01-06 07:06:00 +00:00
Always assign memory_type and offset
The memory_type default is based on fpPS4 behavior. I'm not entirely sure how the offset should be handled, but since the value we use defaults to 0 anyway, that should be better than leaving random data in that area.
This commit is contained in:
parent
0503054b40
commit
dc1313ea3c
|
@ -308,6 +308,7 @@ int MemoryManager::VirtualQuery(VAddr addr, int flags,
|
||||||
const auto& vma = it->second;
|
const auto& vma = it->second;
|
||||||
info->start = vma.base;
|
info->start = vma.base;
|
||||||
info->end = vma.base + vma.size;
|
info->end = vma.base + vma.size;
|
||||||
|
info->offset = vma.phys_base;
|
||||||
info->protection = static_cast<s32>(vma.prot);
|
info->protection = static_cast<s32>(vma.prot);
|
||||||
info->is_flexible.Assign(vma.type == VMAType::Flexible);
|
info->is_flexible.Assign(vma.type == VMAType::Flexible);
|
||||||
info->is_direct.Assign(vma.type == VMAType::Direct);
|
info->is_direct.Assign(vma.type == VMAType::Direct);
|
||||||
|
@ -318,8 +319,9 @@ int MemoryManager::VirtualQuery(VAddr addr, int flags,
|
||||||
if (vma.type == VMAType::Direct) {
|
if (vma.type == VMAType::Direct) {
|
||||||
const auto dmem_it = FindDmemArea(vma.phys_base);
|
const auto dmem_it = FindDmemArea(vma.phys_base);
|
||||||
ASSERT(dmem_it != dmem_map.end());
|
ASSERT(dmem_it != dmem_map.end());
|
||||||
info->offset = vma.phys_base;
|
|
||||||
info->memory_type = dmem_it->second.memory_type;
|
info->memory_type = dmem_it->second.memory_type;
|
||||||
|
} else {
|
||||||
|
info->memory_type = ::Libraries::Kernel::SCE_KERNEL_WB_ONION;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
|
|
Loading…
Reference in a new issue