Merge pull request #4413 from wwylele/memory-global

Fix shared font addres; Remove global PhysicalToVirtualAddress
This commit is contained in:
Weiyi Wang 2018-11-13 00:14:24 -05:00 committed by GitHub
commit fe47243690
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 72 additions and 78 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);