Hi Joseph,
Am 10.12.2015 um 14:08 schrieb Joseph Lee:
I have some more questions. How in VMM I can read contents of VM's RAM by accessing the physical memory address directly instead of virtual address?
I wonder why you want to do this? In the userland on Genode+ARM, the MMU is always enabled, there is and shall be no way to disable it from within the userland. You can use the IOMEM mapping of the VM RAM in the tz_vmm [1] to access non-secure RAM. Likewise, you can IOMEM-map this RAM in other components. When IOMEM-mapped, the VM RAM is non-cached in the VMM but it may be partially cached in the non-secure world. So, either you only access regions that are non-cached also in the non-secure world or synchronize before accessing them (For details regarding these two cases see a recent mail [6] of me).
Or is MMU in Genode configured for one to one mapping the virtual address to physical address?
No. It is possible to determine the physical address of a dataspace via [4] and to suggest a local mapping address via [3] but what do you expect to be the benefit of a 1:1 mapping?
how do i use DMA without involving the CPU to read contents of VM's RAM inside VMM?
I don't know how this is done but AFAIK nothing speaks against doing it. DMA engines are configured in the CSU [5] whether to be allowed or forbidden to access secure RAM.
Cheers, Martin
[1] https://github.com/genodelabs/genode/blob/master/repos/os/src/server/tz_vmm/...
[3] https://github.com/genodelabs/genode/blob/master/repos/base/include/rm_sessi...
[4] https://github.com/genodelabs/genode/blob/master/repos/base/include/dataspac...
[5] https://github.com/genodelabs/genode/blob/master/repos/base-hw/src/core/incl...
[6] http://sourceforge.net/p/genode/mailman/message/34685275/