Couple SVC calls to Task

Hi !

After usage of LPC55S69 port I can see the next problem.
As usually all task is running in non privileged mode and would like to access to few peripherals devices. Default MPU configuration is cover peripheral area with privileged rights and this settings are overwrite TZ PPC settings.
If via PPC access right to UART0 ( for example ) set with NS-User, MPU cover it with NS-Priv and nonprivileged tasks should enable nonprivileged access to peripherals on fly.
But only 3 custom MPU region is available for setup and in best case only one peripheral can be added to tasks’s MPU tables.
Like this : { I2C_MASTER, 0x1000, tskMPU_REGION_DEVICE_MEMORY }, // NS-User access in task context

But how task should be able to access more peripherals ?

Typical way is rich set of SVC calls what should wrap drivers or part of it.

But nonprivileged task shouln’t call noncontrolled SVC calls what elevate privileges so easily.

But I haven’t find and common framework what can be used for specify what exact SVC calls can be used by certain task.

Is this so ?

As usually we use vTaskSetApplicationTaskTag() to set valid mask of SVC calls what can be called by certain task when it active. And after that all SVC calls of task go via one call and that task specific enumeration is compared with SVC call what is called.

And I wondering if those TZ/MPU enabled MCUs should have some standart framework for handle specified list of SVC calls on per task base ?

Regards,
Eugene

I think we have a few options here, but each would need the privileged code to attest to the calling task’s identity as per previous conversations. Will get back to you on this after discussing here.

Yes, SVC handler should check permition to call some functions on per task basic.

Hi Richard !

Do you have trials about it ?
I can try to use those already.

Regards,
Eugene