Hi Robert,
This file maybe relevant from the kernel side [1], it's reserving the
IO/device areas as well as the available memory area for a specific
platform/board. From the root task (userspace), you may want to have a
look at this file [2] as an example, it has example functions to map
both regular pages and devices.
seL4 would map its own frames during bootstrapping process, and then
pass on the remaining free memory to the root task in a sort of
untyped memory regions (with physical addresses). Assuming you've
allocated the buffer from this untyped memory area, you can just map
it yourself (from userspace, elfloader has no idea about your newly
allocated buffer) and pass whatever addresses you want
(virtual/physical), see [3].
[1] https://github.com/seL4/seL4/blob/master/src/plat/imx31/machine/hardware.c
[2] https://github.com/heshamelmatary/sel4-riscv/blob/master/apps/sos/src/mappin...
[3] https://github.com/heshamelmatary/sel4-riscv/blob/master/apps/sos/src/main.c...
Best,
Hesham
On Thu, Dec 3, 2015 at 7:59 PM, Robert VanVossen
Hello,
I am attempting to integrate the Xilinx drivers, provided through their SDK, with seL4 on the Zynq7000. In the root thread, I created a virtual mapping for the SD Card peripheral, and I pass that virtual address into the driver, so that it is reading and writing to it.
The controller has a built-in DMA that gets used for data transfer. I created a buffer in the root thread's virtual space to pass to the DMA, but it needs a physical address. I calculated the virtual/physical offset from the physical and virtual addresses for the application that are given by the elfloader, but that didn't seem to be the correct mapping.
Is there a good way to get that mapping, either from within the application itself or from the kernel before hand?
Thanks, Robbie VanVossen DornerWorks
_______________________________________________ Devel mailing list Devel@sel4.systems https://sel4.systems/lists/listinfo/devel
-- Hesham