l4sigma0_map_iomem Allowed Addresses
wesley at wesman.net
Mon Oct 17 06:12:25 CEST 2011
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.
wesley at wesman.net
On Oct 16, 2011, at 4:56 PM, Adam Lackorzynski wrote:
> 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
>>> 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
>> 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
>> 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
> Try mapping smaller chunks and/or try l4sigma0_map_anypage().
> 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
More information about the l4-hackers