kern: KMemoryManager/KPageGroup use physical addresses instead of virtual, now

This commit is contained in:
Michael Scire
2021-09-18 00:11:10 -07:00
parent f8fd072349
commit 1cf3b24c2d
17 changed files with 305 additions and 260 deletions

View File

@@ -43,7 +43,7 @@ namespace ams::kern::svc {
ON_SCOPE_EXIT { contig_range.Close(); };
/* Adjust to remain within range. */
KVirtualAddress operate_address = contig_range.address;
KVirtualAddress operate_address = KMemoryLayout::GetLinearVirtualAddress(contig_range.address);
size_t operate_size = contig_range.size;
if (cur_address < address) {
operate_address += (address - cur_address);