i.MX53 TrustZone cross world interactions

Stefan Kalkowski stefan.kalkowski at ...1...
Tue May 5 11:57:16 CEST 2015

Hi Ofer,

On 05/05/2015 11:06 AM, Ofer Hasson wrote:
> Hey,
> I'm using Freescale i,MX53 QSB.
> I'm trying to transfer data between the secure world and the normal
> world, at the moment, I manage to transfer data using the CPU registers
> (using Linux kernel module I wrote), and I manage to receive them on the
> hypervisor.
> I would like to transfer larger structure, for example a memory buffer,
> I'm allocating in the normal world kernel a buffer, I send the physical
> address (using __pa) to the secure world.
> My question is, how in the Genode hypervisor I can access this memory
> address ?
> Any idea will be helpful

just as a side-note: we distinguish between hypervisor and
virtual-machine monitor. Our hypervisor/kernel does not do anything
meaningful with the "normal world", it just reflects exceptions (e.g.
secure-monitor-calls) of the "normal world" to the dedicated VMM. The
VMM - a simple userland component - should do the actual work.

In our small example, which I assume you were using as starting point,
the VMM already has all the physical memory of the "normal world" guest
OS already attached (in a way that it does not end up in the cache) to
its virtual address space. The abstraction to lookup the virtual address
of the VMM with respect to a given physical address of the guest memory
is the "Ram" class (repos/src/server/tz_vmm/include/ram.h).

Be careful when using a memory buffer in Linux to propagate content to
the "secure world". That memory has to be mapped within the Linux kernel
to _not_ end up within the cache too. Otherwise you will get an
incoherent view to the memory between both worlds.


> Thanks
> Ofer
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud 
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> genode-main mailing list
> genode-main at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main

Stefan Kalkowski
Genode Labs

http://www.genode-labs.com/ ยท http://genode.org/

More information about the users mailing list