SMC in tz_vmm

Mahdi Aichouch foxmehdi at ...9...
Fri Jan 23 10:36:11 CET 2015


In my simple arm kernel I added a simple test case of the SMC instruction
to test
the switch from normal to secure world.

This is what I think regarding regarding the execution flow when an SMC is
executed in the normal world:

When the processor in the normal world encounters the SMC instruction it
an exception, this exception is caught in the exception function void
exception(unsigned const cpu)
defined in core/include/kernel/vm.h and execute the default switch case as

void exception(unsigned const cpu) {


PDBG("SMC instruction caught");


As we can see this function interrupts the execution of the VM
then sends a message (I think to)  to the VMM server in order to handle
the call to secure world.

This is the debug messages that I get when executing a simple test case.

int main(): --- start init ---
int main(): transferred 505 MB to init
int main(): --- init created, waiting for exit condition ---
[init] Could not open file ""
[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
virtual void Kernel::Vm::exception(unsigned int): SMC instruction caught
[init -> tz_vmm] Hi from Normal Word!

Unfortunately, I was unable to follow the exact and complete execution flow
and the function calls
step by step while debugging the source code using my JTAG debugger.

I get this warning message when I tried to put a breakpoint in the source

Starting target with image
Running from entry point
Execution stopped at: S:0x10001000
In image.elf (no debug info)

Breakpoint 2 unsilenced
break -p
! Breakpoint 3 has been pended
! No compilation unit matching
was found

Does anyone have an idea of how could I activate these debug information ?

Thank you very much in advance.

best regards,

On Fri, Jan 23, 2015 at 6:11 AM, chirag garg <chiragdthinker at ...9...>

> Hi all,
> I have some doubts in Genode Flow, ARM provides the smc instruction to
> enter in the monitor-mode which performs the world switch between normal
> world and secure world.
> As tz_vmm script is also successfully achieving the above objective of
> world switch from the secure world to the normal world. But i am not able
> to figure out flow which will which execute a call of smc instruction in
> the run of tz_vmm script.
> Can anyone explain me the flow ?
> Thanks in advance.
> Regards
> Chirag Garg
> IIT Madras , Rise Lab
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> _______________________________________________
> genode-main mailing list
> genode-main at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the users mailing list