diff --git a/nx/include/switch/svc.h b/nx/include/switch/svc.h index 8900f2e0..e9f3bcc7 100644 --- a/nx/include/switch/svc.h +++ b/nx/include/switch/svc.h @@ -18,6 +18,7 @@ static inline void* armGetTls(void) { return ret; } +Result svcQueryMemory(u32 *meminfo_ptr, u32 *pageinfo, u64 addr); Result svcCloseHandle(Handle handle); Result svcWaitSynchronization(s32* index, const Handle* handles, s32 handleCount, u64 timeout); Result svcConnectToNamedPort(Handle* session, const char* name); diff --git a/nx/source/svc.s b/nx/source/svc.s index 75cc03f0..cbb27e63 100644 --- a/nx/source/svc.s +++ b/nx/source/svc.s @@ -11,6 +11,14 @@ .cfi_endproc .endm +SVC_BEGIN svcQueryMemory + str x1, [sp, #-16]! + svc 0x6 + ldr x2, [sp], #16 + str w1, [x2] + ret +SVC_END + SVC_BEGIN svcCloseHandle svc 0x16 ret