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

Ang, Chee Hong chee.hong.ang at intel.com
Thu Feb 20 02:32:43 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() ?
Will change this.
> 
> > +	}
> > +
> > +	smc_call(&regs);
> > +
> > +	if (ret_arg) {
> > +		for (i = 0; i < ret_len; i++)
> > +			ret_arg[i] = regs.regs[i + 1];
> 
> memcpy() ?
Will change this too. Thanks.


More information about the U-Boot mailing list