static unsigned long __invoke_psci_fn_hvc(unsigned long function_id, unsigned long arg0, unsigned long arg1, unsigned long arg2) { struct arm_smccc_res res; arm_smccc_hvc(function_id, arg0, arg1, arg2, 0, 0, 0, 0, &res); return res.a0; }
/** * do_fw_call_hvc() - Call system-level platform management layer (HVC) * @arg0: Argument 0 to HVC call * @arg1: Argument 1 to HVC call * @arg2: Argument 2 to HVC call * @ret_payload: Returned value array * * Invoke platform management function via HVC * HVC-based for communication through hypervisor * (no direct communication with ATF). * * Return: Returns status, either success or error+reason */ static noinline int do_fw_call_hvc(u64 arg0, u64 arg1, u64 arg2, u32 *ret_payload) { struct arm_smccc_res res; arm_smccc_hvc(arg0, arg1, arg2, 0, 0, 0, 0, 0, &res); if (ret_payload) { ret_payload[0] = lower_32_bits(res.a0); ret_payload[1] = upper_32_bits(res.a0); ret_payload[2] = lower_32_bits(res.a1); ret_payload[3] = upper_32_bits(res.a1); } return zynqmp_pm_ret_code((enum pm_ret_status)res.a0); }