GSP: Fixed to use real shared memory object, various cleanups.
- Previously, used a hard-coded shared memory handle of 0x10002000 (as used by libctru homebrew) GSP: Added name for shared memory. GSP: Cleaned up assertion message.
This commit is contained in:
parent
e547128185
commit
7b7a435094
2 changed files with 40 additions and 30 deletions
|
@ -12,6 +12,7 @@
|
|||
#include "core/hle/kernel/event.h"
|
||||
#include "core/hle/kernel/kernel.h"
|
||||
#include "core/hle/kernel/mutex.h"
|
||||
#include "core/hle/kernel/shared_memory.h"
|
||||
#include "core/hle/kernel/thread.h"
|
||||
|
||||
#include "core/hle/function_wrappers.h"
|
||||
|
@ -58,17 +59,17 @@ Result ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 addr1, u32 siz
|
|||
}
|
||||
|
||||
/// Maps a memory block to specified address
|
||||
Result MapMemoryBlock(Handle memblock, u32 addr, u32 mypermissions, u32 otherpermission) {
|
||||
Result MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other_permissions) {
|
||||
DEBUG_LOG(SVC, "called memblock=0x08X, addr=0x%08X, mypermissions=0x%08X, otherpermission=%d",
|
||||
memblock, addr, mypermissions, otherpermission);
|
||||
switch (mypermissions) {
|
||||
handle, addr, permissions, other_permissions);
|
||||
switch (permissions) {
|
||||
case MEMORY_PERMISSION_NORMAL:
|
||||
case MEMORY_PERMISSION_NORMAL + 1:
|
||||
case MEMORY_PERMISSION_NORMAL + 2:
|
||||
Memory::MapBlock_Shared(memblock, addr, mypermissions);
|
||||
Kernel::MapSharedMemory(handle, addr, permissions, other_permissions);
|
||||
break;
|
||||
default:
|
||||
ERROR_LOG(OSHLE, "unknown permissions=0x%08X", mypermissions);
|
||||
ERROR_LOG(OSHLE, "unknown permissions=0x%08X", permissions);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue