Example of a trusty driver other than CAAM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Example of a trusty driver other than CAAM

766 Views
asmaa
Contributor V

Hello Everyone,

I am working on imx8 trusty, I see there is one example of hwcrypto app which uses CAAM. In this hwcrypto app, CAAM is used by direct hardware access.

I have written SPI driver for trusty for imx. My driver is at path trusty/hardware/nxp/platform/imx/drivers/spi_imx.c

Also, I have written a public service called msr on a similar line to hwcrypto. In my msr service I want to send and receive data on SPI line through spi_imx.c driver. I have added spi_imx.h as a header file in my msr. But still, it gives undefined symbol issue.

I got the following questions on this:

1. How can public/private services access drivers written in trusty kernel?

2. Is there any example of GPIO/SPI/I2C other than CAAM for trusty?

 

Thanks,

Asma

 

0 Kudos
2 Replies

747 Views
IvanRuiz
NXP Employee
NXP Employee

Hello,

Basically, a driver is required in the Linux kernel that communicates with the trusty kernel to transfer data bi-directionally, so as far as I understand if something is required to send over SPI to the trusty kernel, it would be necessary to first send it to the Linux kernel and then to the SPI, but of course this is a Linux related question and not a BSP related one. Secondly, CAAM is the only available example.

 

BR,

Ivan.

0 Kudos

740 Views
asmaa
Contributor V

Hi @IvanRuiz 

Thanks for the reply, but I didn't really understand what are you trying to say.

My requirement is I want to communicate with magstripe chip on SPI bus from imx8. To make it secure, I re-written SPI driver in the trusty kernel and removed the Linux one. I have created the SPI server following android docs Trusty API reference .

Now whenever a request from the non-secure world comes to SPI server in the secure world, how does the SPI server retrieves/connect data from the driver in trusty kernel. There is no example of it.

Basically, I want to connect from server/TA to the driver in Trusty.

For example in OPTEE, TA cannot connect directly to the driver in OPTEE, there is a middle layer called PseudoTA. So communication is TA <->PTA<->Optee kernel/driver.

So are you aware of any such middle interface to connect from server/TA to the driver in trusty?

 

Thanks,

Asma

0 Kudos