VERY experimental Nintendo Switch 2 emulator
C++
hle: kernel: svc: MapProcessMemory: Fix usage of KPageLinkedList to use physical address space.
bunnei3beb4d4273e1
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cppindex 4a2115e2d0..976d63234d 100644--- a/src/core/hle/kernel/svc.cpp+++ b/src/core/hle/kernel/svc.cpp@@ -1362,8 +1362,11 @@ static ResultCode MapProcessMemory(Core::System& system, VAddr dst_address, HandResultInvalidMemoryRegion);// Create a new page group.- KMemoryInfo kBlockInfo = dst_pt.QueryInfo(dst_address);- KPageLinkedList pg(kBlockInfo.GetAddress(), kBlockInfo.GetNumPages());+ KPageLinkedList pg;+ R_TRY(src_pt.MakeAndOpenPageGroup(+ std::addressof(pg), src_address, size / PageSize, KMemoryState::FlagCanMapProcess,+ KMemoryState::FlagCanMapProcess, KMemoryPermission::None, KMemoryPermission::None,+ KMemoryAttribute::All, KMemoryAttribute::None));// Map the group.R_TRY(dst_pt.MapPages(dst_address, pg, KMemoryState::SharedCode,