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 committed by SciresM
parent 2c4bd44d7e
commit 2f2c36b22b
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);