From e5756ca0b0ab889d2bbae40e2f1f3f640bc07ea2 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 28 Oct 2021 15:42:52 -0700 Subject: [PATCH] kern: fix 32-bit light ipc svc handler asm Nintendo used to do what we were doing because the function wasn't directly in the handler table, but we've always been directly in the handler table, so we were trashing the last four arguments to light ipc when called from aarch32. Nothing uses this, but needed to be fixed. --- .../arch/arm64/svc/kern_svc_light_ipc_asm.s | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/libmesosphere/source/arch/arm64/svc/kern_svc_light_ipc_asm.s b/libmesosphere/source/arch/arm64/svc/kern_svc_light_ipc_asm.s index 568f88e9..3c05d40e 100644 --- a/libmesosphere/source/arch/arm64/svc/kern_svc_light_ipc_asm.s +++ b/libmesosphere/source/arch/arm64/svc/kern_svc_light_ipc_asm.s @@ -50,10 +50,6 @@ _ZN3ams4kern3svc26CallSendSyncRequestLight64Ev: .global _ZN3ams4kern3svc32CallSendSyncRequestLight64From32Ev .type _ZN3ams4kern3svc32CallSendSyncRequestLight64From32Ev, %function _ZN3ams4kern3svc32CallSendSyncRequestLight64From32Ev: - /* Load x4-x7 from where the svc handler stores them. */ - ldp x4, x5, [sp, #(8 * 0)] - ldp x6, x7, [sp, #(8 * 2)] - /* Allocate space for the light ipc data. */ sub sp, sp, #(4 * 8) @@ -78,13 +74,8 @@ _ZN3ams4kern3svc32CallSendSyncRequestLight64From32Ev: /* Free the stack space for the light ipc data. */ add sp, sp, #(4 * 8) - /* Save x4-x7 to where the svc handler stores them. */ - stp x4, x5, [sp, #(8 * 0)] - stp x6, x7, [sp, #(8 * 2)] - ret - /* ams::kern::svc::CallReplyAndReceiveLight64() */ .section .text._ZN3ams4kern3svc26CallReplyAndReceiveLight64Ev, "ax", %progbits .global _ZN3ams4kern3svc26CallReplyAndReceiveLight64Ev @@ -121,10 +112,6 @@ _ZN3ams4kern3svc26CallReplyAndReceiveLight64Ev: .global _ZN3ams4kern3svc32CallReplyAndReceiveLight64From32Ev .type _ZN3ams4kern3svc32CallReplyAndReceiveLight64From32Ev, %function _ZN3ams4kern3svc32CallReplyAndReceiveLight64From32Ev: - /* Load x4-x7 from where the svc handler stores them. */ - ldp x4, x5, [sp, #(8 * 0)] - ldp x6, x7, [sp, #(8 * 2)] - /* Allocate space for the light ipc data. */ sub sp, sp, #(4 * 8) @@ -149,8 +136,4 @@ _ZN3ams4kern3svc32CallReplyAndReceiveLight64From32Ev: /* Free the stack space for the light ipc data. */ add sp, sp, #(4 * 8) - /* Save x4-x7 to where the svc handler stores them. */ - stp x4, x5, [sp, #(8 * 0)] - stp x6, x7, [sp, #(8 * 2)] - ret