tz_vmm on imx6

Stefan Kalkowski stefan.kalkowski at ...1...
Tue Jan 6 09:00:00 CET 2015


Hi,

On 01/02/2015 02:31 PM, chirag garg wrote:
> Thanks Stefan,
> 
> So what could be the right approach to prevent the UART driver from
> getting corrupted ?

Keep in mind: it is just wild guessing when I say it might be a
corrupted UART. I think you have to debug it, intersperse further
printings, or use JTAG debugger to validate such an assumption.
However, to prevent potential interferences the only solution is to use
the UART only from one world (normal or secure). To have serial output
from both worlds, you'll have to provide a virtual interface to the
normal world, and write a para-virtual driver for it.

> 
> Now, I want to switch the control from Normal world OS (Genode) back to
> the Secure world OS (Genode) by triggering(running a particular script
> in Normal world). So what could be the right approach to achieve this
> objective ?

To switch to the secure world you can trigger a 'smc' assembler
instruction, which will end up as a hypercall in the VMM. The 'smc'
instruction needs to be executed in privileged mode (pl1 or higher).
Therefore, if you want to trigger it via a script from userland, you
need to create some kernel module first that executes the 'smc' instruction.

Regards
Stefan

> 
> Regards
> 
> Chirag Garg
> IIT Madras , Rise Lab
> 
> On Fri, Jan 2, 2015 at 5:14 PM, Stefan Kalkowski
> <stefan.kalkowski at ...1...
> <mailto:stefan.kalkowski at ...1...>> wrote:
> 
>     Hi,
> 
>     On 12/24/2014 10:49 AM, chirag garg wrote:
>     > Hi all,
>     >
>     > I was trying to run tz_vmm script over the imx6 platform. In which i
>     > have put Genode OS image (printf script) as a guest OS in the Normal
>     > world to test the switching between the Secure world to the Normal
>     > world. And the following is the output I am getting..
>     >
>     >
>     > Starting kernel ...
>     >
>     > kernel initialized
>     > Genode 14.11
>     > int main(): --- create local services ---
>     > Inside platform services 0
>     > Inside platform services 1
>     > Inside platform services 2
>     > Inside platform services 3
>     > int main(): --- start init ---
>     > int main(): transferred 250 MB to init
>     > int main(): --- init created, waiting for exit condition ---
>     > [init] Could not open file "ld.lib.so <http://ld.lib.so>
>     <http://ld.lib.so>"
>     > [init] parent provides
>     > [init]   service "ROM"
>     > [init]   service "RAM"
>     > [init]   service "IRQ"
>     > [init]   service "IO_MEM"
>     > [init]   service "CAP"
>     > [init]   service "PD"
>     > [init]   service "RM"
>     > [init]   service "CPU"
>     > [init]   service "LOG"
>     > [init]   service "SIGNAL"
>     > [init]   service "VM"
>     > [init] child "tz_vmm"
>     > [init]   RAM quota:  3932160
>     > [init]   ELF binary: tz_vmm
>     > [init]   priority:   0
>     > [init -> tz_vmm] Start virtual machine ...
>     > kernel initialized
>     > Genode 14.08
>     > int main(): --- create local services ---
>     > int main(): --- start init ---
>     > int main(): transferred 509 MB to init
>     > int main(): --- init created, waiting for exit condition ---
>     > [init] Could not open file "ld.lib.so <http://ld.lib.so>
>     <http://ld.lib.so>"
>     > [init -> test-printf] -1 = -1 = -1
>     > [init] virtual void Genode::Child_policy::exit(int): child exited with
>     > exit value 0
>     > [init -> tz_vmm]
>     >
>     > The last message on the window is [init -> tz_vmm] and nothing happens
>     > after that.
>     >
>     > Could you please let me know if this is the correct output?
> 
>     Well, in general it looks good the whole guest scenario seems to
>     succeed. I don't know why the last uncompleted message is printed, but
>     it may be that at last some VM exception is caught by the VMM, but the
>     UART driver gets corrupted, because you use the UART device from both
>     world concurrently.
>     However, in general the world switch seems to work as expected.
> 
>     Regards
>     Stefan
> 
>     >
>     > Regards
>     >
>     > Chirag Garg
>     > IIT Madras , Rise Lab
>     >
>     >
>     >
>     ------------------------------------------------------------------------------
>     > Dive into the World of Parallel Programming! The Go Parallel Website,
>     > sponsored by Intel and developed in partnership with Slashdot
>     Media, is your
>     > hub for all things parallel software development, from weekly thought
>     > leadership blogs to news, videos, case studies, tutorials and
>     more. Take a
>     > look and join the conversation now. http://goparallel.sourceforge.net
>     >
>     >
>     >
>     > _______________________________________________
>     > genode-main mailing list
>     > genode-main at lists.sourceforge.net
>     <mailto: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/
> 
>     ------------------------------------------------------------------------------
>     Dive into the World of Parallel Programming! The Go Parallel Website,
>     sponsored by Intel and developed in partnership with Slashdot Media,
>     is your
>     hub for all things parallel software development, from weekly thought
>     leadership blogs to news, videos, case studies, tutorials and more.
>     Take a
>     look and join the conversation now. http://goparallel.sourceforge.net
>     _______________________________________________
>     genode-main mailing list
>     genode-main at lists.sourceforge.net
>     <mailto:genode-main at lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/genode-main
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming! The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net
> 
> 
> 
> _______________________________________________
> 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