From 732839b1f48c255497c187c94a42c29afd43e3b2 Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 25 May 2015 16:17:26 -0500 Subject: Core/SVC: Map the shared memory created in CreateMemoryBlock to the specified address. This SharedMemory can be passed to service functions (Which should map the memory into their own address space). --- src/core/hle/svc.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 347d241f..ca3ff332 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp @@ -654,6 +654,8 @@ static ResultCode CreateMemoryBlock(Handle* out_handle, u32 addr, u32 size, u32 using Kernel::MemoryPermission; SharedPtr shared_memory = SharedMemory::Create(size, (MemoryPermission)my_permission, (MemoryPermission)other_permission); + // Map the SharedMemory to the specified address + shared_memory->base_address = addr; CASCADE_RESULT(*out_handle, Kernel::g_handle_table.Create(std::move(shared_memory))); LOG_WARNING(Kernel_SVC, "(STUBBED) called addr=0x%08X", addr); -- cgit v1.2.3