mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-13 16:58:52 -05:00
kernel: memory: page_table: Simplify GetPhysicalAddr impl.
This commit is contained in:
@ -12,11 +12,4 @@ DeviceMemory::DeviceMemory(System& system) : buffer{DramMemoryMap::Size}, system
|
||||
|
||||
DeviceMemory::~DeviceMemory() = default;
|
||||
|
||||
PAddr DeviceMemory::GetPhysicalAddr(VAddr addr) {
|
||||
const u8* const base{system.Memory().GetPointer(addr)};
|
||||
ASSERT(base);
|
||||
const uintptr_t offset{static_cast<uintptr_t>(base - GetPointer(DramMemoryMap::Base))};
|
||||
return DramMemoryMap::Base + offset;
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
|
Reference in New Issue
Block a user