Experimenting the vm-tz example on the Freescale i.mx6 SDB

Adam Lackorzynski adam at os.inf.tu-dresden.de
Tue Apr 7 23:35:32 CEST 2015


Hi,

On Wed Apr 01, 2015 at 11:36:48 +0200, Mahdi Aichouch wrote:
> I tried to do as you suggested, and I added a loop in order to map a small
> chunk of memory at time.
> 
> When I tried to map 1 KB at a time and 2 KB at a time, I received this
> error from the first call to
>  l4sigma0_map_iomem ( ) function:
> 
> ...
> Vmm started
> j = 0 addr = 0x0
> Cannot map nonsecure memory Phys, virt or size not aligned

Minimal page size is 4kB, so this is supposed to happen.

> Then, I tried to add 4KB at a time, and I received the same error as before
> at the first call to
> the l4sigma0_map_iomem ( ) function, that is:
> 
> ...
> Vmm started
> j = 0 addr = 0x0
> Cannot map nonsecure memory No fpage received

For all pages you tried or just the first one?

> I also tried with 4 KB, 8 KB, 16 KB, 32 KB,...
> I get the same error: "No fpage received"
> 
> 
> This is the code of the loop that I added:
> 
>   int ram_size = 0x1000; //4 KB
> 
> 
>   int address  = 0x0;
>   int j;
>   for(j = 0; j < 256; j++) {
>     fault = l4sigma0_map_iomem(sigma0_cap.cap(), Ram_base, Ram_base,
> ram_size, 1);
>     printf("j = %d addr = 0x%x\n", j, address);
>     address += ram_size;
>     if (fault) {
>       printf("Cannot map nonsecure memory %s\n",
> l4sigma0_map_errstr(fault));
>       exit(1);
>     }
>   }
> 
> Could you please tell me what else should I check to track down the source
> of the error.

In pkg/sigma0/server/src/globals.h there's a debug_ipc and
debug_warnings enum, toggle those to 1 and maybe the messages will tell
us something.




Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/




More information about the l4-hackers mailing list