[PATCH v2 08/21] arm: socfpga: Add SMC helper function for Intel SOCFPGA (64bits)

Marek Vasut marex at denx.de
Wed Feb 19 18:15:19 CET 2020


On 2/19/20 1:25 PM, chee.hong.ang at intel.com wrote:
[...]

> +#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_ATF)
> +int invoke_smc(u32 func_id, u64 *args, int arg_len, u64 *ret_arg, int ret_len)
> +{
> +	int i;
> +	struct pt_regs regs;
> +
> +	memset(&regs, 0, sizeof(regs));
> +
> +	regs.regs[0] = func_id;
> +
> +	if (args) {
> +		for (i = 0; i < arg_len; i++)
> +			regs.regs[i + 1] = args[i];

Is this memcpy() ?

> +	}
> +
> +	smc_call(&regs);
> +
> +	if (ret_arg) {
> +		for (i = 0; i < ret_len; i++)
> +			ret_arg[i] = regs.regs[i + 1];

memcpy() ?


More information about the U-Boot mailing list