From 9ff8d0f3e652fee83d9f4374d9f6e0aa1759dd88 Mon Sep 17 00:00:00 2001 From: GPUCode Date: Thu, 23 Nov 2023 11:26:06 +0200 Subject: Address more review comments --- src/core/memory.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/core/memory.h') diff --git a/src/core/memory.h b/src/core/memory.h index e5fbc0025..ed8ebb5eb 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -97,6 +97,17 @@ public: */ void UnmapRegion(Common::PageTable& page_table, Common::ProcessAddress base, u64 size); + /** + * Protects a region of the emulated process address space with the new permissions. + * + * @param page_table The page table of the emulated process. + * @param base The start address to re-protect. Must be page-aligned. + * @param size The amount of bytes to protect. Must be page-aligned. + * @param perms The permissions the address range is mapped. + */ + void ProtectRegion(Common::PageTable& page_table, Common::ProcessAddress base, u64 size, + Common::MemoryPermission perms); + /** * Checks whether or not the supplied address is a valid virtual * address for the current process. -- cgit v1.2.3