Interaction with L4

Norman Feske norman.feske at ...1...
Mon Jan 11 12:45:51 CET 2010


Hi Peter,

> Thanks for your help as usual. With my code, I have functionality that  
> is based on the iguana trace buffer. As such, some of my functionality  
> is iguana based. In particular, I am wondering how i can go about  
> mapping kernel memory to user space in a way that works the same as  
> the Iguana trace buffer, given you have suggested that Genode  
> primitives should be used.

the best way to go for mapping a predefined physical memory area
into a Genode process is using core's IO_MEM service because, logically,
this memory can be seen as device memory. When opening an IO_MEM
session (see 'base/include/io_mem_session/connection.h'), you can
specify the physical base address and the size of the physical memory
resource. You can then request a dataspace capability from this session
and use it for attaching the memory to the local address space (via
'env()->rm_session()->attach()'). For an example of using the IO_MEM
service, please have a look at the GTA01 platform driver, which relies
on this procedure to access platform registers:

  os/src/drivers/platform/gta01/main.cc

Please make sure that your trace buffer is outside the normal RAM
configured in the elfweaver config file because core will refuse to hand
out memory as IO_MEM when this memory is reported as normal RAM. To see
the physical memory considered as normal RAM, you can enable the
'verbose_boot_info' flag in 'base-okl4/src/core/platform.cc'.

Regards
Norman




More information about the users mailing list