diff options
Diffstat (limited to 'src/core/hle/kernel/svc_wrap.h')
-rw-r--r-- | src/core/hle/kernel/svc_wrap.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/core/hle/kernel/svc_wrap.h b/src/core/hle/kernel/svc_wrap.h index 6e62e656f..86255fe6d 100644 --- a/src/core/hle/kernel/svc_wrap.h +++ b/src/core/hle/kernel/svc_wrap.h @@ -73,6 +73,23 @@ void SvcWrap64(Core::System& system) { .raw); } +// Used by MapProcessMemory and UnmapProcessMemory +template <ResultCode func(Core::System&, u64, u32, u64, u64)> +void SvcWrap64(Core::System& system) { + FuncReturn(system, func(system, Param(system, 0), static_cast<u32>(Param(system, 1)), + Param(system, 2), Param(system, 3)) + .raw); +} + +// Used by ControlCodeMemory +template <ResultCode func(Core::System&, Handle, u32, u64, u64, Svc::MemoryPermission)> +void SvcWrap64(Core::System& system) { + FuncReturn(system, func(system, static_cast<Handle>(Param(system, 0)), + static_cast<u32>(Param(system, 1)), Param(system, 2), Param(system, 3), + static_cast<Svc::MemoryPermission>(Param(system, 4))) + .raw); +} + template <ResultCode func(Core::System&, u32*)> void SvcWrap64(Core::System& system) { u32 param = 0; @@ -301,6 +318,16 @@ void SvcWrap64(Core::System& system) { FuncReturn(system, retval); } +// Used by CreateCodeMemory +template <ResultCode func(Core::System&, Handle*, u64, u64)> +void SvcWrap64(Core::System& system) { + u32 param_1 = 0; + const u32 retval = func(system, ¶m_1, Param(system, 1), Param(system, 2)).raw; + + system.CurrentArmInterface().SetReg(1, param_1); + FuncReturn(system, retval); +} + template <ResultCode func(Core::System&, Handle*, u64, u32, u32)> void SvcWrap64(Core::System& system) { u32 param_1 = 0; |