diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 8 | ||||
| -rw-r--r-- | src/core/hle/kernel/svc_wrap.h | 5 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index c7c579aaf..56e7904a5 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -122,6 +122,12 @@ static ResultCode SetHeapSize(VAddr* heap_addr, u64 heap_size) { | |||
| 122 | return RESULT_SUCCESS; | 122 | return RESULT_SUCCESS; |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | static ResultCode SetMemoryPermission(VAddr addr, u64 size, u32 prot) { | ||
| 126 | LOG_WARNING(Kernel_SVC, "(STUBBED) called, addr=0x{:X}, size=0x{:X}, prot=0x{:X}", addr, size, | ||
| 127 | prot); | ||
| 128 | return RESULT_SUCCESS; | ||
| 129 | } | ||
| 130 | |||
| 125 | static ResultCode SetMemoryAttribute(VAddr addr, u64 size, u32 state0, u32 state1) { | 131 | static ResultCode SetMemoryAttribute(VAddr addr, u64 size, u32 state0, u32 state1) { |
| 126 | LOG_WARNING(Kernel_SVC, | 132 | LOG_WARNING(Kernel_SVC, |
| 127 | "(STUBBED) called, addr=0x{:X}, size=0x{:X}, state0=0x{:X}, state1=0x{:X}", addr, | 133 | "(STUBBED) called, addr=0x{:X}, size=0x{:X}, state0=0x{:X}, state1=0x{:X}", addr, |
| @@ -1259,7 +1265,7 @@ struct FunctionDef { | |||
| 1259 | static const FunctionDef SVC_Table[] = { | 1265 | static const FunctionDef SVC_Table[] = { |
| 1260 | {0x00, nullptr, "Unknown"}, | 1266 | {0x00, nullptr, "Unknown"}, |
| 1261 | {0x01, SvcWrap<SetHeapSize>, "SetHeapSize"}, | 1267 | {0x01, SvcWrap<SetHeapSize>, "SetHeapSize"}, |
| 1262 | {0x02, nullptr, "SetMemoryPermission"}, | 1268 | {0x02, SvcWrap<SetMemoryPermission>, "SetMemoryPermission"}, |
| 1263 | {0x03, SvcWrap<SetMemoryAttribute>, "SetMemoryAttribute"}, | 1269 | {0x03, SvcWrap<SetMemoryAttribute>, "SetMemoryAttribute"}, |
| 1264 | {0x04, SvcWrap<MapMemory>, "MapMemory"}, | 1270 | {0x04, SvcWrap<MapMemory>, "MapMemory"}, |
| 1265 | {0x05, SvcWrap<UnmapMemory>, "UnmapMemory"}, | 1271 | {0x05, SvcWrap<UnmapMemory>, "UnmapMemory"}, |
diff --git a/src/core/hle/kernel/svc_wrap.h b/src/core/hle/kernel/svc_wrap.h index b09753c80..233a99fb0 100644 --- a/src/core/hle/kernel/svc_wrap.h +++ b/src/core/hle/kernel/svc_wrap.h | |||
| @@ -121,6 +121,11 @@ void SvcWrap() { | |||
| 121 | FuncReturn(func(Param(0), Param(1), Param(2)).raw); | 121 | FuncReturn(func(Param(0), Param(1), Param(2)).raw); |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | template <ResultCode func(u64, u64, u32)> | ||
| 125 | void SvcWrap() { | ||
| 126 | FuncReturn(func(Param(0), Param(1), static_cast<u32>(Param(2))).raw); | ||
| 127 | } | ||
| 128 | |||
| 124 | template <ResultCode func(u32, u64, u64, u32)> | 129 | template <ResultCode func(u32, u64, u64, u32)> |
| 125 | void SvcWrap() { | 130 | void SvcWrap() { |
| 126 | FuncReturn( | 131 | FuncReturn( |