Hi Ohad,<br><br><div class="gmail_quote">2012/5/17 Ohad Ben-Cohen <span dir="ltr"><<a href="mailto:ohad@wizery.com" target="_blank">ohad@wizery.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Michal,<br>
<div class="im"><br>
On Sat, Mar 17, 2012 at 8:39 AM, Ohad Ben-Cohen <<a href="mailto:ohad@wizery.com">ohad@wizery.com</a>> wrote:<br>
> IOW: you can probably just wait a bit until this patch is ready and<br>
> take it into your tree. It will most likely bring back the behavior you<br>
> need :)<br>
<br>
</div>Does something like the attached help ?<br></blockquote><div><br>I have looked at it and tested on latest and greatest and the problem is still there.  If you look at debug output below<br>you see that vrings are allocated before carveout area which is causing that rtos text is not placed at 0x0 address. <br>
<br>I have looked at the code and path is <br>rproc_fw_config_virtio -> rproc_handliefirtion_rsc -> rproc_handle_vdev<br><br><br>
~ # zynq_remoteproc 0.remoteproc-test: rproc_handle_virtio_rsc: rsc type 0<br>
zynq_remoteproc 0.remoteproc-test: rproc_handle_virtio_rsc: rsc type 3<br>
zynq_remoteproc 0.remoteproc-test: vdev rsc: id 7, dfeatures 1, cfg len 0, 2 vrings<br>
zynq_remoteproc 0.remoteproc-test: vdev rsc: vring0: da 400000, qsz 256, align 256<br>
zynq_remoteproc 0.remoteproc-test: vdev rsc: vring1: da 404000, qsz 256, align 256<br>
zynq_remoteproc 0.remoteproc-test: vring0: va d1000000 dma 0 size 2000 idr 0<br>
zynq_remoteproc 0.remoteproc-test: vring1: va d1002000 dma 2000 size 2000 idr 1<br>
zynq_remoteproc 0.remoteproc-test: powering up 0.remoteproc-test<br>
zynq_remoteproc 0.remoteproc-test: Booting fw image test, size 2353146<br>
zynq_remoteproc 0.remoteproc-test: iommu not found<br>
zynq_remoteproc 0.remoteproc-test: rsc: type 0<br>
zynq_remoteproc 0.remoteproc-test: carveout rsc: da 0, pa 0, len 20ec20, flags 0<br>
zynq_remoteproc 0.remoteproc-test: carveout va d1400000, dma 400000, len 0x20ec20<br>
zynq_remoteproc 0.remoteproc-test: rsc: type 3<br>
zynq_remoteproc 0.remoteproc-test: rsc: type 2<br>
<br><br>For me it is necessary to ensure that dma_alloc_coherent in rproc_alloc_vring is called after carveout allocation<br>just because dma_alloc_cohorent takes mermory from preallocated pool which starts at 0x0. I also don't have<br>
any other advance mechanism how to ensure mapping for the second arm core.<br><br>Here is log which I need to get. Look at attached patch which exactly show you what I need to do which I have tested.<br>Maybe it is not big deal and I can use mainline remoteproc version and use this patch to be in sync with mainline code.<br>
<br>zynq_remoteproc 0.remoteproc-test: rproc_handle_virtio_rsc: rsc type 0<br>zynq_remoteproc 0.remoteproc-test: carveout rsc: da 0, pa 0, len 20ec20, flags 0<br>zynq_remoteproc 0.remoteproc-test: carveout va d1000000, dma 0, len 0x20ec20<br>
zynq_remoteproc 0.remoteproc-test: rproc_handle_virtio_rsc: rsc type 3<br>zynq_remoteproc 0.remoteproc-test: rproc_handle_virtio_rsc: rsc type 2<br>zynq_remoteproc 0.remoteproc-test: rproc_handle_virtio_rsc: rsc type 0<br>
zynq_remoteproc 0.remoteproc-test: rproc_handle_virtio_rsc: rsc type 3<br>zynq_remoteproc 0.remoteproc-test: vdev rsc: id 7, dfeatures 1, cfg len 0, 2 vrings<br>zynq_remoteproc 0.remoteproc-test: vdev rsc: vring0: da 400000, qsz 256, align 4096<br>
zynq_remoteproc 0.remoteproc-test: vdev rsc: vring1: da 404000, qsz 256, align 4096<br>zynq_remoteproc 0.remoteproc-test: vring0: va d1400000 dma 400000 size 3000 idr 0<br>zynq_remoteproc 0.remoteproc-test: vring1: va d1404000 dma 404000 size 3000 idr 1<br>
zynq_remoteproc 0.remoteproc-test: powering up 0.remoteproc-test<br>zynq_remoteproc 0.remoteproc-test: Booting fw image test, size 2353146<br>zynq_remoteproc 0.remoteproc-test: iommu not found<br>zynq_remoteproc 0.remoteproc-test: rsc: type 0<br>
zynq_remoteproc 0.remoteproc-test: rsc: type 3<br>zynq_remoteproc 0.remoteproc-test: rsc: type 2<br><br>Thanks,<br>Michal<br></div></div>