kernel: memory: page_table: Simplify GetPhysicalAddr impl.
This commit is contained in:
1 parent
c629e544a7
commit
a8292f6cd9
4 files changed
+6
-19
No files matched your search
@@ -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