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.
This commit is contained in:
Subv 2017-09-26 17:27:44 -05:00
parent 0c20da7fde
commit 35da7f57ef
2 changed files with 25 additions and 7 deletions

View file

@ -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);