kern: SvcMapPhysicalMemoryUnsafe, SvcUnmapPhysicalMemoryUnsafe

This commit is contained in:
Michael Scire authored and SciresM committed 2020-07-31 14:50:52 -07:00
1 parent 583899ede3
commit 840ab0785c
7 files changed
+135 -6

No files matched your search

@@ -184,6 +184,11 @@ namespace ams::kern {
return this->Contains(addr, size) && this->alias_region_start <= addr && addr + size - 1 <= this->alias_region_end - 1;
}
bool IsInUnsafeAliasRegion(KProcessAddress addr, size_t size) const {
/* Even though Unsafe physical memory is KMemoryState_Normal, it must be mapped inside the alias code region. */
return this->CanContain(addr, size, KMemoryState_AliasCode);
}
KProcessAddress GetRegionAddress(KMemoryState state) const;
size_t GetRegionSize(KMemoryState state) const;
bool CanContain(KProcessAddress addr, size_t size, KMemoryState state) const;