From 69a98dc0cb5f1df57c1dd4c326b5899e1299b76a Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 6 Dec 2018 23:56:41 -0500 Subject: [PATCH] kernel/svc: Correct SVC instruction values for svcMapPhysicalMemory and svcUnmapPhysicalMemory 0x2A corresponds to svcFlushEntireDataCache, while 0x2B corresponds to svcFlushDataCache. --- nx/include/switch/kernel/svc.h | 4 ++-- nx/source/kernel/svc.s | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nx/include/switch/kernel/svc.h b/nx/include/switch/kernel/svc.h index 8dd70bfe..b3fb1ba8 100644 --- a/nx/include/switch/kernel/svc.h +++ b/nx/include/switch/kernel/svc.h @@ -537,7 +537,7 @@ Result svcGetInfo(u64* out, u64 id0, Handle handle, u64 id1); /** * @brief Maps new heap memory at the desired address. [3.0.0+] * @return Result code. - * @note Syscall number 0x2A. + * @note Syscall number 0x2C. * @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available. */ Result svcMapPhysicalMemory(void *address, u64 size); @@ -545,7 +545,7 @@ Result svcMapPhysicalMemory(void *address, u64 size); /** * @brief Undoes the effects of \ref svcMapPhysicalMemory. [3.0.0+] * @return Result code. - * @note Syscall number 0x2B. + * @note Syscall number 0x2D. * @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available. */ Result svcUnmapPhysicalMemory(void *address, u64 size); diff --git a/nx/source/kernel/svc.s b/nx/source/kernel/svc.s index 351d617f..df53f3ee 100644 --- a/nx/source/kernel/svc.s +++ b/nx/source/kernel/svc.s @@ -249,12 +249,12 @@ SVC_BEGIN svcGetInfo SVC_END SVC_BEGIN svcMapPhysicalMemory - svc 0x2A + svc 0x2C ret SVC_END SVC_BEGIN svcUnmapPhysicalMemory - svc 0x2B + svc 0x2D ret SVC_END