SPM: Remove unnecessary register save
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>
Thu, 14 Feb 2019 11:40:19 +0000 (11:40 +0000)
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>
Thu, 14 Feb 2019 17:37:56 +0000 (17:37 +0000)
Since commit 01fc1c24b9a0 ("BL31: Use helper function to save registers
in SMC handler") all the general-purpose registers are saved when
entering EL3. It isn't needed to save them here.

Change-Id: Ic540a5441b89b70888da587ab8fc3b2508cef8cc
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
services/std_svc/spm/sprt.c

index 8aa2a88aa1b3a4ef7b7e85e82e7fc9b091981f73..20ad2afb2c802255c2f20e4f7315ef128b252e65 100644 (file)
@@ -178,14 +178,6 @@ static uintptr_t sprt_smc_handler(uint32_t smc_fid, u_register_t x1,
                SMC_RET1(handle, SPRT_VERSION_COMPILED);
 
        case SPRT_PUT_RESPONSE_AARCH64:
-               /*
-                * Registers x1-x3 aren't saved by default to the context,
-                * but they are needed after spm_sp_synchronous_exit() because
-                * they hold return values.
-                */
-               SMC_SET_GP(handle, CTX_GPREG_X1, x1);
-               SMC_SET_GP(handle, CTX_GPREG_X2, x2);
-               SMC_SET_GP(handle, CTX_GPREG_X3, x3);
                spm_sp_synchronous_exit(SPRT_PUT_RESPONSE_AARCH64);
 
        case SPRT_YIELD_AARCH64: