+++ /dev/null
-//\r
-// Copyright (c) 2016 - 2020, ARM Limited. All rights reserved.\r
-//\r
-// SPDX-License-Identifier: BSD-2-Clause-Patent\r
-//\r
-//\r
-\r
-\r
- INCLUDE AsmMacroExport.inc\r
-\r
- RVCT_ASM_EXPORT ArmCallSvc\r
- // r0 will be popped just after the SVC call\r
- push {r0, r4-r8}\r
-\r
- // Load the SVC arguments values into the appropriate registers\r
- ldm r0, {r0-r7}\r
-\r
- svc #0\r
- // Prevent speculative execution beyond svc instruction\r
- dsb nsh\r
- isb\r
-\r
- // Load the ARM_SVC_ARGS structure address from the stack into r8\r
- ldr r8, [sp]\r
-\r
- // Load the SVC returned values into the appropriate registers\r
- // A SVC call can return up to 4 values - we do not need to store back r4-r7.\r
- stm r8, {r0-r3}\r
-\r
- mov r0, r8\r
-\r
- // Restore the registers r4-r8\r
- pop {r1, r4-r8}\r
- bx lr\r
-\r
- END\r