2 // Copyright (c) 2012 - 2020, ARM Limited. All rights reserved.
4 // SPDX-License-Identifier: BSD-2-Clause-Patent
11 GCC_ASM_EXPORT(ArmCallSvc)
14 // Push frame pointer and return address on the stack
15 stp x29, x30, [sp, #-32]!
18 // Push x0 on the stack - The stack must always be quad-word aligned
21 // Load the SVC arguments values into the appropriate registers
28 // Prevent speculative execution beyond svc instruction
32 // Pop the ARM_SVC_ARGS structure address from the stack into x9
35 // Store the SVC returned values into the ARM_SVC_ARGS structure.
36 // A SVC call can return up to 4 values - we do not need to store back x4-x7.
42 ldp x29, x30, [sp], #32