Hi,
On Fri, Dec 16, 2016 at 2:43 PM, Sandeep Tripathy sandeep.tripathy@broadcom.com wrote:
Hi Jens, What if Op-tee maps shm as uncached for non-smp case as long as the issue is not solved ?
Performance-wise that would be a disaster and I'm not sure it would help as it's the shareable bits that matters. The current "workaround" by pretending the problem doesn't exist is the best compromise until we have a proper fix.
So the tee driver can just map cached/uncached based on how op-tee have mapped the shm. And may be warn if shm is cached for non-smp.
Regarding the original problem of coherency: I want to understand in a UP system what attribute can make it non coherent between NS and S state. Could you point me to the attributes. TEX:C B , nGnRnE NS/S anything else can affect ? I thought as long as the memory is mapped with 'non-secure' attribute both NS and S side will hit it in l1/l2/mem. If you have some suggestions I can experiment.
Keep in mind that we're using TEX remapping in OP-TEE. It's basically the shareable bits (inner and outer shareable) that matters. The rest is the same in both UP and MP systems.
Regards, Jens
Making it cacheable does not work for me either but I am not able to understand.
Thanks Sandeep
-----Original Message----- From: Jens Wiklander [mailto:jens.wiklander@linaro.org] Sent: Thursday, November 10, 2016 3:05 AM To: Sandeep Tripathy Cc: tee-dev@lists.linaro.org Subject: Re: [Tee-dev] OP-TEE supports only SMP system ?
Hi Sandeep,
On Fri, Nov 4, 2016 at 3:38 PM, Sandeep Tripathy sandeep.tripathy@broadcom.com wrote:
Hi,
I see explicit checks for OPTEE_SMC_NSEC_CAP_UNIPROCESSOR. What is the limitation with uniprocessor system.
The problem is with the way Linux detects it and how memory is mapped when detected. If Linux considers the system an SMP system, memory is mapped as shared, while if considered an UP system it's not mapped as shared. OP-TEE has to map memory shared with Linux with the same shared settings to keep the memory coherent with normal world. So far we don't have a pretty solution for that so we just ignore the problem and assume/require that all systems are SMP systems.
Regards, Jens