summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/svc.cpp8
-rw-r--r--src/core/hle/kernel/svc_wrap.h5
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
125static 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
125static ResultCode SetMemoryAttribute(VAddr addr, u64 size, u32 state0, u32 state1) { 131static 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 {
1259static const FunctionDef SVC_Table[] = { 1265static 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
124template <ResultCode func(u64, u64, u32)>
125void SvcWrap() {
126 FuncReturn(func(Param(0), Param(1), static_cast<u32>(Param(2))).raw);
127}
128
124template <ResultCode func(u32, u64, u64, u32)> 129template <ResultCode func(u32, u64, u64, u32)>
125void SvcWrap() { 130void SvcWrap() {
126 FuncReturn( 131 FuncReturn(