Physical address of dynamic area
Dave Higton (281) 668 posts |
OK, so I reserve a small Dynamic Area. Will a DMA controller see it at the same address that RISC OS assigns to me? If not, how do I translate the address? None of the OS_Memory calls seems appropriate. |
James Peacock (318) 129 posts |
Is the PCI module available? If so does PCI_RAMAlloc do what you want? See: http://www.riscosopen.org/wiki/documentation/pages/PCI_RAMAlloc |
Jeffrey Lee (213) 6048 posts |
No.
OS_Memory 0 will do it. Set bits 9 and 13 of R0, and pass in a page block list containing just the logical addresses. On exit the physical addresses should be filled in.
Yes. I’d recommend using PCI_RAMAlloc, since it guarantees that each allocation will be using a physically contiguous address range, and that RISC OS won’t attempt to move the pages. Plus of course it returns the physical address for you to use (in R1). |