Re: Full Virtualization with Trustzone

Adam Lackorzynski <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
On Thu Nov 22, 2012 at 20:31:44 +0800, meng-qy wrote:
>  > Memory on imx51 is starting at 0x90000000. At 0x60000000 there are
> > pheripherals, i.e. there's no usable memory where something can be copied
> > to (or executed). 
>     
>    I think we make a wrong understanding about " l4sigma0_map_iomem() "  .
> 
> >If you want to execute something it needs to be in the
> > region 0x90000000-0xafffffff. A simple trick is to reduce the memory for
> > secure side (e.g. via imx51.conf) and use the rest for NS.
> 
>   Now, we use 0x90000000-0x9fffffff  to run secure side,  and revise the vm configuration as following:
>        Ram_base = 0xa1000000, 
>        Ram_size = 0x4000000, // 128 MB
>        Start_addr = Ram_base + 0x100000, // +1MB
>  
>     The l4_vm_state is set as:
>         state->pc = Start_addr;
>         state->cpsr = 0x13; //svc
>         state->r[0] = 0;  
>         state->r[1] = 0x84D; imx51 //arch num
> 
>      The NS bare app's entry is set as 0xa1100000, but we still stop at "VM run", we use some tracing 
> methods and find the system stop at:
> 
>  // set pending events
>  ldmia r0!, {r1}
>  and r1, r1, #0x1c0
>  mcr p15, 0, r1, c12, c1, 1  // ivt.S line:954, looks like some ISR pending control.

Hmm, I wonder how it can hang/stop there.
 
>    BTW, should we  write a virtual-interrupt layer to map the NS call with Secure side? I think maybe 
>  NS bare app can not visit the pheripherals address directly.

Yes, same thoughts.



Adam
-- 
Adam                 [email protected]
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.