[BUG] New arm scmi check in linux-next causing rk3568 not to boot due to firmware bug

Nicolas Frattaroli frattaroli.nicolas at gmail.com
Thu May 12 04:11:22 PDT 2022


Hello,

sorry for the late reply, completely missed that there was a question
for me in this mail.

On Donnerstag, 5. Mai 2022 11:40:09 CEST Etienne Carriere wrote:
> Hello Nicolas, Cristian,
> [...]
> 
> Indeed the firmware implementation is wrong in TF-A.
> And also in OP-TEE by the way:
> https://github.com/OP-TEE/optee_os/blob/3.17.0/core/drivers/scmi-msg/base.c#L163-L166
> 
> @Nicoals, do you want to send a patch to TF-A, or do you want me to do it?

I have no experience with TF-A, so I'd prefer if you could do it.

In good news, Rockchip has confirmed they're preparing to release RK356x
TF-A sources, so I'll be able to port the patch over to their sources once
they are released, if they don't already apply it themselves.

> 
> I can fix the optee_os implementation. I'll tell you when I'll have
> created a P-R.
> The fix is the same for TF-A and OP-TEE.
> Proposal from Cristian looks good to me, maybe simplified:
> 
> ```patch
>          memcpy(outargs, &p2a, sizeof(p2a));
>          memcpy(outargs + sizeof(p2a), list + a2p->skip, count);
> 
> -        scmi_write_response(msg, outargs, sizeof(outargs));
> +        list_sz = (1 + (count - 1) / sizeof(uint32_t)) * sizeof(uint32_t);
> +        scmi_write_response(msg, outargs, sizeof(p2a) + list_sz);
> ```
> [...]
> 
> BR,
> Etienne

Regards,
Nicolas Frattaroli






More information about the Linux-rockchip mailing list