1
0
Fork 0
forked from suyu/suyu

Merge pull request #820 from Subv/creatememoryblock

Core/SVC: Map the shared memory created in CreateMemoryBlock to the specified address
This commit is contained in:
bunnei 2015-05-25 22:43:17 -04:00
commit 5bcff3b837

View file

@ -654,6 +654,8 @@ static ResultCode CreateMemoryBlock(Handle* out_handle, u32 addr, u32 size, u32
using Kernel::MemoryPermission; using Kernel::MemoryPermission;
SharedPtr<SharedMemory> shared_memory = SharedMemory::Create(size, SharedPtr<SharedMemory> shared_memory = SharedMemory::Create(size,
(MemoryPermission)my_permission, (MemoryPermission)other_permission); (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))); CASCADE_RESULT(*out_handle, Kernel::g_handle_table.Create(std::move(shared_memory)));
LOG_WARNING(Kernel_SVC, "(STUBBED) called addr=0x%08X", addr); LOG_WARNING(Kernel_SVC, "(STUBBED) called addr=0x%08X", addr);