l4sigma0_map_iomem Allowed Addresses

Wesley Miaw wesley at wesman.net
Mon Oct 17 06:12:25 CEST 2011


Hi Adam,

Yeah, but I figured it out so everything's good. Thanks. :)

I found that if I want to allocate this memory, I need to keep it in the "iomem" area even though it is actually RAM. Once I did that, I could allocate half the actual RAM to Fiasco/L4, and keep the other half in reserve for the the "normal world" Linux kernel.

Unfortunately at this point I'm stuck on a TrustZone issue--whenever I try to switch the PC to the normal world instruction, located in the reserved half of RAM, the device halts/hangs. It is happening even with the example Versatile Express TrustZone code available off the ARM web site, so I don't think it's something specifically at issue with L4/Fiasco. I think I need to partition/initialize the TrustZone Controller somehow but I don't know how. If you have any insight that'd be great but otherwise I'm still searching for details elsewhere.

Thanks,
--
Wesley Miaw
wesley at wesman.net

On Oct 16, 2011, at 4:56 PM, Adam Lackorzynski wrote:

> Hi,
> 
> did I miss this one?
> 
> On Tue Oct 04, 2011 at 00:37:47 -0000, Wesley at wesman.net wrote:
>>> On Thu Sep 29, 2011 at 15:34:38 -0700, Wesley Miaw wrote:
>>>> I'm having some trouble understanding the acceptable values usable in a
>>>> call to l4sigma0_map_iomem....
>>>> 
>>>> But what addresses should be allowed? My Verstaile Express board has 1GB
>>>> RAM starting at physical address 0x60000000 but I can't use this
>>>> address.
>>> 
>>> l4sigma0_map_iomem is used to map IO-mem, i.e. non-RAM. For RAM
>>> (0x60000000-0x9fffffff) use l4sigma0_map_anypage()/l4sigma0_map_mem().
>> 
>> I tried requesting physical memory 0x60000000 of size 0x40000000 mapped
>> onto virtual 0x60000000 using l4sigma0_map_mem() and am still getting the
>> error. I also tried a few other smaller sizes like 0x80000000 size
>> 0x20000000 and 0x64000000 size 0x1c000000. But they are all failing as
>> well.
>> 
>> I thought based on the RAM printout maybe I had to request a portion that
>> was in restricted to one of the "contiguous blocks" printed out. I think
>> owner '0' equals Sigma0 and owner '4' equals Root, so Sigma0 should be
>> able to give me 0x64000000 size 0x1c000000.
>> 
>> Here's some log output:
>> 
>> SIGMA0: Hello!
>>  KIP @ 60002000
>>  allocated 4KB for maintenance structures
>> SIGMA0: Dump of all resource maps
>> RAM:------------------------
>> [0:60000000;60000fff]
>> [0:60066000;6008ffff]
>> [0:60097000;60097fff]
>> [0:6009f000;6013ffff]
>> [4:60140000;60176fff]
>> [0:60177000;60177fff]
>> [4:60178000;6018efff]
>> [0:6018f000;6100efff]
>> [4:6100f000;6100ffff]
>> [0:61010000;6209afff]
>> [4:6209b000;6247dfff]
>> [0:6247e000;9effffff]
>> IOMEM:----------------------
>> [0:0;5fffffff]
>> [0:a0000000;ffffffff]
>> MOE: Hello world
>> MOE: found 1027436 KByte free memory
>> MOE: found RAM from 60000000 to 9f000000
>> MOE: allocated 1008 KByte for the page array @0x6018f000
>> MOE: virtual user address space [0-bfffffff]
>> prog   | l4sigma0_map_mem(64000000, 64000000, 1c000000)
>> prog   | l4sigma0_map_mem: size 1c000000; phys 64000000; virt 64000000
>> prog   | [init] Error: Cannot map physical memory: (-2147451396) No fpage
>> received.
> 
> Try mapping smaller chunks and/or try l4sigma0_map_anypage().
> 
> 
> 
> Adam
> -- 
> Adam                 adam at os.inf.tu-dresden.de
>  Lackorzynski         http://os.inf.tu-dresden.de/~adam/
> 
> _______________________________________________
> l4-hackers mailing list
> l4-hackers at os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers





More information about the l4-hackers mailing list