From 17a8cae0038b82202149bad687823b89074aa696 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 9 May 2015 04:02:32 -0300 Subject: Memory: Add GetPhysicalPointer helper function --- src/core/mem_map.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/core/mem_map.h') diff --git a/src/core/mem_map.h b/src/core/mem_map.h index 5a08cc10..64de76c3 100644 --- a/src/core/mem_map.h +++ b/src/core/mem_map.h @@ -192,4 +192,13 @@ PAddr VirtualToPhysicalAddress(VAddr addr); */ VAddr PhysicalToVirtualAddress(PAddr addr); +/** + * Gets a pointer to the memory region beginning at the specified physical address. + * + * @note This is currently implemented using PhysicalToVirtualAddress(). + */ +inline u8* GetPhysicalPointer(PAddr address) { + return GetPointer(PhysicalToVirtualAddress(address)); +} + } // namespace -- cgit v1.2.3