From 35da7f57efd5153be37a05ffcbb57412da74265a Mon Sep 17 00:00:00 2001 From: Subv Date: Tue, 26 Sep 2017 17:27:44 -0500 Subject: Memory: Allow IsValidVirtualAddress to be called with a specific process parameter. There is still an overload of IsValidVirtualAddress that only takes the VAddr and will default to the current process. --- src/core/memory.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/core/memory.h') diff --git a/src/core/memory.h b/src/core/memory.h index 1865bfea0..347c08c78 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -12,6 +12,10 @@ #include "common/common_types.h" #include "core/mmio.h" +namespace Kernel { +class Process; +} + namespace Memory { /** @@ -185,7 +189,10 @@ enum : VAddr { void SetCurrentPageTable(PageTable* page_table); PageTable* GetCurrentPageTable(); +/// Determines if the given VAddr is valid for the specified process. +bool IsValidVirtualAddress(const Kernel::Process& process, const VAddr vaddr); bool IsValidVirtualAddress(const VAddr addr); + bool IsValidPhysicalAddress(const PAddr addr); u8 Read8(VAddr addr); -- cgit v1.2.3