/* * Copyright (c) 2020, Google Inc. All rights reserved * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files * (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, * publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include .macro smc8_hvc8, instr /* * Save x8 (return value ptr) and lr. The SMC calling convention says el3 * does not need to preserve x8. The normal ABI does not require either x8 * or lr to be preserved. */ push x8, lr \instr #0 pop x8, lr /* Copy 8-register smc return value to struct smc_ret8 return value */ stp x0, x1, [x8], #16 stp x2, x3, [x8], #16 stp x4, x5, [x8], #16 stp x6, x7, [x8], #16 ret .endm FUNCTION(smc8) smc8_hvc8 smc FUNCTION(hvc8) smc8_hvc8 hvc