diff options
author | Frederic Laing <frederic.laing@alumni.fh-aachen.de> | 2018-11-03 16:01:34 +0100 |
---|---|---|
committer | Frederic Laing <frederic.laing@alumni.fh-aachen.de> | 2018-11-03 16:01:34 +0100 |
commit | ab7472345b9ce38cd2ca57bf1104be9576e0ef1e (patch) | |
tree | 97cab52d38d39317296952769ab035c3a3df939b /src/core/hle | |
parent | Merge pull request #1636 from ogniK5377/hwopus-bad-assert (diff) | |
download | yuzu-ab7472345b9ce38cd2ca57bf1104be9576e0ef1e.tar yuzu-ab7472345b9ce38cd2ca57bf1104be9576e0ef1e.tar.gz yuzu-ab7472345b9ce38cd2ca57bf1104be9576e0ef1e.tar.bz2 yuzu-ab7472345b9ce38cd2ca57bf1104be9576e0ef1e.tar.lz yuzu-ab7472345b9ce38cd2ca57bf1104be9576e0ef1e.tar.xz yuzu-ab7472345b9ce38cd2ca57bf1104be9576e0ef1e.tar.zst yuzu-ab7472345b9ce38cd2ca57bf1104be9576e0ef1e.zip |
Diffstat (limited to 'src/core/hle')
-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) { return RESULT_SUCCESS; } +static ResultCode SetMemoryPermission(VAddr addr, u64 size, u32 prot) { + LOG_WARNING(Kernel_SVC, "(STUBBED) called, addr=0x{:X}, size=0x{:X}, prot=0x{:X}", addr, size, + prot); + return RESULT_SUCCESS; +} + static ResultCode SetMemoryAttribute(VAddr addr, u64 size, u32 state0, u32 state1) { LOG_WARNING(Kernel_SVC, "(STUBBED) called, addr=0x{:X}, size=0x{:X}, state0=0x{:X}, state1=0x{:X}", addr, @@ -1259,7 +1265,7 @@ struct FunctionDef { static const FunctionDef SVC_Table[] = { {0x00, nullptr, "Unknown"}, {0x01, SvcWrap<SetHeapSize>, "SetHeapSize"}, - {0x02, nullptr, "SetMemoryPermission"}, + {0x02, SvcWrap<SetMemoryPermission>, "SetMemoryPermission"}, {0x03, SvcWrap<SetMemoryAttribute>, "SetMemoryAttribute"}, {0x04, SvcWrap<MapMemory>, "MapMemory"}, {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() { FuncReturn(func(Param(0), Param(1), Param(2)).raw); } +template <ResultCode func(u64, u64, u32)> +void SvcWrap() { + FuncReturn(func(Param(0), Param(1), static_cast<u32>(Param(2))).raw); +} + template <ResultCode func(u32, u64, u64, u32)> void SvcWrap() { FuncReturn( |