Lines Matching refs:res

70  * @res:  The SMC return data
79 static int sandbox_ffa_version(struct udevice *emul, ffa_value_t *pargs, ffa_value_t *res)
84 res->a0 = priv->fwk_version;
96 * @res: The SMC return data
104 static int sandbox_ffa_id_get(struct udevice *emul, ffa_value_t *pargs, ffa_value_t *res)
108 res->a0 = FFA_SMC_32(FFA_SUCCESS);
109 res->a1 = 0;
112 res->a2 = priv->id;
123 * @res: The SMC return data
131 static int sandbox_ffa_features(ffa_value_t *pargs, ffa_value_t *res)
133 res->a1 = 0;
136 res->a0 = FFA_SMC_32(FFA_SUCCESS);
137 res->a2 = RXTX_BUFFERS_MIN_SIZE;
138 res->a3 = 0;
144 res->a0 = FFA_SMC_32(FFA_ERROR);
145 res->a2 = -NOT_SUPPORTED;
157 * @res: The SMC return data
166 ffa_value_t *res)
174 res->a0 = FFA_SMC_32(FFA_ERROR);
177 res->a2 = -DENIED;
183 res->a2 = -BUSY;
198 res->a2 = -NO_MEMORY;
210 res->a0 = FFA_SMC_32(FFA_SUCCESS);
211 res->a2 = SANDBOX_PARTITIONS_CNT;
230 res->a0 = FFA_SMC_32(FFA_SUCCESS);
232 res->a2 = (ulong)
241 res->a2 = -INVALID_PARAMETERS;
247 log_err("FFA_PARTITION_INFO_GET (%ld)\n", res->a2);
249 res->a1 = 0;
261 * @res: The SMC return data
269 static int sandbox_ffa_rxtx_map(struct udevice *emul, ffa_value_t *pargs, ffa_value_t *res)
274 res->a0 = FFA_SMC_32(FFA_ERROR);
277 res->a2 = -DENIED;
287 res->a0 = FFA_SMC_32(FFA_SUCCESS);
288 res->a2 = 0;
294 res->a2 = -INVALID_PARAMETERS;
297 res->a2 = -NO_MEMORY;
302 (int)res->a2);
306 res->a1 = 0;
318 * @res: The SMC return data
326 static int sandbox_ffa_rxtx_unmap(struct udevice *emul, ffa_value_t *pargs, ffa_value_t *res)
331 res->a0 = FFA_SMC_32(FFA_ERROR);
332 res->a2 = -INVALID_PARAMETERS;
343 res->a0 = FFA_SMC_32(FFA_SUCCESS);
344 res->a2 = 0;
353 res->a1 = 0;
365 * @res: The SMC return data
373 static int sandbox_ffa_rx_release(struct udevice *emul, ffa_value_t *pargs, ffa_value_t *res)
379 res->a0 = FFA_SMC_32(FFA_ERROR);
380 res->a2 = -DENIED;
384 res->a0 = FFA_SMC_32(FFA_SUCCESS);
385 res->a2 = 0;
389 res->a1 = 0;
424 * @res: The SMC return data
438 ffa_value_t *pargs, ffa_value_t *res)
447 res->a0 = FFA_SMC_32(FFA_ERROR);
448 res->a1 = 0;
449 res->a2 = -INVALID_PARAMETERS;
457 res->a0 = FFA_SMC_64(FFA_MSG_SEND_DIRECT_RESP);
459 res->a1 = PREP_SRC_SP_ID(part_id) |
462 res->a2 = 0;
465 res->a3 = -1UL;
466 res->a4 = -1UL;
467 res->a5 = -1UL;
468 res->a6 = -1UL;
469 res->a7 = -1UL;
609 * @res: the SMC call returned data
621 void sandbox_arm_ffa_smccc_smc(ffa_value_t *args, ffa_value_t *res)
634 ret = sandbox_ffa_version(emul, args, res);
637 ret = sandbox_ffa_partition_info_get(emul, args, res);
640 ret = sandbox_ffa_rxtx_unmap(emul, args, res);
643 ret = sandbox_ffa_msg_send_direct_req(emul, args, res);
646 ret = sandbox_ffa_id_get(emul, args, res);
649 ret = sandbox_ffa_features(args, res);
652 ret = sandbox_ffa_rxtx_map(emul, args, res);
655 ret = sandbox_ffa_rx_release(emul, args, res);
669 * @res: FF-A ABI return data to be copied from Xn registers
673 void invoke_ffa_fn(ffa_value_t args, ffa_value_t *res)
675 sandbox_arm_ffa_smccc_smc(&args, res);