Kernel, APT: SharedFont/SharedMemoryOnSharedDevice should always use old linear heap VAddr

This commit is contained in:
Weiyi Wang 2018-11-04 12:11:08 -05:00
parent 1444d60109
commit 8c65433ab5
2 changed files with 15 additions and 5 deletions

View file

@ -142,7 +142,10 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi
if (base_address == 0 && target_address == 0) {
// Calculate the address at which to map the memory block.
target_address = linear_heap_phys_offset + target_process->GetLinearHeapAreaAddress();
// Note: even on new firmware versions, the target address is still in the old linear heap
// region. This exception is made to keep the shared font compatibility. See
// APT:GetSharedFont for detail.
target_address = linear_heap_phys_offset + Memory::LINEAR_HEAP_VADDR;
}
auto vma = target_process->vm_manager.FindVMA(target_address);