Re: [PATCH] firmware: arm_scmi: Pass shmem address to SMCCC call

From: Paul Murphy
Date: Fri Jul 17 2020 - 10:00:23 EST


Hi Florian


On 7/16/20 20:57, Florian Fainelli wrote:


Given that the kernel must somehow reserve this memory as a shared
memory area for obvious reasons, and the trusted firmware must also
ensure it treats this memory region with specific permissions in its
translation regime, does it really make sense to give that much
flexibility?

Well, the trusted firmware might reserve a bigger region to be used for
other service as well. In other words, the MMU of TF-A is not necessary
specifically set up for this region, but, possibly, for a bigger
general shared region.

But presumably the Linux shared memory area should be mapped in a
slightly different way than



Sorry - could you clarify what you mean by that?

Just checking if we are doing everything correctly.

I didn't understand that there is a connection between the TF-A MMU tables for this region and the normal world MMU tables?

For example:

TF-A may map physical address range: 0x0 -> 0x400_000 as 'normal' memory for various purposes.

Linux SCMI driver could map physical address range, eg: 0x300_000 -> 0x301_000 as IO memory for mailbox purpose only.

Is there any issue here?

Regards,

Paul