mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-29 18:22:47 +01:00
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).
This commit is contained in:
parent
33c57361a9
commit
732839b1f4
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue